diff --git a/src/app-server/client.ts b/src/app-server/client.ts index 0e801c8b..277bbffd 100644 --- a/src/app-server/client.ts +++ b/src/app-server/client.ts @@ -386,7 +386,7 @@ export class AppServerClient { } if ("id" in message && "method" in message) { - this.handlers.onServerRequest(message as ServerRequest); + this.handlers.onServerRequest(message); return; } @@ -407,7 +407,7 @@ export class AppServerClient { } if ("method" in message) { - this.handlers.onNotification(message as ServerNotification); + this.handlers.onNotification(message); } } diff --git a/src/display/model.ts b/src/display/model.ts index 14eeb8ad..8f92aecb 100644 --- a/src/display/model.ts +++ b/src/display/model.ts @@ -636,7 +636,7 @@ export function appendToolOutput( if (index !== -1) { return items.map((item, itemIndex) => itemIndex === index && (item.kind === "tool" || item.kind === "hook" || item.kind === "reasoning") - ? ({ ...item, output: `${item.output ?? ""}${delta}` } as DisplayItem) + ? { ...item, output: `${item.output ?? ""}${delta}` } : item, ); } @@ -667,7 +667,7 @@ export function appendItemOutput( if (index !== -1) { return items.map((item, itemIndex) => itemIndex === index && (item.kind === "command" || item.kind === "fileChange") - ? ({ ...item, output: `${item.output ?? ""}${delta}` } as DisplayItem) + ? { ...item, output: `${item.output ?? ""}${delta}` } : item, ); } diff --git a/src/display/state.ts b/src/display/state.ts index 296896e9..ee31aa87 100644 --- a/src/display/state.ts +++ b/src/display/state.ts @@ -19,10 +19,7 @@ export function executionState(item: DisplayItem): ExecutionState { export function classifyExecutionState(input: { exitCode?: number; status?: unknown }): ExecutionState { if (typeof input.exitCode === "number" && input.exitCode !== 0) return "failed"; - const statusText = [input.status] - .filter((value) => value !== null && value !== undefined) - .join(" ") - .toLowerCase(); + const statusText = typeof input.status === "string" ? input.status.toLowerCase() : ""; if (/(fail|error|errored|notfound|not_found|missing|denied|declin|cancel|reject|aborted)/.test(statusText)) return "failed"; if (/(running|in[_ -]?progress|queued|pending|started)/.test(statusText)) return "running"; diff --git a/src/settings-tab.ts b/src/settings-tab.ts index f11d89f3..2a74e15a 100644 --- a/src/settings-tab.ts +++ b/src/settings-tab.ts @@ -141,7 +141,7 @@ export class CodexPanelSettingTab extends PluginSettingTab { .setClass("codex-panel-settings__dynamic-section-heading") .setHeading() .setName("Archived thread list") - .setDesc("Restore archived Codex threads to Chat History when they are needed again."); + .setDesc("Restore archived Codex threads to chat history when they are needed again."); if (this.archivedThreadsLoading) { archivedSection.createEl("p", {