Skip to content

Commit 78c3c4f

Browse files
committed
refactor: split types.ts into domain-specific files
- src/types/common.ts - ApprovalMode, NyxMood, ModelRouting, ProviderCallEntry - src/types/providers.ts - Provider, ProviderConfig, Message, PROVIDERS - src/types/tools.ts - ToolCall, ToolResult, FileDiff - src/types/sessions.ts - Checkpoint, Persona, Theme, SessionState, personas, system prompt - src/types/commands.ts - SlashCommand, SLASH_COMMANDS (60+ commands) - src/types/index.ts - Re-exports for backward compatibility - Updated all 16 import statements across codebase - Fixed SessionState provider type from string to Provider - Fixed apiKeys type from Record<string,string> to Record<Provider,string> types.ts went from 834 lines to 0 (replaced by 5 focused files)
1 parent d0be849 commit 78c3c4f

48 files changed

Lines changed: 392 additions & 45 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dist/providers/client.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Provider, Message, ToolCall, ModelRouting } from '../core/types.js';
1+
import { Provider, Message, ToolCall, ModelRouting } from '../types/index.js';
22
export declare function retryWithBackoff<T>(fn: () => Promise<T>, context: string, signal?: AbortSignal): Promise<T>;
33
export interface StreamChunk {
44
type: 'text' | 'tool_call' | 'tool_result' | 'agent_step' | 'done' | 'error';

dist/providers/client.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/providers/client.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/providers/client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sessions/manager.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SessionState, Checkpoint, Message } from '../core/types.js';
1+
import { SessionState, Checkpoint, Message } from '../types/index.js';
22
export interface HookEntry {
33
matcher?: string;
44
command: string;

dist/sessions/manager.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sessions/manager.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)