File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
webview-ui/src/components/chat Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ interface McpExecutionProps {
3131 initiallyExpanded ?: boolean // kilocode_change: For Storybook stories only
3232}
3333
34+ function removeRenamedPrefix_kilocode ( text : string ) : string {
35+ // Remove "renamed_" prefix from property names in JSON (native tool calling)
36+ const prefix = "renamed_"
37+ if ( ! text || ! text . startsWith ( prefix ) ) return text
38+ return text . substring ( prefix . length )
39+ }
40+
3441export const McpExecution = ( {
3542 executionId,
3643 text,
@@ -54,13 +61,6 @@ export const McpExecution = ({
5461 // kilocode_change: Main collapse state for the entire MCP execution content
5562 const [ isResponseExpanded , setIsResponseExpanded ] = useState ( initiallyExpanded )
5663
57- // kilocode_change: Remove "renamed_" prefix from property names in JSON (native tool calling)
58- const removeRenamedPrefix_kilocode = useCallback ( ( text : string ) : string => {
59- const prefix = "renamed_"
60- if ( ! text || ! text . startsWith ( prefix ) ) return text
61- return text . substring ( prefix . length )
62- } , [ ] )
63-
6464 // Try to parse JSON and return both the result and formatted text
6565 const tryParseJson = useCallback ( ( text : string ) : { isJson : boolean ; formatted : string } => {
6666 if ( ! text ) return { isJson : false , formatted : "" }
You can’t perform that action at this time.
0 commit comments