File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ import { TextAttributes } from '@opentui/core'
2+
3+ import { useTheme } from '../../hooks/use-theme'
4+ import { defineToolComponent } from './types'
5+
6+ import type { ToolRenderConfig } from './types'
7+
8+ const TaskCompleteItem = ( ) => {
9+ const theme = useTheme ( )
10+ const bulletChar = '• '
11+
12+ return (
13+ < box style = { { flexDirection : 'row' , alignItems : 'center' , width : '100%' } } >
14+ < text style = { { wrapMode : 'word' } } >
15+ < span fg = { theme . foreground } > { bulletChar } </ span >
16+ < span fg = { theme . foreground } attributes = { TextAttributes . BOLD } >
17+ Task Complete
18+ </ span >
19+ </ text >
20+ </ box >
21+ )
22+ }
23+
24+ /**
25+ * UI component for task_completed tool.
26+ * Displays a simple bullet point with "Task Complete" in bold.
27+ */
28+ export const TaskCompleteComponent = defineToolComponent ( {
29+ toolName : 'task_completed' ,
30+
31+ render ( toolBlock , theme , options ) : ToolRenderConfig | null {
32+ return {
33+ content : < TaskCompleteItem /> ,
34+ }
35+ } ,
36+ } )
You can’t perform that action at this time.
0 commit comments