Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/companion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ export async function main(): Promise<void> {
// Cormini's 6/12 end a computer-use task partway through; 20/40 are the caps the desktop-pet
// e2e harnesses give their persona
rounds: { soft: 20, hard: 40 },
context: { ...base.definition.defaults().context, maxTokens: 128_000, keepRatio: 0.25 },
companion: { telemetry: true },
}),
// Cormini's own build with Coo's Persona class; the workspace is snapshotted before Coo can write to it
Expand Down Expand Up @@ -641,4 +642,10 @@ export async function main(): Promise<void> {
log.emit('error', '未处理的 promise 拒绝', { event: 'unhandled-rejection', err: reason });
crash('core-rejection', reason);
});
// an exited main loop delivers nothing more; the app restarts a Core process that exits on its own
bot.core.runlog.onWrite((entry) => {
if (entry.event !== 'loop-exit') return;
crash('core-loop', entry.err && Object.assign(new Error(entry.err.message), entry.err));
void shutdown('主循环异常退出');
});
}
Loading