refactor(dashboard,desktop,engine): remove unused imports, props, and locals
Clears the remaining no-unused-vars warnings across the dashboard app and server, desktop main, and engine sources. Dead React state destructures are collapsed to setter-only, unused props are underscore-prefixed to preserve API shape, and unreferenced catch bindings are dropped. No behaviour change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1073,8 +1073,8 @@ export class HeartbeatMonitor {
|
||||
},
|
||||
};
|
||||
|
||||
// Lazy-load createFnAgent and promptWithFallback
|
||||
const { createFnAgent, promptWithFallback } = await import("./pi.js");
|
||||
// Lazy-load promptWithFallback
|
||||
const { promptWithFallback } = await import("./pi.js");
|
||||
const { createResolvedAgentSession } = await import("./agent-session-helpers.js");
|
||||
const { buildSessionSkillContextSync } = await import("./session-skill-context.js");
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* creation and prompting.
|
||||
*/
|
||||
|
||||
import type { AgentRuntimeOptions, AgentSessionResult } from "./agent-runtime.js";
|
||||
import type { AgentRuntimeOptions } from "./agent-runtime.js";
|
||||
import type { PluginRunner } from "./plugin-runner.js";
|
||||
import type { AgentSession } from "@mariozechner/pi-coding-agent";
|
||||
import { resolveRuntime, buildRuntimeResolutionContext, type SessionPurpose } from "./runtime-resolution.js";
|
||||
|
||||
@@ -157,10 +157,6 @@ function agentDreamsDisplayPath(agentId: string): string {
|
||||
return `${AGENT_MEMORY_ROOT}/${sanitizeAgentMemoryId(agentId)}/${AGENT_DREAMS_FILENAME}`;
|
||||
}
|
||||
|
||||
function agentDailyDisplayPath(agentId: string, date = new Date()): string {
|
||||
return `${AGENT_MEMORY_ROOT}/${sanitizeAgentMemoryId(agentId)}/${date.toISOString().slice(0, 10)}.md`;
|
||||
}
|
||||
|
||||
function agentMemoryDirectory(rootDir: string, agentId: string): string {
|
||||
return join(rootDir, AGENT_MEMORY_ROOT, sanitizeAgentMemoryId(agentId));
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { findWorktreeUser } from "./merger.js";
|
||||
import { generateWorktreeName, slugify } from "./worktree-names.js";
|
||||
import { Type, type Static } from "@mariozechner/pi-ai";
|
||||
import { describeModel, promptWithFallback, compactSessionContext } from "./pi.js";
|
||||
import { createResolvedAgentSession, describeAgentModel } from "./agent-session-helpers.js";
|
||||
import { createResolvedAgentSession } from "./agent-session-helpers.js";
|
||||
import { buildSessionSkillContext } from "./session-skill-context.js";
|
||||
import { reviewStep, type ReviewVerdict } from "./reviewer.js";
|
||||
import { ModelRegistry, SessionManager, type ToolDefinition, type AgentSession } from "@mariozechner/pi-coding-agent";
|
||||
|
||||
@@ -7,7 +7,7 @@ import { existsSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { getTaskMergeBlocker, type TaskStore, type MergeResult, type MergeDetails, type WorkflowStep, type WorkflowStepResult, type Settings, type AgentPromptsConfig } from "@fusion/core";
|
||||
import { resolveAgentPrompt } from "@fusion/core";
|
||||
import { describeModel, promptWithFallback, compactSessionContext } from "./pi.js";
|
||||
import { describeModel, promptWithFallback } from "./pi.js";
|
||||
import { createResolvedAgentSession } from "./agent-session-helpers.js";
|
||||
import { buildSessionSkillContext } from "./session-skill-context.js";
|
||||
import type { WorktreePool } from "./worktree-pool.js";
|
||||
|
||||
@@ -26,7 +26,6 @@ import type {
|
||||
AutopilotStatus,
|
||||
MissionWithHierarchy,
|
||||
Slice,
|
||||
SliceWithFeatures,
|
||||
MissionEventType,
|
||||
} from "@fusion/core";
|
||||
import { autopilotLog } from "./logger.js";
|
||||
|
||||
@@ -249,7 +249,6 @@ export class PeerExchangeService {
|
||||
|
||||
// ── Settings sync: decide whether to include settings in request ──
|
||||
let shouldIncludeSettings = false;
|
||||
let currentVersion: string | undefined;
|
||||
|
||||
if (this.settingsSyncEnabled) {
|
||||
try {
|
||||
@@ -291,7 +290,6 @@ export class PeerExchangeService {
|
||||
}
|
||||
|
||||
if (shouldIncludeSettings) {
|
||||
currentVersion = this.cachedSettingsPayload.checksum;
|
||||
request.settings = this.cachedSettingsPayload;
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
@@ -78,7 +78,6 @@ export async function withRateLimitRetry<T>(
|
||||
try {
|
||||
return await fn();
|
||||
} catch (err: unknown) {
|
||||
const errorMessage = err instanceof Error ? err.message : String(err);
|
||||
const error = err instanceof Error ? err : new Error(String(err));
|
||||
|
||||
// Non-rate-limit errors: re-throw immediately — no retry
|
||||
|
||||
Reference in New Issue
Block a user