mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
Fix lint issues from Obsidian ESLint rules
This commit is contained in:
parent
ae9a95016b
commit
079b9c2500
4 changed files with 6 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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", {
|
||||
|
|
|
|||
Loading…
Reference in a new issue