feat(settings): classify startup and live runtime settings
This commit is contained in:
1 parent
eac34272ae
commit
645ab0ae9f
24 files changed
+220
-169
No files matched your search
@@ -106,7 +106,7 @@ const args = computed({
|
||||
Parallel tool calls
|
||||
</label>
|
||||
<span v-if="server.headers_configured" class="text-xs text-fg-subtle">
|
||||
Headers set in config.toml
|
||||
Headers supplied at startup
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -211,6 +211,13 @@ const eyebrow = "mb-2 text-[11px] font-medium tracking-[0.06em] text-fg-subtle u
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<Input :id="`prov-${name}-url`" v-model="provider.base_url" class="max-w-md font-mono" />
|
||||
<DraftHint kind="provider-settings" :path="`${name}.base_url`" />
|
||||
|
||||
</div>
|
||||
</SettingRow>
|
||||
<SettingRow label="API key environment variable" :for="`prov-${name}-env`" hint="Used when no secret reference is set.">
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<Input :id="`prov-${name}-env`" v-model="provider.api_key_env" aria-label="API key environment variable" placeholder="API key environment variable" class="max-w-md font-mono" />
|
||||
<DraftHint kind="provider-settings" :path="`${name}.api_key_env`" />
|
||||
</div>
|
||||
</SettingRow>
|
||||
<SettingRow label="API key">
|
||||
|
||||
@@ -26,7 +26,16 @@ import VersionsCard from "./VersionsCard.vue";
|
||||
<TabsTrigger value="services">Services</TabsTrigger>
|
||||
<TabsTrigger value="health">Health</TabsTrigger>
|
||||
<TabsTrigger value="versions">Versions</TabsTrigger>
|
||||
<TabsTrigger value="startup">Startup settings</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="startup">
|
||||
<p class="mb-4 text-sm text-fg-subtle">These settings configure process startup. They are read-only here and require a restart.</p>
|
||||
<dl class="divide-y divide-border rounded-lg border border-border bg-card">
|
||||
<div v-for="(reason,key) in config?.bootstrap" :key="key" class="grid gap-2 px-4 py-3 md:grid-cols-[18rem_1fr]">
|
||||
<dt class="font-mono text-xs">{{ key }}</dt><dd class="text-sm text-fg-subtle">{{ reason }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</TabsContent>
|
||||
<TabsContent value="services"><ServicesCard /></TabsContent>
|
||||
<TabsContent value="health"><HealthStatusCard /></TabsContent>
|
||||
<TabsContent value="versions" class="space-y-4">
|
||||
|
||||
@@ -3,6 +3,7 @@ import ApplyStatusRows from "./ApplyStatusRows.vue";
|
||||
import { computed, onMounted } from "vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
import {Input} from "@/components/ui/input";
|
||||
import PageHeader from "@/base/PageHeader.vue";
|
||||
import { DurationInput, formatGoDuration, parseGoDuration } from "@/components/ui/duration-input";
|
||||
import {
|
||||
@@ -17,6 +18,7 @@ import { resourcesForPage, useControlPlaneStore } from "@/stores/control-plane";
|
||||
import DraftHint from "./DraftHint.vue";
|
||||
import HistoryLink from "./HistoryLink.vue";
|
||||
|
||||
const POLICY="task-policy";
|
||||
const KIND = "workflow-execution-settings";
|
||||
|
||||
interface ExecutionSettings {
|
||||
@@ -31,6 +33,7 @@ const { catalog, catalogError } = storeToRefs(store);
|
||||
onMounted(store.load);
|
||||
|
||||
const resources = computed(() => resourcesForPage(catalog.value, "tasks"));
|
||||
const policy=computed(()=>store.drafts[POLICY]?.value as {diff_cap_lines:number;notify_webhook:string}|undefined);
|
||||
const limits = computed(() => store.drafts[KIND]?.value as ExecutionSettings | undefined);
|
||||
const error = computed(() => store.stateFor(KIND).error);
|
||||
|
||||
@@ -55,10 +58,18 @@ const taskRuntime = seconds("max_task_runtime_seconds");
|
||||
</PageHeader>
|
||||
<ApplyStatusRows v-for="resource in resources" :key="resource.kind" :kind="resource.kind" class="mb-4" />
|
||||
|
||||
<p v-if="catalogError || error" class="mb-4 text-sm text-danger" role="alert">
|
||||
{{ catalogError || error }}
|
||||
<p v-if="catalogError || error || store.stateFor(POLICY).error" class="mb-4 text-sm text-danger" role="alert">
|
||||
{{ catalogError || error || store.stateFor(POLICY).error }}
|
||||
</p>
|
||||
|
||||
<template v-if="policy">
|
||||
<SettingRow label="Maximum changed lines" hint="Applied to new tasks. 0 disables the limit." for="task-diff-cap">
|
||||
<div class="flex flex-wrap items-center gap-3"><Input id="task-diff-cap" v-model.number="policy.diff_cap_lines" type="number" min="0" class="max-w-40" /><DraftHint :kind="POLICY" path="diff_cap_lines" /></div>
|
||||
</SettingRow>
|
||||
<SettingRow label="Notification webhook" hint="Applied to new tasks. Empty disables notifications." for="task-notify">
|
||||
<div class="flex flex-wrap items-center gap-3"><Input id="task-notify" v-model="policy.notify_webhook" type="url" class="max-w-md" /><DraftHint :kind="POLICY" path="notify_webhook" /></div>
|
||||
</SettingRow>
|
||||
</template>
|
||||
<template v-if="limits">
|
||||
<SettingRow label="Task time limit" for="te-task" hint="Parked after this. 0 disables.">
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
|
||||
@@ -27,7 +27,7 @@ const KIND = "tool-settings";
|
||||
|
||||
interface ToolSettings {
|
||||
mcp_servers: McpServer[];
|
||||
minimax: { enabled: boolean; api_key_ref: { engine: string; key: string }; credential_configured?: boolean };
|
||||
minimax: { base_url?:string; enabled: boolean; api_key_ref: { engine: string; key: string }; credential_configured?: boolean };
|
||||
policy: { max_result_chars: number; spill_dir: string };
|
||||
web_fetch: { enabled: boolean | null; timeout: string; max_bytes: number; allow_private_networks: boolean };
|
||||
}
|
||||
@@ -132,6 +132,9 @@ const eyebrow = "mb-1 text-[11px] font-medium tracking-[0.06em] text-fg-subtle u
|
||||
/>
|
||||
</SettingRow>
|
||||
|
||||
<SettingRow label="MiniMax URL" for="minimax-url">
|
||||
<div class="flex flex-wrap items-center gap-3"><Input id="minimax-url" v-model="tools.minimax.base_url" class="max-w-md font-mono" /><DraftHint :kind="KIND" path="minimax.base_url" /></div>
|
||||
</SettingRow>
|
||||
<h2 :class="[eyebrow, 'mt-10']">Web fetch</h2>
|
||||
<SettingRow label="Enabled">
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
|
||||
@@ -25,4 +25,5 @@ export interface ConfigView {
|
||||
catalog?: CatalogProvider[];
|
||||
review?: ReviewView;
|
||||
reload?: ReloadStatus;
|
||||
bootstrap?:Record<string,string>;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ const PAGE_RESOURCES: Record<ControlPlanePage, string[]> = {
|
||||
profiles: ["agent-profiles"],
|
||||
credentials: ["credential-bindings"],
|
||||
playbooks: ["eda-playbooks"],
|
||||
tasks: ["workflow-execution-settings"],
|
||||
tasks: ["workflow-execution-settings","task-policy"],
|
||||
models: ["provider-settings", "model-role-assignments"],
|
||||
repositories: ["repository-policies"],
|
||||
channels: ["channel-settings"],
|
||||
|
||||
Reference in new issue
Block a user