mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-05 23:19:43 +02:00
refactor: split types.ts into domain modules (phase 4, step 1)
Split 1,443-line types.ts into 14 focused domain files under src/types/: common.ts, session.ts, task.ts, app-state.ts, respawn.ts, ralph.ts, api.ts, lifecycle.ts, run-summary.ts, tools.ts, teams.ts, push.ts, plan.ts, and index.ts barrel. Moved PlanItem interface from plan-orchestrator.ts into types/plan.ts to break circular dependency. Original types.ts replaced with barrel re-export — zero changes to 36 import sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @fileoverview Tool-related type definitions
|
||||
*/
|
||||
|
||||
/**
|
||||
* Status of an active Bash tool command.
|
||||
*/
|
||||
export type ActiveBashToolStatus = 'running' | 'completed';
|
||||
|
||||
/**
|
||||
* Represents an active Bash tool command detected in Claude's output.
|
||||
* Used to display clickable file paths for file-viewing commands.
|
||||
*/
|
||||
export interface ActiveBashTool {
|
||||
/** Unique identifier for this tool invocation */
|
||||
id: string;
|
||||
/** The full command being executed */
|
||||
command: string;
|
||||
/** Extracted file paths from the command (clickable) */
|
||||
filePaths: string[];
|
||||
/** Timeout string if specified (e.g., "16m 0s") */
|
||||
timeout?: string;
|
||||
/** Timestamp when the tool started */
|
||||
startedAt: number;
|
||||
/** Current status */
|
||||
status: ActiveBashToolStatus;
|
||||
/** Session ID this tool belongs to */
|
||||
sessionId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event emitted when a new image file is detected in a session's working directory.
|
||||
* Used to trigger automatic image popup display in the web UI.
|
||||
*/
|
||||
export interface ImageDetectedEvent {
|
||||
/** Codeman session ID where the image was detected */
|
||||
sessionId: string;
|
||||
/** Full path to the detected image file */
|
||||
filePath: string;
|
||||
/** Path relative to the session's working directory (for file-raw endpoint) */
|
||||
relativePath: string;
|
||||
/** Image file name (basename) */
|
||||
fileName: string;
|
||||
/** Timestamp when the image was detected */
|
||||
timestamp: number;
|
||||
/** File size in bytes */
|
||||
size: number;
|
||||
}
|
||||
Reference in New Issue
Block a user