mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
chore: Fix all 246 TypeScript errors in UI
- Extended SetupAPI interface with 20+ missing methods for Cursor, Codex, OpenCode, Gemini, and Copilot CLI integrations - Fixed WorktreeInfo type to include isCurrent and hasWorktree fields - Added null checks for optional API properties across all hooks - Fixed Feature type conflicts between @automaker/types and local definitions - Added missing CLI status hooks for all providers - Fixed type mismatches in mutation callbacks and event handlers - Removed dead code referencing non-existent GlobalSettings properties - Updated mock implementations in electron.ts for all new API methods Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import type {
|
||||
ModelAlias,
|
||||
PlanningMode,
|
||||
ThinkingLevel,
|
||||
ReasoningEffort,
|
||||
ModelProvider,
|
||||
CursorModelId,
|
||||
CodexModelId,
|
||||
@@ -63,6 +64,7 @@ export type {
|
||||
ModelAlias,
|
||||
PlanningMode,
|
||||
ThinkingLevel,
|
||||
ReasoningEffort,
|
||||
ModelProvider,
|
||||
ServerLogLevel,
|
||||
FeatureTextFilePath,
|
||||
@@ -460,7 +462,17 @@ export type ClaudeModel = 'opus' | 'sonnet' | 'haiku';
|
||||
|
||||
export interface Feature extends Omit<
|
||||
BaseFeature,
|
||||
'steps' | 'imagePaths' | 'textFilePaths' | 'status' | 'planSpec'
|
||||
| 'steps'
|
||||
| 'imagePaths'
|
||||
| 'textFilePaths'
|
||||
| 'status'
|
||||
| 'planSpec'
|
||||
| 'dependencies'
|
||||
| 'model'
|
||||
| 'branchName'
|
||||
| 'thinkingLevel'
|
||||
| 'reasoningEffort'
|
||||
| 'summary'
|
||||
> {
|
||||
id: string;
|
||||
title?: string;
|
||||
@@ -475,6 +487,12 @@ export interface Feature extends Omit<
|
||||
justFinishedAt?: string; // UI-specific: ISO timestamp when agent just finished
|
||||
prUrl?: string; // UI-specific: Pull request URL
|
||||
planSpec?: PlanSpec; // Explicit planSpec type to override BaseFeature's index signature
|
||||
dependencies?: string[]; // Explicit type to override BaseFeature's index signature
|
||||
model?: string; // Explicit type to override BaseFeature's index signature
|
||||
branchName?: string; // Explicit type to override BaseFeature's index signature
|
||||
thinkingLevel?: ThinkingLevel; // Explicit type to override BaseFeature's index signature
|
||||
reasoningEffort?: ReasoningEffort; // Explicit type to override BaseFeature's index signature
|
||||
summary?: string; // Explicit type to override BaseFeature's index signature
|
||||
}
|
||||
|
||||
// ParsedTask and PlanSpec types are now imported from @automaker/types
|
||||
@@ -665,6 +683,8 @@ export interface AppState {
|
||||
path: string;
|
||||
branch: string;
|
||||
isMain: boolean;
|
||||
isCurrent: boolean;
|
||||
hasWorktree: boolean;
|
||||
hasChanges?: boolean;
|
||||
changedFilesCount?: number;
|
||||
}>
|
||||
@@ -1156,6 +1176,8 @@ export interface AppActions {
|
||||
path: string;
|
||||
branch: string;
|
||||
isMain: boolean;
|
||||
isCurrent: boolean;
|
||||
hasWorktree: boolean;
|
||||
hasChanges?: boolean;
|
||||
changedFilesCount?: number;
|
||||
}>
|
||||
@@ -1165,6 +1187,8 @@ export interface AppActions {
|
||||
path: string;
|
||||
branch: string;
|
||||
isMain: boolean;
|
||||
isCurrent: boolean;
|
||||
hasWorktree: boolean;
|
||||
hasChanges?: boolean;
|
||||
changedFilesCount?: number;
|
||||
}>;
|
||||
@@ -4109,7 +4133,7 @@ export const useAppStore = create<AppState & AppActions>()((set, get) => ({
|
||||
|
||||
try {
|
||||
const api = getElectronAPI();
|
||||
if (!api.setup) {
|
||||
if (!api.setup?.getOpencodeModels) {
|
||||
throw new Error('Setup API not available');
|
||||
}
|
||||
|
||||
@@ -4120,7 +4144,7 @@ export const useAppStore = create<AppState & AppActions>()((set, get) => ({
|
||||
}
|
||||
|
||||
set({
|
||||
dynamicOpencodeModels: result.models || [],
|
||||
dynamicOpencodeModels: (result.models || []) as ModelDefinition[],
|
||||
opencodeModelsLastFetched: Date.now(),
|
||||
opencodeModelsLoading: false,
|
||||
opencodeModelsError: null,
|
||||
|
||||
Reference in New Issue
Block a user