fix(cli): satisfy lint on ao open changes
- replace inline `import("node:child_process")` type annotation in vi.mock
with a top-of-file `import type * as ChildProcess` (consistent-type-imports)
- drop the `[]` initializer on `sessionsToOpen` since every branch assigns
before any read (no-useless-assignment)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
d04fad33ab
commit
32345ba856
|
|
@ -1,3 +1,4 @@
|
|||
import type * as ChildProcess from "node:child_process";
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
|
||||
|
||||
const {
|
||||
|
|
@ -21,7 +22,7 @@ const {
|
|||
}));
|
||||
|
||||
vi.mock("node:child_process", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("node:child_process")>();
|
||||
const actual = await importOriginal<typeof ChildProcess>();
|
||||
return { ...actual, spawn: mockSpawn };
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export function registerOpen(program: Command): void {
|
|||
// live sessions. For a named lookup the user is asking about a specific
|
||||
// session, so we keep terminated ones in scope and open the dashboard
|
||||
// so they can read the transcript even if the agent has died.
|
||||
let sessionsToOpen: Session[] = [];
|
||||
let sessionsToOpen: Session[];
|
||||
|
||||
if (!target || target === "all") {
|
||||
sessionsToOpen = all.filter((s) => !isTerminalSession(s));
|
||||
|
|
|
|||
Loading…
Reference in New Issue