chore: 项目基线(基于 WeKnora 定制版,整理文件忽略规则)
This commit is contained in:
commit
9097ee699d
5769 files changed
+1446466
No files matched your search
@@ -0,0 +1,16 @@
|
||||
// Completion is authoritative after sandbox names and version references have
|
||||
// been reconciled. Update both plain content and the Agent timeline.
|
||||
export function applyFinalArtifactContent(message: any, content: unknown): void {
|
||||
if (typeof content !== 'string' || content.trim() === '') return;
|
||||
message.content = content;
|
||||
if (!Array.isArray(message.agentEventStream)) return;
|
||||
const answers = message.agentEventStream.filter((e: any) => e.type === 'answer' && !e.superseded);
|
||||
const last = answers.pop();
|
||||
answers.forEach((e: any) => { e.superseded = true; });
|
||||
if (last) {
|
||||
last.content = content;
|
||||
last.done = true;
|
||||
} else if (content) {
|
||||
message.agentEventStream.push({ type: 'answer', event_id: 'completed-answer', content, done: true });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user