@@ -16,6 +16,7 @@ export type ToolName =
1616 | 'read_docs'
1717 | 'read_files'
1818 | 'read_subtree'
19+ | 'render_ui'
1920 | 'run_file_change_hooks'
2021 | 'run_terminal_command'
2122 | 'set_messages'
@@ -47,6 +48,7 @@ export interface ToolParamsMap {
4748 read_docs : ReadDocsParams
4849 read_files : ReadFilesParams
4950 read_subtree : ReadSubtreeParams
51+ render_ui : RenderUiParams
5052 run_file_change_hooks : RunFileChangeHooksParams
5153 run_terminal_command : RunTerminalCommandParams
5254 set_messages : SetMessagesParams
@@ -179,10 +181,10 @@ export interface ProposeStrReplaceParams {
179181 /** Array of replacements to make. */
180182 replacements : {
181183 /** The string to replace. This must be an *exact match* of the string you want to replace, including whitespace and punctuation. */
182- old : string
183- /** The string to replace the corresponding old string with. Can be empty to delete. */
184- new : string
185- /** Whether to allow multiple replacements of old string . */
184+ oldString : string
185+ /** The string to replace the corresponding oldString with. Can be empty to delete. */
186+ newString : string
187+ /** Whether to allow multiple replacements of oldString . */
186188 allowMultiple ?: boolean
187189 } [ ]
188190}
@@ -229,6 +231,23 @@ export interface ReadSubtreeParams {
229231 maxTokens ?: number
230232}
231233
234+ /**
235+ * Render a small interactive UI widget in the Codebuff CLI. Currently supports a button that opens a link.
236+ */
237+ export interface RenderUiParams {
238+ /** The UI widget to render. */
239+ widget : {
240+ /** Widget type. Currently, the only supported widget is button. */
241+ type : 'button'
242+ /** Short button label shown to the user. */
243+ text : string
244+ /** The http:// or https:// URL to open when the user clicks the button. */
245+ link : string
246+ /** Theme-aware color treatment. Use primary for the main action and secondary for lower-emphasis actions. */
247+ variant ?: 'primary' | 'secondary'
248+ }
249+ }
250+
232251/**
233252 * Parameters for run_file_change_hooks tool
234253 */
@@ -286,10 +305,10 @@ export interface StrReplaceParams {
286305 /** Array of replacements to make. */
287306 replacements : {
288307 /** The string to replace. This must be an *exact match* of the string you want to replace, including whitespace and punctuation. */
289- old : string
290- /** The string to replace the corresponding old string with. Can be empty to delete. */
291- new : string
292- /** Whether to allow multiple replacements of old string . */
308+ oldString : string
309+ /** The string to replace the corresponding oldString with. Can be empty to delete. */
310+ newString : string
311+ /** Whether to allow multiple replacements of oldString . */
293312 allowMultiple ?: boolean
294313 } [ ]
295314}
0 commit comments