feat(settings): per-model effort and turn presets
ClaudeDo never passed --effort, so every session inherited whatever effortLevel the user's Claude Code config happened to carry. Settings -> General now holds one row per model alias (haiku medium/20, sonnet high/30, opus high/40, fable high/25) supplying the global effort and turn defaults; list- and task-level max-turns overrides still win, and the agent editor's inherited badge follows the model. --effort is applied to autonomous runs and to every ConPTY spec (task session, planning start/resume, ad-hoc, list handler). The model itself is deliberately not forced on interactive sessions. The single global 'Max turns' field is replaced by the table, and 'fable' joins ModelRegistry.Aliases. The migration also adds the is_manual columns used by the next commit.
This commit is contained in:
@@ -26,11 +26,15 @@ public class AgentConfigEditorViewModelTests
|
||||
public override Task UpdateTaskAgentSettingsAsync(UpdateTaskAgentSettingsDto dto) { SavedTaskSettings = dto; return Task.CompletedTask; }
|
||||
}
|
||||
|
||||
// The global turn default is per-model now, so the preset row for `model` is what carries
|
||||
// `turns` — DefaultMaxTurns is no longer consulted.
|
||||
private static AppSettingsDto AppWith(string model, int turns) =>
|
||||
new(DefaultClaudeInstructions: "", DefaultModel: model, DefaultMaxTurns: turns,
|
||||
DefaultPermissionMode: "auto", MaxParallelExecutions: 1, WorktreeStrategy: "sibling",
|
||||
CentralWorktreeRoot: null, WorktreeAutoCleanupEnabled: false, WorktreeAutoCleanupDays: 30,
|
||||
ReportExcludedPaths: null, StandupWeekday: 3, DailyPrepMaxTasks: 5);
|
||||
ReportExcludedPaths: null, StandupWeekday: 3, DailyPrepMaxTasks: 5,
|
||||
SessionSkills: null,
|
||||
ModelPresets: new List<ModelPresetDto> { new(model, "high", turns) });
|
||||
|
||||
private static TaskEntity TaskWith(string? model, int? turns, string? sp, string? agentPath) =>
|
||||
new() { Id = "t1", ListId = "l1", Title = "t", CreatedAt = DateTime.UtcNow,
|
||||
|
||||
Reference in New Issue
Block a user