MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / parseChatToolCall

Function parseChatToolCall

src/windsurf.js:1100–1110  ·  view source on GitHub ↗
(buf)

Source from the content-addressed store, hash-verified

1098 // 50 tool_call_choice → {1=repeated ChatToolCall, 2=choice, 3=reason}
1099 // ChatToolCall (codeium_common_pb): 1=id, 2=name, 3=arguments_json
1100 const parseChatToolCall = (buf) => {
1101 const f = parseFields(buf);
1102 const id = getField(f, 1, 2);
1103 const name = getField(f, 2, 2);
1104 const args = getField(f, 3, 2);
1105 return {
1106 id: id ? id.value.toString('utf8') : '',
1107 name: name ? name.value.toString('utf8') : '',
1108 argumentsJson: args ? args.value.toString('utf8') : '',
1109 };
1110 };
1111 const customField = getField(sf, 45, 2);
1112 if (customField) {
1113 const cf = parseFields(customField.value);

Callers 1

parseTrajectoryStepsFunction · 0.85

Calls 2

parseFieldsFunction · 0.90
getFieldFunction · 0.90

Tested by

no test coverage detected