shell: apply 0007, 0010, 0011 — context occupancy, halt register, /new
0007 was fixing a live error: the server has carried named ContextPressure fields since r463, so event.tokens was undefined and the pill assignment failed on every turn. Applied and verified against the running shell. 0010 renders a halt in her own register rather than the tool's name. 0011 renames the reset command to /new, which is what clearMessages() does.
This commit is contained in:
parent
0733bfaff7
commit
6f12fceea9
6 changed files with 102 additions and 295 deletions
|
|
@ -156,8 +156,8 @@ Item {
|
|||
}
|
||||
},
|
||||
{
|
||||
name: "clear",
|
||||
description: Translation.tr("Clear chat history"),
|
||||
name: "new",
|
||||
description: Translation.tr("Start a new conversation"),
|
||||
execute: () => {
|
||||
Ai.clearMessages();
|
||||
}
|
||||
|
|
@ -389,13 +389,27 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
|
|||
description: Translation.tr("Temperature\nChange with /temp VALUE")
|
||||
}
|
||||
StatusSeparator {
|
||||
visible: Ai.tokenCount.total > 0
|
||||
visible: Ai.context.known || Ai.tokenCount.total > 0
|
||||
}
|
||||
StatusItem {
|
||||
visible: Ai.tokenCount.total > 0
|
||||
icon: "token"
|
||||
statusText: Ai.tokenCount.total
|
||||
description: Translation.tr("Context estimate: %1 tokens\n(Local count of the conversation — not the provider's usage numbers)").arg(Ai.tokenCount.total)
|
||||
// Context occupancy. Until 2026-08-12 this pill showed
|
||||
// `event.tokens`, which was actually the model's
|
||||
// ceiling — a constant 250000 presented as usage. Now
|
||||
// it shows both numbers and the ratio between them,
|
||||
// which is the only reading that means anything.
|
||||
visible: Ai.context.known || Ai.tokenCount.total > 0
|
||||
icon: Ai.context.percent >= 85 ? "error"
|
||||
: Ai.context.percent >= 70 ? "warning"
|
||||
: "token"
|
||||
statusText: Ai.context.known
|
||||
? `${Math.round(Ai.context.used / 1000)}k/${Math.round(Ai.context.limit / 1000)}k · ${Ai.context.percent}%`
|
||||
: (Ai.tokenCount.total > 0 ? `${Ai.tokenCount.total}` : "—")
|
||||
description: Ai.context.known
|
||||
? Translation.tr("Context: %1 of %2 tokens (%3%)\nCeiling comes from this agent's configured context window.\nArchivist begins compacting around 70%.")
|
||||
.arg(Ai.context.used.toLocaleString())
|
||||
.arg(Ai.context.limit.toLocaleString())
|
||||
.arg(Ai.context.percent)
|
||||
: Translation.tr("Context occupancy unknown until the next turn reports it.")
|
||||
}
|
||||
StatusSeparator {
|
||||
visible: Souveraine.turnStartedAt > 0
|
||||
|
|
@ -831,7 +845,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
|
|||
dontAddSpace: true
|
||||
},
|
||||
{
|
||||
name: "clear",
|
||||
name: "new",
|
||||
sendDirectly: true
|
||||
},
|
||||
]
|
||||
|
|
@ -894,7 +908,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
|
|||
messageInputField.cursorPosition = messageInputField.text.length;
|
||||
messageInputField.forceActiveFocus();
|
||||
}
|
||||
if (modelData.name === "clear") {
|
||||
if (modelData.name === "new") {
|
||||
messageInputField.text = "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue