Skip to content

Commit 0a9114c

Browse files
committed
refactor: clean up unused imports and type references
- remove unused ProgressState, getOpenCodeSettingsPath, ResumeDecision, and TemplateTracking types - rename parseSimpleToml to _parseSimpleToml to indicate internal use - fix optional chaining in signal handlers and type assertions
1 parent 476da47 commit 0a9114c

File tree

11 files changed

+11
-15
lines changed

11 files changed

+11
-15
lines changed

src/cli/tui/routes/onboard/onboard-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ export function OnboardView(props: OnboardViewProps) {
392392
>
393393
<Show when={currentStep() === 'launching' && props.service && props.eventBus}>
394394
<LaunchingView
395-
controllerName={props.service!.getSelectedController()?.name ?? 'controller'}
395+
controllerName={(props.service!.getSelectedController()?.name as string) ?? 'controller'}
396396
eventBus={props.eventBus!}
397397
service={props.service!}
398398
/>

src/infra/engines/providers/opencode/mcp.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
configureOpenCodeMCP,
1111
removeOpenCodeMCP,
1212
isOpenCodeMCPConfigured,
13-
getOpenCodeSettingsPath,
1413
} from '../../../mcp/index.js';
1514

1615
/**

src/infra/mcp/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export function getCodexSettingsPath(
189189
/**
190190
* Parse simple TOML (enough for our config.toml needs)
191191
*/
192-
function parseSimpleToml(content: string): string {
192+
function _parseSimpleToml(content: string): string {
193193
// Just return the content, we'll append to it
194194
return content;
195195
}

src/workflows/events/emitter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import type {
1515
AgentInfo,
1616
SeparatorInfo,
1717
WorkflowEvent,
18-
ProgressState,
1918
} from './types.js';
2019
import type {
2120
AgentStatus,

src/workflows/indexing/debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import { debug as baseDebug } from '../../shared/logging/logger.js';
9-
import type { StepData, ResumeInfo, StepLifecyclePhase, ResumeDecision } from './types.js';
9+
import type { StepData, ResumeInfo, StepLifecyclePhase } from './types.js';
1010

1111
/**
1212
* Log a step lifecycle event

src/workflows/indexing/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Manages both in-memory state and persistence to template.json.
66
*/
77

8-
import type { StepData, TemplateTracking, ResumeInfo } from './types.js';
8+
import type { StepData, ResumeInfo } from './types.js';
99
import type { QueuedPrompt } from '../state/types.js';
1010
import { ResumeDecision, StepLifecyclePhase } from './types.js';
1111
import { readTrackingData, writeTrackingData } from './persistence.js';

src/workflows/onboarding/service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { debug } from '../../shared/logging/logger.js';
1010
import type { WorkflowEventBus } from '../events/event-bus.js';
1111
import type { OnboardConfig, OnboardResult, OnboardStep } from '../events/types.js';
12-
import type { TracksConfig, ConditionGroup, ChildConditionGroup } from '../templates/types.js';
12+
import type { TracksConfig, ConditionGroup } from '../templates/types.js';
1313
import type { AgentDefinition } from '../../shared/agents/config/types.js';
1414
import { OnboardingEmitter } from './emitter.js';
1515
import { initControllerAgent } from '../../shared/workflows/controller.js';
@@ -168,7 +168,7 @@ export class OnboardingService {
168168
*/
169169
selectCondition(conditionId: string): void {
170170
const step = this.state.currentStep;
171-
const isChild = step === 'condition_child';
171+
const _isChild = step === 'condition_child';
172172
const groupIndex = this.state.currentGroupIndex;
173173

174174
if (step === 'condition_group') {
@@ -256,7 +256,7 @@ export class OnboardingService {
256256
return;
257257
}
258258

259-
const controllerName = agent.name;
259+
const controllerName = agent.name as string;
260260
debug('[OnboardingService] launching controller: "%s"', controllerName);
261261

262262
// Emit launching started
@@ -380,7 +380,7 @@ export class OnboardingService {
380380
case 'controller':
381381
return (this.config.controllerAgents ?? []).map((a) => [
382382
a.id,
383-
{ label: a.name, description: a.description as string | undefined },
383+
{ label: a.name as string, description: a.description as string | undefined },
384384
]);
385385
default:
386386
return [];

src/workflows/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
getSelectedTrack,
1818
getSelectedConditions,
1919
} from '../shared/workflows/index.js';
20-
import { StepIndexManager, ResumeDecision } from './indexing/index.js';
20+
import { StepIndexManager } from './indexing/index.js';
2121
import { registry } from '../infra/engines/index.js';
2222
import { MonitoringCleanup } from '../agents/monitoring/index.js';
2323
import { WorkflowEventBus, WorkflowEventEmitter } from './events/index.js';

src/workflows/runner/delegated.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
*/
77

88
import { debug } from '../../shared/logging/logger.js';
9-
import { formatUserInput } from '../../shared/formatters/outputMarkers.js';
10-
import { AgentLoggerService } from '../../agents/monitoring/index.js';
119
import type { InputContext } from '../input/index.js';
1210
import { getUniqueAgentId } from '../context/index.js';
1311
import { runStepResume } from '../step/run.js';

src/workflows/signals/handlers/pause.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function handlePauseSignal(ctx: SignalContext): Promise<void> {
5454
// Continue to pause logic below (don't return early)
5555
}
5656

57-
if (ctx.machine.state === 'running' || ctx.machine.state === 'delegated') {
57+
if (ctx.machine.state === 'running') {
5858
// Update UI status
5959
ctx.emitter.updateAgentStatus(stepContext.agentId, 'awaiting');
6060

0 commit comments

Comments
 (0)