feat(settings): move config/state to owner buckets

Add generic /api/storage config/state endpoints with merge-patch, migrate legacy YAML/JSON layout, and update UI/server to read and write owner-scoped settings. Replace config SSE events and drop /api/config routes.
This commit is contained in:
Shantur Rathore
2026-02-13 14:34:33 +00:00
parent 0c0f397db0
commit e30ff6358d
29 changed files with 1252 additions and 1051 deletions

View File

@@ -1,5 +1,5 @@
import { agents, providers } from "./session-state"
import { preferences, getAgentModelPreference } from "./preferences"
import { uiState, getAgentModelPreference } from "./preferences"
const DEFAULT_MODEL_OUTPUT_LIMIT = 32_000
@@ -17,7 +17,7 @@ function isModelValid(
function getRecentModelPreferenceForInstance(
instanceId: string,
): { providerId: string; modelId: string } | undefined {
const recents = preferences().modelRecents ?? []
const recents = uiState().models.recents ?? []
for (const item of recents) {
if (isModelValid(instanceId, item)) {
return item