mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 20:03:37 +00:00
feat(auto-mode): skip memory extraction when Claude not configured and add reasoning effort support
- Skip learning extraction when ANTHROPIC_API_KEY is not available - Add reasoningEffort parameter to simpleQuery for Codex model configuration - Add stdinData support to spawnProcess for CLI stdin input - Update UI API types for model override with reasoning support
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState, useCallback, useMemo } from 'react';
|
||||
import { useAppStore } from '@/store/app-store';
|
||||
import type { ModelAlias, CursorModelId, PhaseModelKey, PhaseModelEntry } from '@automaker/types';
|
||||
import type { ModelId, PhaseModelKey, PhaseModelEntry } from '@automaker/types';
|
||||
import { DEFAULT_PHASE_MODELS } from '@automaker/types';
|
||||
|
||||
export interface UseModelOverrideOptions {
|
||||
@@ -14,7 +14,7 @@ export interface UseModelOverrideResult {
|
||||
/** The effective model entry (override or global default) */
|
||||
effectiveModelEntry: PhaseModelEntry;
|
||||
/** The effective model string (for backward compatibility with APIs that only accept strings) */
|
||||
effectiveModel: ModelAlias | CursorModelId;
|
||||
effectiveModel: ModelId;
|
||||
/** Whether the model is currently overridden */
|
||||
isOverridden: boolean;
|
||||
/** Set a model override */
|
||||
@@ -32,7 +32,7 @@ export interface UseModelOverrideResult {
|
||||
*/
|
||||
function normalizeEntry(entry: PhaseModelEntry | string): PhaseModelEntry {
|
||||
if (typeof entry === 'string') {
|
||||
return { model: entry as ModelAlias | CursorModelId };
|
||||
return { model: entry as ModelId };
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
@@ -40,9 +40,9 @@ function normalizeEntry(entry: PhaseModelEntry | string): PhaseModelEntry {
|
||||
/**
|
||||
* Extract model string from PhaseModelEntry or string
|
||||
*/
|
||||
function extractModel(entry: PhaseModelEntry | string): ModelAlias | CursorModelId {
|
||||
function extractModel(entry: PhaseModelEntry | string): ModelId {
|
||||
if (typeof entry === 'string') {
|
||||
return entry as ModelAlias | CursorModelId;
|
||||
return entry as ModelId;
|
||||
}
|
||||
return entry.model;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@ import type {
|
||||
IssueValidationResponse,
|
||||
IssueValidationEvent,
|
||||
StoredValidation,
|
||||
AgentModel,
|
||||
ModelId,
|
||||
ThinkingLevel,
|
||||
ReasoningEffort,
|
||||
GitHubComment,
|
||||
IssueCommentsResult,
|
||||
Idea,
|
||||
@@ -314,7 +316,9 @@ export interface GitHubAPI {
|
||||
validateIssue: (
|
||||
projectPath: string,
|
||||
issue: IssueValidationInput,
|
||||
model?: AgentModel
|
||||
model?: ModelId,
|
||||
thinkingLevel?: ThinkingLevel,
|
||||
reasoningEffort?: ReasoningEffort
|
||||
) => Promise<{ success: boolean; message?: string; issueNumber?: number; error?: string }>;
|
||||
/** Check validation status for an issue or all issues */
|
||||
getValidationStatus: (
|
||||
@@ -1294,6 +1298,7 @@ interface SetupAPI {
|
||||
success: boolean;
|
||||
hasAnthropicKey: boolean;
|
||||
hasGoogleKey: boolean;
|
||||
hasOpenaiKey: boolean;
|
||||
}>;
|
||||
deleteApiKey: (
|
||||
provider: string
|
||||
@@ -1377,6 +1382,7 @@ function createMockSetupAPI(): SetupAPI {
|
||||
success: true,
|
||||
hasAnthropicKey: false,
|
||||
hasGoogleKey: false,
|
||||
hasOpenaiKey: false,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -3008,8 +3014,20 @@ function createMockGitHubAPI(): GitHubAPI {
|
||||
mergedPRs: [],
|
||||
};
|
||||
},
|
||||
validateIssue: async (projectPath: string, issue: IssueValidationInput, model?: AgentModel) => {
|
||||
console.log('[Mock] Starting async validation:', { projectPath, issue, model });
|
||||
validateIssue: async (
|
||||
projectPath: string,
|
||||
issue: IssueValidationInput,
|
||||
model?: ModelId,
|
||||
thinkingLevel?: ThinkingLevel,
|
||||
reasoningEffort?: ReasoningEffort
|
||||
) => {
|
||||
console.log('[Mock] Starting async validation:', {
|
||||
projectPath,
|
||||
issue,
|
||||
model,
|
||||
thinkingLevel,
|
||||
reasoningEffort,
|
||||
});
|
||||
|
||||
// Simulate async validation in background
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -36,6 +36,7 @@ import type {
|
||||
import type { Message, SessionListItem } from '@/types/electron';
|
||||
import type { Feature, ClaudeUsageResponse, CodexUsageResponse } from '@/store/app-store';
|
||||
import type { WorktreeAPI, GitAPI, ModelDefinition, ProviderStatus } from '@/types/electron';
|
||||
import type { ModelId, ThinkingLevel, ReasoningEffort } from '@automaker/types';
|
||||
import { getGlobalFileBrowser } from '@/contexts/file-browser-context';
|
||||
|
||||
const logger = createLogger('HttpClient');
|
||||
@@ -1173,6 +1174,7 @@ export class HttpApiClient implements ElectronAPI {
|
||||
success: boolean;
|
||||
hasAnthropicKey: boolean;
|
||||
hasGoogleKey: boolean;
|
||||
hasOpenaiKey: boolean;
|
||||
}> => this.get('/api/setup/api-keys'),
|
||||
|
||||
getPlatform: (): Promise<{
|
||||
@@ -1838,9 +1840,17 @@ export class HttpApiClient implements ElectronAPI {
|
||||
validateIssue: (
|
||||
projectPath: string,
|
||||
issue: IssueValidationInput,
|
||||
model?: string,
|
||||
thinkingLevel?: string
|
||||
) => this.post('/api/github/validate-issue', { projectPath, ...issue, model, thinkingLevel }),
|
||||
model?: ModelId,
|
||||
thinkingLevel?: ThinkingLevel,
|
||||
reasoningEffort?: ReasoningEffort
|
||||
) =>
|
||||
this.post('/api/github/validate-issue', {
|
||||
projectPath,
|
||||
...issue,
|
||||
model,
|
||||
thinkingLevel,
|
||||
reasoningEffort,
|
||||
}),
|
||||
getValidationStatus: (projectPath: string, issueNumber?: number) =>
|
||||
this.post('/api/github/validation-status', { projectPath, issueNumber }),
|
||||
stopValidation: (projectPath: string, issueNumber: number) =>
|
||||
|
||||
Reference in New Issue
Block a user