Files
theia-code-os/packages/ai-chat-ui
mawkone 8bb5110148
Some checks failed
Playwright Tests / Playwright Tests (ubuntu-22.04, Node.js 22.x) (push) Has been cancelled
3PP License Check / 3PP License Check (11, 22.x, ubuntu-22.04) (push) Has been cancelled
Publish packages to NPM / Perform Publishing (push) Has been cancelled
deploy: current vibn theia state
Made-with: Cursor
2026-02-27 12:01:08 -08:00
..
2026-02-27 12:01:08 -08:00
2026-02-27 12:01:08 -08:00
2026-02-27 12:01:08 -08:00
2026-02-27 12:01:08 -08:00


theia-ext-logo

ECLIPSE THEIA - AI CHAT UI EXTENSION


Description

The @theia/ai-chat-ui extension contributes the AI Chat view.
The AI Chat view can be used to easily communicate with a language model.

It is based on @theia/ai-chat.

Custom Tool Renderers

To create a specialized renderer for a specific tool, implement the ChatResponsePartRenderer interface with a higher priority than the default ToolCallPartRenderer (priority 10):

@injectable()
export class MyToolRenderer implements ChatResponsePartRenderer<ToolCallChatResponseContent> {
    canHandle(response: ChatResponseContent): number {
        if (ToolCallChatResponseContent.is(response) && response.name === 'my_tool_id') {
            return 15;
        }
        return -1;
    }

    render(response: ToolCallChatResponseContent, parentNode: ResponseNode): ReactNode {
        // Custom rendering logic
    }
}

For custom confirmation UIs, use the ToolConfirmationActions component to reuse the standard Allow/Deny buttons with dropdown options:

import { ToolConfirmationActions } from '@theia/ai-chat-ui/lib/browser/chat-response-renderer/tool-confirmation';

<ToolConfirmationActions
    toolName="my_tool"
    toolRequest={toolRequest}
    onAllow={(mode) => response.confirm()}
    onDeny={(mode) => response.deny()}
/>

Additional Information

License

Trademark

"Theia" is a trademark of the Eclipse Foundation https://www.eclipse.org/theia