fix(coding-agent): fixed context usage tracking to keep status and selector totals in sync
- Added context snapshot metadata to AssistantMessage for prompt and non-message token history. - Anchored context usage calculations on assistant snapshots and computed percent numerically. - Updated status-line, /context, selector, and interactive mode flows to share session usage totals. - Extended status-line cache fingerprinting and invalidation for assistant usage and prompt/tool/skill changes.
This commit is contained in:
@@ -17,7 +17,12 @@ import { formatDuration, getProjectDir } from "@oh-my-pi/pi-utils";
|
||||
import chalk from "chalk";
|
||||
import type { ApiKeyResolverModel } from "../config/api-key-resolver";
|
||||
import { type CanonicalModelQueryOptions, ModelRegistry } from "../config/model-registry";
|
||||
import { formatModelSelectorValue, formatModelString, getModelMatchPreferences, resolveCliModel } from "../config/model-resolver";
|
||||
import {
|
||||
formatModelSelectorValue,
|
||||
formatModelString,
|
||||
getModelMatchPreferences,
|
||||
resolveCliModel,
|
||||
} from "../config/model-resolver";
|
||||
import { Settings } from "../config/settings";
|
||||
import benchPrompt from "../prompts/bench.md" with { type: "text" };
|
||||
import { discoverAuthStorage } from "../sdk";
|
||||
|
||||
Reference in New Issue
Block a user