mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
Align user-facing vocabulary
This commit is contained in:
parent
35af82b5ed
commit
d544791b3a
12 changed files with 18 additions and 18 deletions
|
|
@ -50,7 +50,7 @@ For context outside the current composer, use `/refer <thread> <message>` to sen
|
|||
|
||||
Completions cover slash commands, `$skill-name` skills, Obsidian tags, recent threads, models, reasoning levels, and permission profiles. Use `/help` for the current command list.
|
||||
|
||||
While a turn is running, the panel streams the conversation, reasoning, tool activity, file changes, plans, and agent activity. You can answer Codex questions, approve commands, respond to requests, steer or interrupt the turn, and manage active goals above the message stream.
|
||||
While a turn is running, the panel streams the conversation, reasoning, tool activity, file changes, plans, and agent activity. You can answer Codex questions, approve commands, respond to requests, steer or interrupt the turn, and manage active goals above the conversation.
|
||||
|
||||
When Codex changes files, open an Obsidian diff view to review the changes and copy the patch. For a focused note edit, select Markdown text and run **Codex Panel: Rewrite selection** to ask Codex for a replacement and review a selection-scoped diff before applying it.
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ async function referencedThreadInput(
|
|||
const turns = await readReferencedThreadConversationSummaries(client, thread.id, REFERENCED_THREAD_TURN_LIMIT);
|
||||
if (host.currentClient() !== client) return null;
|
||||
if (turns.length === 0) {
|
||||
host.addSystemMessage("Referenced thread has no readable conversation turns.");
|
||||
host.addSystemMessage("Referenced thread has no readable turns.");
|
||||
return null;
|
||||
}
|
||||
const messageInput = host.prepareInput(message, snapshot);
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import { chatTurnBusy } from "../turns/turn-state";
|
|||
import type { ThreadMutationTransport } from "./thread-mutation-transport";
|
||||
|
||||
const STATUS_COMPACTION_REQUESTED = "Compaction requested.";
|
||||
const STATUS_ROLLBACK_STARTING = "Rolling back latest turn...";
|
||||
const STATUS_ROLLBACK_COMPLETE = "Rolled back latest turn.";
|
||||
const STATUS_ROLLBACK_FAILED = "Rollback failed.";
|
||||
const STATUS_ROLLBACK_STARTING = "Rolling back the latest turn...";
|
||||
const STATUS_ROLLBACK_COMPLETE = "Rolled back the latest turn.";
|
||||
const STATUS_ROLLBACK_FAILED = "Could not roll back the latest turn.";
|
||||
|
||||
export interface ThreadManagementActionsHost {
|
||||
stateStore: ChatStateStore;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ function pendingUserInputViewModel(input: PendingUserInput): PendingUserInputVie
|
|||
return {
|
||||
requestId: input.requestId,
|
||||
title: "Codex needs input",
|
||||
body: `Answer ${String(input.params.questions.length)} Plan mode question${input.params.questions.length === 1 ? "" : "s"} to continue.`,
|
||||
body: `Answer ${String(input.params.questions.length)} question${input.params.questions.length === 1 ? "" : "s"} to continue.`,
|
||||
questions: input.params.questions.map((question) => ({
|
||||
id: question.id,
|
||||
header: question.header,
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ export function contextSummary(snapshot: RuntimeSnapshot): ContextSummary | null
|
|||
const percent = contextWindow ? Math.min(100, Math.round((used / contextWindow) * 100)) : null;
|
||||
const level = percent !== null && percent >= 90 ? "danger" : percent !== null && percent >= 70 ? "warn" : "ok";
|
||||
const title = contextWindow
|
||||
? `Context: ${formatTokenCount(used)} / ${formatTokenCount(contextWindow)} (${String(percent)}%). Last request: ${formatTokenCount(usage.last.inputTokens)} input, ${formatTokenCount(usage.last.outputTokens)} output, ${formatTokenCount(usage.last.reasoningOutputTokens)} reasoning. Total: ${formatTokenCount(usage.total.totalTokens)} tokens.`
|
||||
: `Context: ${formatTokenCount(used)} tokens. Last request: ${formatTokenCount(usage.last.totalTokens)} total. Total: ${formatTokenCount(usage.total.totalTokens)} tokens.`;
|
||||
? `Context: ${formatTokenCount(used)} / ${formatTokenCount(contextWindow)} (${String(percent)}%). Latest usage: ${formatTokenCount(usage.last.inputTokens)} input, ${formatTokenCount(usage.last.outputTokens)} output, ${formatTokenCount(usage.last.reasoningOutputTokens)} reasoning. Total: ${formatTokenCount(usage.total.totalTokens)} tokens.`
|
||||
: `Context: ${formatTokenCount(used)} tokens. Latest usage: ${formatTokenCount(usage.last.totalTokens)} total. Total: ${formatTokenCount(usage.total.totalTokens)} tokens.`;
|
||||
return {
|
||||
label: percent === null ? `${formatTokenCount(used)} tokens` : `Context ${String(percent)}%`,
|
||||
title,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ function PendingRequestBlock({
|
|||
if (!hasPendingRequests(pendingRequestCountsFromQueues({ approvals, pendingUserInputs, pendingMcpElicitations }))) return null;
|
||||
return (
|
||||
<div ref={requestRef} className={createStatusStreamItemClassName("codex-panel__pending-request-block", "warning")}>
|
||||
<div className="codex-panel__stream-item-role">Request</div>
|
||||
<div className="codex-panel__stream-item-role">Codex request</div>
|
||||
{approvals.map((approval) => (
|
||||
<ApprovalCard key={String(approval.requestId)} approval={approval} approvalDetails={approvalDetails} actions={actions} />
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ function TextHeader({ view, context }: { view: ThreadStreamTextView; context: Te
|
|||
{rollback ? (
|
||||
<TextAction
|
||||
icon="undo-2"
|
||||
label="Rollback last turn"
|
||||
label="Roll back latest turn"
|
||||
className="codex-panel__rollback-turn"
|
||||
onClick={() => context.onRollback?.()}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ function ComposerSettingsSection({ panel, actions }: { panel: SettingsTabPanelSt
|
|||
/>
|
||||
</SettingRow>
|
||||
<SettingRow
|
||||
name="Scroll thread from composer line edges"
|
||||
desc="Lets Up/Ctrl+P and Down/Ctrl+N scroll the thread from composer line edges."
|
||||
name="Scroll conversation from composer line edges"
|
||||
desc="Lets Up/Ctrl+P and Down/Ctrl+N scroll the conversation from composer line edges."
|
||||
>
|
||||
<ObsidianToggle checked={panel.scrollThreadFromComposerEdges} onChange={actions.setScrollThreadFromComposerEdges} />
|
||||
</SettingRow>
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ describe("thread stream rendering and action menu", () => {
|
|||
expect(expectPresent(rendered[0]).querySelector(".codex-panel__rollback-turn")).toBeNull();
|
||||
expect(expectPresent(rendered[1]).querySelector(".codex-panel__rollback-turn")).toBeNull();
|
||||
const button = expectPresent(rendered[2]).querySelector<HTMLButtonElement>(".codex-panel__rollback-turn");
|
||||
expect(button?.getAttribute("aria-label")).toBe("Rollback last turn");
|
||||
expect(button?.getAttribute("aria-label")).toBe("Roll back latest turn");
|
||||
button?.click();
|
||||
expect(onRollback).toHaveBeenCalledWith();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ describe("pending request renderer decisions", () => {
|
|||
expect(actions.setUserInputDraft).toHaveBeenCalledWith("99:scope", "日本");
|
||||
});
|
||||
|
||||
it("renders pending approvals and Plan mode questions in the same request block", () => {
|
||||
it("renders pending approvals and user input questions in the same request block", () => {
|
||||
const parent = document.createElement("div");
|
||||
const approval = pendingApproval();
|
||||
const input = pendingUserInput();
|
||||
|
|
|
|||
|
|
@ -802,7 +802,7 @@ describe("runtime settings", () => {
|
|||
}),
|
||||
),
|
||||
).toMatchObject({
|
||||
title: "Context: 1,000 / 100,000 (1%). Last request: 1,000 input, 200 output, 50 reasoning. Total: 2,600 tokens.",
|
||||
title: "Context: 1,000 / 100,000 (1%). Latest usage: 1,000 input, 200 output, 50 reasoning. Total: 2,600 tokens.",
|
||||
});
|
||||
expect(
|
||||
contextSummary(
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ describe("settings tab", () => {
|
|||
"Selection rewrite",
|
||||
"Composer",
|
||||
"Send shortcut",
|
||||
"Scroll thread from composer line edges",
|
||||
"Scroll conversation from composer line edges",
|
||||
"Reference active file on send",
|
||||
"Attachment folder",
|
||||
"Web clipping",
|
||||
|
|
@ -129,7 +129,7 @@ describe("settings tab", () => {
|
|||
const tab = newSettingsTab({ saveSettings });
|
||||
|
||||
tab.display();
|
||||
const toggle = inputForSetting(tab, "Scroll thread from composer line edges");
|
||||
const toggle = inputForSetting(tab, "Scroll conversation from composer line edges");
|
||||
if (!toggle) throw new Error("Missing composer line edge scroll toggle");
|
||||
expect(toggle.parentElement?.classList.contains("checkbox-container")).toBe(true);
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ describe("settings tab", () => {
|
|||
await flushPromises();
|
||||
|
||||
expect(saveSettings).toHaveBeenCalledOnce();
|
||||
expect(settingDesc(tab, "Scroll thread from composer line edges")).toContain("Up/Ctrl+P");
|
||||
expect(settingDesc(tab, "Scroll conversation from composer line edges")).toContain("Up/Ctrl+P");
|
||||
});
|
||||
|
||||
it("saves the active file reference setting", async () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue