mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
Merge branch 'v0.11.0rc' into feat/dev-server-log-panel
Resolved conflict in worktree-panel.tsx by combining imports: - DevServerLogsPanel from this branch - WorktreeMobileDropdown, WorktreeActionsDropdown, BranchSwitchDropdown from v0.11.0rc Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -98,7 +98,7 @@ Binary file ${cleanPath} added
|
||||
const lines = content.split('\n');
|
||||
|
||||
// Remove trailing empty line if the file ends with newline
|
||||
if (lines.length > 0 && lines.at(-1) === '') {
|
||||
if (lines.length > 0 && lines[lines.length - 1] === '') {
|
||||
lines.pop();
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ export async function* spawnJSONLProcess(options: SubprocessOptions): AsyncGener
|
||||
* Spawns a subprocess and collects all output
|
||||
*/
|
||||
export async function spawnProcess(options: SubprocessOptions): Promise<SubprocessResult> {
|
||||
const { command, args, cwd, env, abortController } = options;
|
||||
const { command, args, cwd, env, abortController, stdinData } = options;
|
||||
|
||||
const processEnv = {
|
||||
...process.env,
|
||||
@@ -204,10 +204,15 @@ export async function spawnProcess(options: SubprocessOptions): Promise<Subproce
|
||||
const childProcess = spawn(command, args, {
|
||||
cwd,
|
||||
env: processEnv,
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
stdio: [stdinData ? 'pipe' : 'ignore', 'pipe', 'pipe'],
|
||||
shell: needsShell,
|
||||
});
|
||||
|
||||
if (stdinData && childProcess.stdin) {
|
||||
childProcess.stdin.write(stdinData);
|
||||
childProcess.stdin.end();
|
||||
}
|
||||
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import type {
|
||||
ResolvedAgentPrompts,
|
||||
ResolvedBacklogPlanPrompts,
|
||||
ResolvedEnhancementPrompts,
|
||||
ResolvedCommitMessagePrompts,
|
||||
} from '@automaker/types';
|
||||
import { STATIC_PORT, SERVER_PORT } from '@automaker/types';
|
||||
|
||||
@@ -429,6 +430,40 @@ export const DEFAULT_ENHANCEMENT_PROMPTS: ResolvedEnhancementPrompts = {
|
||||
uxReviewerSystemPrompt: UX_REVIEWER_SYSTEM_PROMPT,
|
||||
};
|
||||
|
||||
/**
|
||||
* ========================================================================
|
||||
* COMMIT MESSAGE PROMPTS
|
||||
* ========================================================================
|
||||
*/
|
||||
|
||||
export const DEFAULT_COMMIT_MESSAGE_SYSTEM_PROMPT = `You are a git commit message generator. Your task is to create a clear, concise commit message based on the git diff provided.
|
||||
|
||||
Rules:
|
||||
- Output ONLY the commit message, nothing else
|
||||
- First line should be a short summary (50 chars or less) in imperative mood
|
||||
- Start with a conventional commit type if appropriate (feat:, fix:, refactor:, docs:, chore:, style:, test:, perf:, ci:, build:)
|
||||
- Keep it concise and descriptive
|
||||
- Focus on WHAT changed and WHY (if clear from the diff), not HOW
|
||||
- No quotes, backticks, or extra formatting
|
||||
- If there are multiple changes, provide a brief summary on the first line
|
||||
|
||||
Examples:
|
||||
- feat: Add dark mode toggle to settings
|
||||
- fix: Resolve login validation edge case
|
||||
- refactor: Extract user authentication logic
|
||||
- docs: Update installation instructions
|
||||
- chore: Update dependencies to latest versions
|
||||
- style: Fix inconsistent indentation in components
|
||||
- test: Add unit tests for user service
|
||||
- perf: Optimize database query for user lookup`;
|
||||
|
||||
/**
|
||||
* Default Commit Message prompts (for AI commit message generation)
|
||||
*/
|
||||
export const DEFAULT_COMMIT_MESSAGE_PROMPTS: ResolvedCommitMessagePrompts = {
|
||||
systemPrompt: DEFAULT_COMMIT_MESSAGE_SYSTEM_PROMPT,
|
||||
};
|
||||
|
||||
/**
|
||||
* ========================================================================
|
||||
* COMBINED DEFAULTS
|
||||
@@ -443,4 +478,5 @@ export const DEFAULT_PROMPTS = {
|
||||
agent: DEFAULT_AGENT_PROMPTS,
|
||||
backlogPlan: DEFAULT_BACKLOG_PLAN_PROMPTS,
|
||||
enhancement: DEFAULT_ENHANCEMENT_PROMPTS,
|
||||
commitMessage: DEFAULT_COMMIT_MESSAGE_PROMPTS,
|
||||
} as const;
|
||||
|
||||
@@ -41,6 +41,8 @@ export {
|
||||
DEFAULT_BACKLOG_PLAN_USER_PROMPT_TEMPLATE,
|
||||
DEFAULT_BACKLOG_PLAN_PROMPTS,
|
||||
DEFAULT_ENHANCEMENT_PROMPTS,
|
||||
DEFAULT_COMMIT_MESSAGE_SYSTEM_PROMPT,
|
||||
DEFAULT_COMMIT_MESSAGE_PROMPTS,
|
||||
DEFAULT_PROMPTS,
|
||||
} from './defaults.js';
|
||||
|
||||
@@ -50,6 +52,7 @@ export {
|
||||
mergeAgentPrompts,
|
||||
mergeBacklogPlanPrompts,
|
||||
mergeEnhancementPrompts,
|
||||
mergeCommitMessagePrompts,
|
||||
mergeAllPrompts,
|
||||
} from './merge.js';
|
||||
|
||||
@@ -59,4 +62,5 @@ export type {
|
||||
ResolvedAgentPrompts,
|
||||
ResolvedBacklogPlanPrompts,
|
||||
ResolvedEnhancementPrompts,
|
||||
ResolvedCommitMessagePrompts,
|
||||
} from '@automaker/types';
|
||||
|
||||
@@ -14,17 +14,20 @@ import type {
|
||||
AgentPrompts,
|
||||
BacklogPlanPrompts,
|
||||
EnhancementPrompts,
|
||||
CommitMessagePrompts,
|
||||
CustomPrompt,
|
||||
ResolvedAutoModePrompts,
|
||||
ResolvedAgentPrompts,
|
||||
ResolvedBacklogPlanPrompts,
|
||||
ResolvedEnhancementPrompts,
|
||||
ResolvedCommitMessagePrompts,
|
||||
} from '@automaker/types';
|
||||
import {
|
||||
DEFAULT_AUTO_MODE_PROMPTS,
|
||||
DEFAULT_AGENT_PROMPTS,
|
||||
DEFAULT_BACKLOG_PLAN_PROMPTS,
|
||||
DEFAULT_ENHANCEMENT_PROMPTS,
|
||||
DEFAULT_COMMIT_MESSAGE_PROMPTS,
|
||||
} from './defaults.js';
|
||||
|
||||
/**
|
||||
@@ -120,6 +123,18 @@ export function mergeEnhancementPrompts(custom?: EnhancementPrompts): ResolvedEn
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge custom Commit Message prompts with defaults
|
||||
* Custom prompts override defaults only when enabled=true
|
||||
*/
|
||||
export function mergeCommitMessagePrompts(
|
||||
custom?: CommitMessagePrompts
|
||||
): ResolvedCommitMessagePrompts {
|
||||
return {
|
||||
systemPrompt: resolvePrompt(custom?.systemPrompt, DEFAULT_COMMIT_MESSAGE_PROMPTS.systemPrompt),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge all custom prompts with defaults
|
||||
* Returns a complete PromptCustomization with all fields populated
|
||||
@@ -130,5 +145,6 @@ export function mergeAllPrompts(custom?: PromptCustomization) {
|
||||
agent: mergeAgentPrompts(custom?.agent),
|
||||
backlogPlan: mergeBacklogPlanPrompts(custom?.backlogPlan),
|
||||
enhancement: mergeEnhancementPrompts(custom?.enhancement),
|
||||
commitMessage: mergeCommitMessagePrompts(custom?.commitMessage),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ export {
|
||||
type ModelAlias,
|
||||
type CodexModelId,
|
||||
type AgentModel,
|
||||
type ModelId,
|
||||
} from './model.js';
|
||||
|
||||
// Event types
|
||||
@@ -98,11 +99,13 @@ export type {
|
||||
AgentPrompts,
|
||||
BacklogPlanPrompts,
|
||||
EnhancementPrompts,
|
||||
CommitMessagePrompts,
|
||||
PromptCustomization,
|
||||
ResolvedAutoModePrompts,
|
||||
ResolvedAgentPrompts,
|
||||
ResolvedBacklogPlanPrompts,
|
||||
ResolvedEnhancementPrompts,
|
||||
ResolvedCommitMessagePrompts,
|
||||
} from './prompts.js';
|
||||
export { DEFAULT_PROMPT_CUSTOMIZATION } from './prompts.js';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Types for validating GitHub issues against the codebase using Claude SDK.
|
||||
*/
|
||||
|
||||
import type { ModelAlias } from './model.js';
|
||||
import type { ModelId } from './model.js';
|
||||
|
||||
/**
|
||||
* Verdict from issue validation
|
||||
@@ -137,8 +137,8 @@ export type IssueValidationEvent =
|
||||
issueTitle: string;
|
||||
result: IssueValidationResult;
|
||||
projectPath: string;
|
||||
/** Model used for validation (opus, sonnet, haiku) */
|
||||
model: ModelAlias;
|
||||
/** Model used for validation */
|
||||
model: ModelId;
|
||||
}
|
||||
| {
|
||||
type: 'issue_validation_error';
|
||||
@@ -162,8 +162,8 @@ export interface StoredValidation {
|
||||
issueTitle: string;
|
||||
/** ISO timestamp when validation was performed */
|
||||
validatedAt: string;
|
||||
/** Model used for validation (opus, sonnet, haiku) */
|
||||
model: ModelAlias;
|
||||
/** Model used for validation */
|
||||
model: ModelId;
|
||||
/** The validation result */
|
||||
result: IssueValidationResult;
|
||||
/** ISO timestamp when user viewed this validation (undefined = not yet viewed) */
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/**
|
||||
* Model alias mapping for Claude models
|
||||
*/
|
||||
import type { CursorModelId } from './cursor-models.js';
|
||||
import type { OpencodeModelId } from './opencode-models.js';
|
||||
|
||||
export const CLAUDE_MODEL_MAP: Record<string, string> = {
|
||||
haiku: 'claude-haiku-4-5-20251001',
|
||||
sonnet: 'claude-sonnet-4-5-20250929',
|
||||
@@ -74,3 +77,26 @@ export type CodexModelId = (typeof CODEX_MODEL_MAP)[keyof typeof CODEX_MODEL_MAP
|
||||
* Represents available models across providers
|
||||
*/
|
||||
export type AgentModel = ModelAlias | CodexModelId;
|
||||
|
||||
/**
|
||||
* Dynamic provider model IDs discovered at runtime (provider/model format)
|
||||
*/
|
||||
export type DynamicModelId = `${string}/${string}`;
|
||||
|
||||
/**
|
||||
* Provider-prefixed model IDs used for routing
|
||||
*/
|
||||
export type PrefixedCursorModelId = `cursor-${string}`;
|
||||
export type PrefixedOpencodeModelId = `opencode-${string}`;
|
||||
|
||||
/**
|
||||
* ModelId - Unified model identifier across providers
|
||||
*/
|
||||
export type ModelId =
|
||||
| ModelAlias
|
||||
| CodexModelId
|
||||
| CursorModelId
|
||||
| OpencodeModelId
|
||||
| DynamicModelId
|
||||
| PrefixedCursorModelId
|
||||
| PrefixedOpencodeModelId;
|
||||
|
||||
@@ -94,6 +94,16 @@ export interface EnhancementPrompts {
|
||||
uxReviewerSystemPrompt?: CustomPrompt;
|
||||
}
|
||||
|
||||
/**
|
||||
* CommitMessagePrompts - Customizable prompts for AI commit message generation
|
||||
*
|
||||
* Controls how the AI generates git commit messages from diffs.
|
||||
*/
|
||||
export interface CommitMessagePrompts {
|
||||
/** System prompt for generating commit messages */
|
||||
systemPrompt?: CustomPrompt;
|
||||
}
|
||||
|
||||
/**
|
||||
* PromptCustomization - Complete set of customizable prompts
|
||||
*
|
||||
@@ -112,6 +122,9 @@ export interface PromptCustomization {
|
||||
|
||||
/** Enhancement prompts (feature description improvement) */
|
||||
enhancement?: EnhancementPrompts;
|
||||
|
||||
/** Commit message prompts (AI-generated commit messages) */
|
||||
commitMessage?: CommitMessagePrompts;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,6 +135,7 @@ export const DEFAULT_PROMPT_CUSTOMIZATION: PromptCustomization = {
|
||||
agent: {},
|
||||
backlogPlan: {},
|
||||
enhancement: {},
|
||||
commitMessage: {},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -155,3 +169,7 @@ export interface ResolvedEnhancementPrompts {
|
||||
acceptanceSystemPrompt: string;
|
||||
uxReviewerSystemPrompt: string;
|
||||
}
|
||||
|
||||
export interface ResolvedCommitMessagePrompts {
|
||||
systemPrompt: string;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* (for file I/O via SettingsService) and the UI (for state management and sync).
|
||||
*/
|
||||
|
||||
import type { ModelAlias, AgentModel, CodexModelId } from './model.js';
|
||||
import type { ModelAlias, ModelId } from './model.js';
|
||||
import type { CursorModelId } from './cursor-models.js';
|
||||
import { CURSOR_MODEL_MAP, getAllCursorModelIds } from './cursor-models.js';
|
||||
import type { OpencodeModelId } from './opencode-models.js';
|
||||
@@ -114,8 +114,8 @@ const DEFAULT_CODEX_ADDITIONAL_DIRS: string[] = [];
|
||||
* - Cursor models: Handle thinking internally
|
||||
*/
|
||||
export interface PhaseModelEntry {
|
||||
/** The model to use (Claude alias, Cursor model ID, or Codex model ID) */
|
||||
model: ModelAlias | CursorModelId | CodexModelId;
|
||||
/** The model to use (supports Claude, Cursor, Codex, OpenCode, and dynamic provider IDs) */
|
||||
model: ModelId;
|
||||
/** Extended thinking level (only applies to Claude models, defaults to 'none') */
|
||||
thinkingLevel?: ThinkingLevel;
|
||||
/** Reasoning effort level (only applies to Codex models, defaults to 'none') */
|
||||
@@ -157,6 +157,10 @@ export interface PhaseModelConfig {
|
||||
// Memory tasks - for learning extraction and memory operations
|
||||
/** Model for extracting learnings from completed agent sessions */
|
||||
memoryExtractionModel: PhaseModelEntry;
|
||||
|
||||
// Quick tasks - commit messages
|
||||
/** Model for generating git commit messages from diffs */
|
||||
commitMessageModel: PhaseModelEntry;
|
||||
}
|
||||
|
||||
/** Keys of PhaseModelConfig for type-safe access */
|
||||
@@ -293,6 +297,10 @@ export interface ProjectRef {
|
||||
theme?: string;
|
||||
/** Whether project is pinned to favorites on dashboard */
|
||||
isFavorite?: boolean;
|
||||
/** Lucide icon name for project identification */
|
||||
icon?: string;
|
||||
/** Custom icon image path for project switcher */
|
||||
customIconPath?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -382,6 +390,10 @@ export interface GlobalSettings {
|
||||
/** Mute completion notification sound */
|
||||
muteDoneSound: boolean;
|
||||
|
||||
// AI Commit Message Generation
|
||||
/** Enable AI-generated commit messages when opening commit dialog (default: true) */
|
||||
enableAiCommitMessages: boolean;
|
||||
|
||||
// AI Model Selection (per-phase configuration)
|
||||
/** Phase-specific AI model configuration */
|
||||
phaseModels: PhaseModelConfig;
|
||||
@@ -600,6 +612,10 @@ export interface ProjectSettings {
|
||||
/** Project-specific board background settings */
|
||||
boardBackground?: BoardBackgroundSettings;
|
||||
|
||||
// Project Branding
|
||||
/** Custom icon image path for project switcher (relative to .automaker/) */
|
||||
customIconPath?: string;
|
||||
|
||||
// UI Visibility
|
||||
/** Whether the worktree panel row is visible (default: true) */
|
||||
worktreePanelVisible?: boolean;
|
||||
@@ -653,6 +669,9 @@ export const DEFAULT_PHASE_MODELS: PhaseModelConfig = {
|
||||
|
||||
// Memory - use fast model for learning extraction (cost-effective)
|
||||
memoryExtractionModel: { model: 'haiku' },
|
||||
|
||||
// Commit messages - use fast model for speed
|
||||
commitMessageModel: { model: 'haiku' },
|
||||
};
|
||||
|
||||
/** Current version of the global settings schema */
|
||||
@@ -702,6 +721,7 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
|
||||
defaultRequirePlanApproval: false,
|
||||
defaultFeatureModel: { model: 'opus' },
|
||||
muteDoneSound: false,
|
||||
enableAiCommitMessages: true,
|
||||
phaseModels: DEFAULT_PHASE_MODELS,
|
||||
enhancementModel: 'sonnet',
|
||||
validationModel: 'opus',
|
||||
|
||||
Reference in New Issue
Block a user