mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 00:04:49 +00:00
Add thinking level persistence and fix UI issues
- Save and restore thinking level when continuing sessions - Fix thinking level confirmation message spacing and styling - Fix thinking text wrapping to preserve ANSI formatting across lines
This commit is contained in:
parent
159075cad7
commit
7beb354337
4 changed files with 37 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Agent, ProviderTransport } from "@mariozechner/pi-agent";
|
||||
import { Agent, ProviderTransport, type ThinkingLevel } from "@mariozechner/pi-agent";
|
||||
import { getModel } from "@mariozechner/pi-ai";
|
||||
import chalk from "chalk";
|
||||
import { readFileSync } from "fs";
|
||||
|
|
@ -227,6 +227,13 @@ export async function main(args: string[]) {
|
|||
console.log(chalk.dim(`Loaded ${messages.length} messages from previous session`));
|
||||
agent.replaceMessages(messages);
|
||||
}
|
||||
|
||||
// Load and restore thinking level
|
||||
const thinkingLevel = sessionManager.loadThinkingLevel() as ThinkingLevel;
|
||||
if (thinkingLevel && thinkingLevel !== "off") {
|
||||
agent.setThinkingLevel(thinkingLevel);
|
||||
console.log(chalk.dim(`Restored thinking level: ${thinkingLevel}`));
|
||||
}
|
||||
}
|
||||
|
||||
// Start session
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue