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

Function emitThink

ui/src/composables/useAgentLoop.ts:114–126  ·  view source on GitHub ↗
(event: Partial<ThinkAloudEvent>)

Source from the content-addressed store, hash-verified

112 * 发送思考事件
113 */
114 const emitThink = (event: Partial<ThinkAloudEvent>) => {
115 const fullEvent: ThinkAloudEvent = {
116 id: generateId("think"),
117 stage: event.stage || "Thinking",
118 reasoning: event.reasoning || "",
119 decision: event.decision || "",
120 timestamp: new Date().toISOString(),
121 ...event,
122 };
123
124 config.onThink?.(fullEvent);
125 return fullEvent;
126 };
127
128 /**
129 * 执行 Agent Loop

Callers 3

executeFunction · 0.85
approveAndResumeFunction · 0.85
rejectToolFunction · 0.85

Calls 1

generateIdFunction · 0.90

Tested by

no test coverage detected