mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-10 22:55:16 -05:00
* Add exa to search online tool * Larger font size * Copilot UI improvements * Fix models options * Add haiku 4.5 to copilot * Model ui for haiku * Fix lint * Revert * Only allow one revert to message * Clear diff on revert * Fix welcome screen flash * Add focus onto the user input box when clicked * Fix grayout of new stream on old edit message * Lint * Make edit message submit smoother * Allow message sent while streaming * Revert popup improvements: gray out stuff below, show cursor on revert * Fix lint * Improve chat history dropdown * Improve get block metadata tool * Update update cost route * Fix env * Context usage endpoint * Make chat history scrollable * Fix lint * Copilot revert popup updates * Fix lint * Fix tests and lint * Add summary tool * Fix env.ts
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import { Loader2, MinusCircle, PencilLine, XCircle } from 'lucide-react'
|
|
import {
|
|
BaseClientTool,
|
|
type BaseClientToolMetadata,
|
|
ClientToolCallState,
|
|
} from '@/lib/copilot/tools/client/base-tool'
|
|
|
|
export class SummarizeClientTool extends BaseClientTool {
|
|
static readonly id = 'summarize_conversation'
|
|
|
|
constructor(toolCallId: string) {
|
|
super(toolCallId, SummarizeClientTool.id, SummarizeClientTool.metadata)
|
|
}
|
|
|
|
static readonly metadata: BaseClientToolMetadata = {
|
|
displayNames: {
|
|
[ClientToolCallState.generating]: { text: 'Summarizing conversation', icon: Loader2 },
|
|
[ClientToolCallState.pending]: { text: 'Summarizing conversation', icon: Loader2 },
|
|
[ClientToolCallState.executing]: { text: 'Summarizing conversation', icon: Loader2 },
|
|
[ClientToolCallState.success]: { text: 'Summarized conversation', icon: PencilLine },
|
|
[ClientToolCallState.error]: { text: 'Failed to summarize conversation', icon: XCircle },
|
|
[ClientToolCallState.aborted]: {
|
|
text: 'Aborted summarizing conversation',
|
|
icon: MinusCircle,
|
|
},
|
|
[ClientToolCallState.rejected]: {
|
|
text: 'Skipped summarizing conversation',
|
|
icon: MinusCircle,
|
|
},
|
|
},
|
|
interrupt: undefined,
|
|
}
|
|
|
|
async execute(): Promise<void> {
|
|
return
|
|
}
|
|
}
|