mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 11:02:06 +00:00
Enable thinking selector in MessageEditor
- Import Select component from mini-lit and Brain icon from lucide - Add thinkingLevel property to track current thinking level (off/minimal/low/medium/high) - Enable showThinkingSelector (was disabled before) - Add onThinkingChange callback for thinking level changes - Render Select component with thinking level options when model supports reasoning - Position thinking selector on left side next to attachment button - Add i18n translations for Off/Minimal/Low/Medium/High in English and German - Rename showThinking → showThinkingSelector in AgentInterface and ChatPanel for consistency - Remove showDebugToggle property from AgentInterface (unused) - Clean up browser-javascript tool output message (remove CSP note)
This commit is contained in:
parent
414a4eb8fd
commit
53e339ddb8
5 changed files with 54 additions and 12 deletions
|
|
@ -21,9 +21,8 @@ export class AgentInterface extends LitElement {
|
|||
@property({ attribute: false }) session?: AgentSession;
|
||||
@property() enableAttachments = true;
|
||||
@property() enableModelSelector = true;
|
||||
@property() enableThinking = true;
|
||||
@property() enableThinkingSelector = true;
|
||||
@property() showThemeToggle = false;
|
||||
@property() showDebugToggle = false;
|
||||
// Optional custom API key prompt handler - if not provided, uses default dialog
|
||||
@property({ attribute: false }) onApiKeyRequired?: (provider: string) => Promise<boolean>;
|
||||
|
||||
|
|
@ -286,7 +285,7 @@ export class AgentInterface extends LitElement {
|
|||
.thinkingLevel=${state.thinkingLevel}
|
||||
.showAttachmentButton=${this.enableAttachments}
|
||||
.showModelSelector=${this.enableModelSelector}
|
||||
.showThinking=${this.enableThinking}
|
||||
.showThinkingSelector=${this.enableThinkingSelector}
|
||||
.onSend=${(input: string, attachments: Attachment[]) => {
|
||||
this.sendMessage(input, attachments);
|
||||
}}
|
||||
|
|
@ -295,7 +294,7 @@ export class AgentInterface extends LitElement {
|
|||
ModelSelector.open(state.model, (model) => session.setModel(model));
|
||||
}}
|
||||
.onThinkingChange=${
|
||||
this.enableThinking
|
||||
this.enableThinkingSelector
|
||||
? (level: "off" | "minimal" | "low" | "medium" | "high") => {
|
||||
session.setThinkingLevel(level);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue