Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(server): update server mode terminology from 'dev-implicit' to 'dev' (#2260)
Ferry8271aa20450e
diff --git a/web-studio/src/components/connection-dialog.tsx b/web-studio/src/components/connection-dialog.tsxindex b84bb019d..547a03289 100644--- a/web-studio/src/components/connection-dialog.tsx+++ b/web-studio/src/components/connection-dialog.tsx@@ -47,7 +47,7 @@ export function ConnectionDialog() {}}, [connection, isConnectionDialogOpen])- const isDevImplicit = serverMode === 'dev-implicit'+ const isDevImplicit = serverMode === 'dev'const showIdentityFields = !isDevImplicit || showAdvancedInDevModereturn (diff --git a/web-studio/src/hooks/use-app-connection.tsx b/web-studio/src/hooks/use-app-connection.tsxindex aeea232c5..ac2abdc16 100644--- a/web-studio/src/hooks/use-app-connection.tsx+++ b/web-studio/src/hooks/use-app-connection.tsx@@ -119,8 +119,8 @@ export function summarizeConnectionIdentity(connection: ConnectionDraft,serverMode: ServerMode,): ConnectionIdentitySummary {- if (serverMode === 'dev-implicit') {- return { labelKey: 'identitySummary.devImplicit' }+ if (serverMode === 'dev') {+ return { labelKey: 'identitySummary.dev' }}const segments = [diff --git a/web-studio/src/hooks/use-server-mode.ts b/web-studio/src/hooks/use-server-mode.tsindex 6023e92e7..d9e2cdacf 100644--- a/web-studio/src/hooks/use-server-mode.ts+++ b/web-studio/src/hooks/use-server-mode.ts@@ -1,20 +1,18 @@import { getHealth } from '#/lib/ov-client'-export type ServerMode =- | 'checking'- | 'dev-implicit'- | 'explicit-auth'- | 'offline'+export type ServerAuthMode = 'api_key' | 'trusted' | 'dev'+export type ServerMode = ServerAuthMode | 'checking' | 'offline'-export type ServerModeBadge = {- labelKey: string- variant: 'default' | 'secondary' | 'outline' | 'destructive'-}+const SERVER_AUTH_MODES = new Set<ServerAuthMode>(['api_key', 'trusted', 'dev'])export function normalizeBaseUrl(baseUrl: string): string {return baseUrl.trim().replace(/\/+$/, '')}+function isServerAuthMode(value: unknown): value is ServerAuthMode {+ return typeof value === 'string' && SERVER_AUTH_MODES.has(value as ServerAuthMode)+}+export async function detectServerMode(baseUrl: string): Promise<ServerMode> {const normalizedBaseUrl = normalizeBaseUrl(baseUrl)if (!normalizedBaseUrl) {@@ -30,24 +28,9 @@ export async function detectServerMode(baseUrl: string): Promise<ServerMode> {throwOnError: true,})- const data = response.data as { user_id?: string }- return typeof data.user_id === 'string' && data.user_id.length > 0- ? 'dev-implicit'- : 'explicit-auth'+ const data = response.data as { auth_mode?: string }+ return isServerAuthMode(data.auth_mode) ? data.auth_mode : 'api_key'} catch {return 'offline'}}--export function describeServerMode(serverMode: ServerMode): ServerModeBadge {- switch (serverMode) {- case 'dev-implicit':- return { labelKey: 'serverMode.devImplicit', variant: 'secondary' }- case 'explicit-auth':- return { labelKey: 'serverMode.explicitAuth', variant: 'outline' }- case 'offline':- return { labelKey: 'serverMode.offline', variant: 'destructive' }- default:- return { labelKey: 'serverMode.checking', variant: 'outline' }- }-}diff --git a/web-studio/src/i18n/locales/en.ts b/web-studio/src/i18n/locales/en.tsindex 5e8d01da0..7cbbd28d1 100644--- a/web-studio/src/i18n/locales/en.ts+++ b/web-studio/src/i18n/locales/en.ts@@ -57,12 +57,6 @@ const en = {theme: {toggle: 'Toggle theme',},- serverMode: {- checking: 'Detecting',- devImplicit: 'Server Identity',- explicitAuth: 'Explicit Auth',- offline: 'Offline',- },},connection: {devMode: {@@ -74,7 +68,7 @@ const en = {title: 'Connection & Identity',},identitySummary: {- devImplicit: 'Server-managed identity',+ dev: 'Server-managed identity',named: '{{identity}}',unset: 'Identity not set',},diff --git a/web-studio/src/i18n/locales/zh-CN.ts b/web-studio/src/i18n/locales/zh-CN.tsindex f16024b95..10ad569ce 100644--- a/web-studio/src/i18n/locales/zh-CN.ts+++ b/web-studio/src/i18n/locales/zh-CN.ts@@ -57,12 +57,6 @@ const zhCN = {theme: {toggle: '切换主题',},- serverMode: {- checking: '检测中',- devImplicit: '服务端身份',- explicitAuth: '显式鉴权',- offline: '未连接',- },},connection: {devMode: {@@ -74,7 +68,7 @@ const zhCN = {title: '连接与身份',},identitySummary: {- devImplicit: '服务端隐式身份',+ dev: '服务端隐式身份',named: '{{identity}}',unset: '未设置身份',},