Skip to content

Commit f054796

Browse files
committed
Add task complete tool
1 parent 4e18b51 commit f054796

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
})

0 commit comments

Comments
 (0)