mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-24 12:23:07 +00:00
Fix concurrency limits and remote branch fetching issues (#788)
* Changes from fix/bug-fixes * feat: Refactor worktree iteration and improve error logging across services * feat: Extract URL/port patterns to module level and fix abort condition * fix: Improve IPv6 loopback handling, select component layout, and terminal UI * feat: Add thinking level defaults and adjust list row padding * Update apps/ui/src/store/app-store.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add worktree-aware terminal creation and split options, fix npm security issues from audit * feat: Add tracked remote detection to pull dialog flow * feat: Add merge state tracking to git operations * feat: Improve merge detection and add post-merge action preferences * Update apps/ui/src/components/views/board-view/dialogs/git-pull-dialog.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update apps/ui/src/components/views/board-view/dialogs/git-pull-dialog.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: Pass merge detection info to stash reapplication and handle merge state consistently * fix: Call onPulled callback in merge handlers and add validation checks --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
import { useState } from 'react';
|
||||
import { Workflow, RotateCcw, Replace, Sparkles } from 'lucide-react';
|
||||
import { Workflow, RotateCcw, Replace, Sparkles, Brain } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useAppStore } from '@/store/app-store';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { PhaseModelSelector } from './phase-model-selector';
|
||||
import { BulkReplaceDialog } from './bulk-replace-dialog';
|
||||
import type { PhaseModelKey, PhaseModelEntry } from '@automaker/types';
|
||||
import { DEFAULT_PHASE_MODELS, DEFAULT_GLOBAL_SETTINGS } from '@automaker/types';
|
||||
import type { PhaseModelKey, PhaseModelEntry, ThinkingLevel } from '@automaker/types';
|
||||
import {
|
||||
DEFAULT_PHASE_MODELS,
|
||||
DEFAULT_GLOBAL_SETTINGS,
|
||||
REASONING_EFFORT_LEVELS,
|
||||
} from '@automaker/types';
|
||||
|
||||
interface PhaseConfig {
|
||||
key: PhaseModelKey;
|
||||
@@ -161,6 +165,121 @@ function FeatureDefaultModelSection() {
|
||||
);
|
||||
}
|
||||
|
||||
// Thinking level options with descriptions for the settings UI
|
||||
const THINKING_LEVEL_OPTIONS: { id: ThinkingLevel; label: string; description: string }[] = [
|
||||
{ id: 'none', label: 'None', description: 'No extended thinking' },
|
||||
{ id: 'low', label: 'Low', description: 'Light reasoning (1k tokens)' },
|
||||
{ id: 'medium', label: 'Medium', description: 'Moderate reasoning (10k tokens)' },
|
||||
{ id: 'high', label: 'High', description: 'Deep reasoning (16k tokens)' },
|
||||
{ id: 'ultrathink', label: 'Ultra', description: 'Maximum reasoning (32k tokens)' },
|
||||
{ id: 'adaptive', label: 'Adaptive', description: 'Model decides reasoning depth' },
|
||||
];
|
||||
|
||||
/**
|
||||
* Default thinking level / reasoning effort section.
|
||||
* These defaults are applied when selecting a model via the primary button
|
||||
* in the two-stage model selector (i.e. clicking the model name directly).
|
||||
*/
|
||||
function DefaultThinkingLevelSection() {
|
||||
const {
|
||||
defaultThinkingLevel,
|
||||
setDefaultThinkingLevel,
|
||||
defaultReasoningEffort,
|
||||
setDefaultReasoningEffort,
|
||||
} = useAppStore();
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<h3 className="text-sm font-medium text-foreground">Quick-Select Defaults</h3>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Thinking/reasoning level applied when quick-selecting a model from the dropdown. You can
|
||||
always fine-tune per model via the expand arrow.
|
||||
</p>
|
||||
</div>
|
||||
<div className="space-y-3">
|
||||
{/* Default Thinking Level (Claude models) */}
|
||||
<div
|
||||
className={cn(
|
||||
'flex items-center justify-between p-4 rounded-xl',
|
||||
'bg-accent/20 border border-border/30',
|
||||
'hover:bg-accent/30 transition-colors'
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center gap-3 flex-1 pr-4">
|
||||
<div className="w-8 h-8 rounded-lg bg-purple-500/10 flex items-center justify-center">
|
||||
<Brain className="w-4 h-4 text-purple-500" />
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="text-sm font-medium text-foreground">Default Thinking Level</h4>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Applied to Claude models when quick-selected
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5 flex-wrap justify-end">
|
||||
{THINKING_LEVEL_OPTIONS.map((option) => (
|
||||
<button
|
||||
key={option.id}
|
||||
onClick={() => setDefaultThinkingLevel(option.id)}
|
||||
className={cn(
|
||||
'px-2.5 py-1.5 rounded-lg text-xs font-medium transition-all',
|
||||
'border',
|
||||
defaultThinkingLevel === option.id
|
||||
? 'bg-primary text-primary-foreground border-primary shadow-sm'
|
||||
: 'bg-background border-border/50 text-muted-foreground hover:bg-accent hover:text-foreground'
|
||||
)}
|
||||
title={option.description}
|
||||
>
|
||||
{option.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Default Reasoning Effort (Codex models) */}
|
||||
<div
|
||||
className={cn(
|
||||
'flex items-center justify-between p-4 rounded-xl',
|
||||
'bg-accent/20 border border-border/30',
|
||||
'hover:bg-accent/30 transition-colors'
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center gap-3 flex-1 pr-4">
|
||||
<div className="w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center">
|
||||
<Brain className="w-4 h-4 text-blue-500" />
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="text-sm font-medium text-foreground">Default Reasoning Effort</h4>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Applied to Codex/OpenAI models when quick-selected
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5 flex-wrap justify-end">
|
||||
{REASONING_EFFORT_LEVELS.map((option) => (
|
||||
<button
|
||||
key={option.id}
|
||||
onClick={() => setDefaultReasoningEffort(option.id)}
|
||||
className={cn(
|
||||
'px-2.5 py-1.5 rounded-lg text-xs font-medium transition-all',
|
||||
'border',
|
||||
defaultReasoningEffort === option.id
|
||||
? 'bg-primary text-primary-foreground border-primary shadow-sm'
|
||||
: 'bg-background border-border/50 text-muted-foreground hover:bg-accent hover:text-foreground'
|
||||
)}
|
||||
title={option.description}
|
||||
>
|
||||
{option.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function ModelDefaultsSection() {
|
||||
const { resetPhaseModels, claudeCompatibleProviders } = useAppStore();
|
||||
const [showBulkReplace, setShowBulkReplace] = useState(false);
|
||||
@@ -222,6 +341,9 @@ export function ModelDefaultsSection() {
|
||||
{/* Feature Defaults */}
|
||||
<FeatureDefaultModelSection />
|
||||
|
||||
{/* Default Thinking Level / Reasoning Effort */}
|
||||
<DefaultThinkingLevelSection />
|
||||
|
||||
{/* Quick Tasks */}
|
||||
<PhaseGroup
|
||||
title="Quick Tasks"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user