huskies: merge 595_story_web_ui_settings_page_with_form_based_project_toml_editor

This commit is contained in:
dave
2026-04-17 13:33:19 +00:00
parent 982e65aec5
commit 43ca0cbc59
6 changed files with 1018 additions and 3 deletions
+28
View File
@@ -2,6 +2,19 @@ export interface EditorSettings {
editor_command: string | null;
}
export interface ProjectSettings {
default_qa: string;
default_coder_model: string | null;
max_coders: number | null;
max_retries: number;
base_branch: string | null;
rate_limit_notifications: boolean;
timezone: string | null;
rendezvous: string | null;
watcher_sweep_interval_secs: number;
watcher_done_retention_secs: number;
}
export interface OpenFileResult {
success: boolean;
}
@@ -34,6 +47,21 @@ async function requestJson<T>(
}
export const settingsApi = {
getProjectSettings(baseUrl?: string): Promise<ProjectSettings> {
return requestJson<ProjectSettings>("/settings", {}, baseUrl);
},
putProjectSettings(
settings: ProjectSettings,
baseUrl?: string,
): Promise<ProjectSettings> {
return requestJson<ProjectSettings>(
"/settings",
{ method: "PUT", body: JSON.stringify(settings) },
baseUrl,
);
},
getEditorCommand(baseUrl?: string): Promise<EditorSettings> {
return requestJson<EditorSettings>("/settings/editor", {}, baseUrl);
},