MCPcopy Create free account
hub / github.com/astercloud/aster / updateTool

Function updateTool

ui/src/stores/tools.ts:41–55  ·  view source on GitHub ↗
(id: string, updates: Partial<ToolCallSnapshot>)

Source from the content-addressed store, hash-verified

39 * 更新工具状态(细粒度更新)
40 */
41 const updateTool = (id: string, updates: Partial<ToolCallSnapshot>) => {
42 const prev =
43 toolRuns.value.get(id) ||
44 ({
45 id,
46 name: "",
47 state: "pending",
48 } as ToolCallSnapshot);
49
50 toolRuns.value.set(id, {
51 ...prev,
52 ...updates,
53 updated_at: new Date().toISOString(),
54 });
55 };
56
57 /**
58 * 处理工具开始事件

Callers 4

handleToolProgressFunction · 0.85
handleToolIntermediateFunction · 0.85
handleToolErrorFunction · 0.85
handleToolCancelledFunction · 0.85

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected