fix(webui): remove unused bot identity settings

This commit is contained in:
chengyongru 2026-08-03 14:00:42 +08:00 committed by chengyongru
parent f7a6bc2d21
commit 5c72fdcd88
19 changed files with 29 additions and 122 deletions

View File

@ -2583,6 +2583,8 @@ async def test_settings_api_returns_safe_subset_and_updates_whitelist(
assert body["agent"]["model_preset"] == "default" assert body["agent"]["model_preset"] == "default"
assert body["agent"]["max_tokens"] == 8192 assert body["agent"]["max_tokens"] == 8192
assert body["agent"]["timezone"] == "UTC" assert body["agent"]["timezone"] == "UTC"
assert "bot_name" not in body["agent"]
assert "bot_icon" not in body["agent"]
assert body["agent"]["tool_hint_max_length"] == 40 assert body["agent"]["tool_hint_max_length"] == 40
presets = {preset["name"]: preset for preset in body["model_presets"]} presets = {preset["name"]: preset for preset in body["model_presets"]}
assert presets["default"]["active"] is True assert presets["default"]["active"] is True
@ -2874,8 +2876,8 @@ async def test_settings_api_returns_safe_subset_and_updates_whitelist(
assert saved.model_presets["fast-writing"].model == "openai/gpt-5.5" assert saved.model_presets["fast-writing"].model == "openai/gpt-5.5"
assert saved.model_presets["fast-writing"].provider == "openai" assert saved.model_presets["fast-writing"].provider == "openai"
assert saved.agents.defaults.timezone == "Asia/Shanghai" assert saved.agents.defaults.timezone == "Asia/Shanghai"
assert saved.agents.defaults.bot_name == "Nano" assert saved.agents.defaults.bot_name == "nanobot"
assert saved.agents.defaults.bot_icon == "N" assert saved.agents.defaults.bot_icon == "🐈"
assert saved.agents.defaults.tool_hint_max_length == 120 assert saved.agents.defaults.tool_hint_max_length == 120
assert saved.providers.openrouter.api_key == "sk-or-next" assert saved.providers.openrouter.api_key == "sk-or-next"
assert saved.providers.openrouter.api_base == "https://openrouter.ai/api/v1" assert saved.providers.openrouter.api_base == "https://openrouter.ai/api/v1"

View File

@ -1234,8 +1234,6 @@ def settings_payload(
"temperature": effective_preset.temperature, "temperature": effective_preset.temperature,
"reasoning_effort": effective_preset.reasoning_effort, "reasoning_effort": effective_preset.reasoning_effort,
"timezone": defaults.timezone, "timezone": defaults.timezone,
"bot_name": defaults.bot_name,
"bot_icon": defaults.bot_icon,
"tool_hint_max_length": defaults.tool_hint_max_length, "tool_hint_max_length": defaults.tool_hint_max_length,
}, },
"model_presets": model_presets, "model_presets": model_presets,
@ -1406,24 +1404,6 @@ def update_agent_settings(query: QueryParams) -> dict[str, Any]:
changed = True changed = True
restart_required = True restart_required = True
bot_name = _query_first_alias(query, "bot_name", "botName")
if bot_name is not None:
bot_name = bot_name.strip()
if not bot_name:
raise WebUISettingsError("bot_name is required")
if defaults.bot_name != bot_name:
defaults.bot_name = bot_name
changed = True
restart_required = True
bot_icon = _query_first_alias(query, "bot_icon", "botIcon")
if bot_icon is not None:
bot_icon = bot_icon.strip()
if defaults.bot_icon != bot_icon:
defaults.bot_icon = bot_icon
changed = True
restart_required = True
tool_hint_max_length = _query_first_alias( tool_hint_max_length = _query_first_alias(
query, query,
"tool_hint_max_length", "tool_hint_max_length",

View File

@ -234,8 +234,6 @@ interface AgentSettingsDraft {
temperature: number; temperature: number;
reasoningEffort: string; reasoningEffort: string;
timezone: string; timezone: string;
botName: string;
botIcon: string;
toolHintMaxLength: number; toolHintMaxLength: number;
} }
@ -475,8 +473,6 @@ const DEFAULT_AGENT_SETTINGS_DRAFT: AgentSettingsDraft = {
temperature: 0.1, temperature: 0.1,
reasoningEffort: "", reasoningEffort: "",
timezone: "UTC", timezone: "UTC",
botName: "nanobot",
botIcon: "",
toolHintMaxLength: 40, toolHintMaxLength: 40,
}; };
@ -544,8 +540,6 @@ function agentDraftFromPayload(
temperature: activePreset?.temperature ?? payload.agent.temperature, temperature: activePreset?.temperature ?? payload.agent.temperature,
reasoningEffort: activePreset?.reasoning_effort ?? "", reasoningEffort: activePreset?.reasoning_effort ?? "",
timezone: payload.agent.timezone, timezone: payload.agent.timezone,
botName: payload.agent.bot_name,
botIcon: payload.agent.bot_icon,
toolHintMaxLength: payload.agent.tool_hint_max_length, toolHintMaxLength: payload.agent.tool_hint_max_length,
}; };
} }
@ -1081,11 +1075,7 @@ export function SettingsView({
const runtimeDirty = useMemo(() => { const runtimeDirty = useMemo(() => {
if (!settings) return false; if (!settings) return false;
return ( return form.timezone !== settings.agent.timezone;
form.timezone !== settings.agent.timezone ||
form.botName !== settings.agent.bot_name ||
form.botIcon !== settings.agent.bot_icon
);
}, [form, settings]); }, [form, settings]);
const imageGenerationDirty = useMemo(() => { const imageGenerationDirty = useMemo(() => {
@ -1406,8 +1396,6 @@ export function SettingsView({
try { try {
const payload = await updateSettings(token, { const payload = await updateSettings(token, {
timezone: form.timezone, timezone: form.timezone,
botName: form.botName,
botIcon: form.botIcon,
}); });
applyPayload(payload); applyPayload(payload);
if (payload.requires_restart) { if (payload.requires_restart) {
@ -8415,23 +8403,15 @@ function RuntimeSettings({
return ( return (
<div className="space-y-7"> <div className="space-y-7">
<section> <section>
<SettingsSectionTitle>{tx("settings.sections.identity", "Identity")}</SettingsSectionTitle> <SettingsSectionTitle>{tx("settings.sections.regional", "Regional")}</SettingsSectionTitle>
<SettingsGroup> <SettingsGroup>
<SettingsRow title={tx("settings.rows.botName", "Bot name")} description={tx("settings.help.botName", "Shown wherever nanobot uses a display name.")}> <SettingsRow
<Input title={tx("settings.rows.timezone", "Timezone")}
value={form.botName} description={tx(
onChange={(event) => setForm((prev) => ({ ...prev, botName: event.target.value }))} "settings.help.timezone",
className="h-8 w-[220px] rounded-full text-[13px]" "Used for schedules and time-aware replies.",
/> )}
</SettingsRow> >
<SettingsRow title={tx("settings.rows.botIcon", "Bot icon")} description={tx("settings.help.botIcon", "Short emoji or text shown with the bot name.")}>
<Input
value={form.botIcon}
onChange={(event) => setForm((prev) => ({ ...prev, botIcon: event.target.value }))}
className="h-8 w-[120px] rounded-full text-center text-[13px]"
/>
</SettingsRow>
<SettingsRow title={tx("settings.rows.timezone", "Timezone")} description={tx("settings.help.timezone", "Used for schedules and time-aware replies.")}>
<TimezonePicker <TimezonePicker
value={form.timezone} value={form.timezone}
onChange={(timezone) => setForm((prev) => ({ ...prev, timezone }))} onChange={(timezone) => setForm((prev) => ({ ...prev, timezone }))}

View File

@ -99,7 +99,7 @@
"webBehavior": "Behavior", "webBehavior": "Behavior",
"cliApps": "CLI apps", "cliApps": "CLI apps",
"mcp": "MCP services", "mcp": "MCP services",
"identity": "Identity", "regional": "Regional",
"webuiSafety": "Web safety", "webuiSafety": "Web safety",
"capabilities": "Capabilities", "capabilities": "Capabilities",
"apps": "Apps", "apps": "Apps",
@ -190,8 +190,6 @@
"defaultImageSize": "Default size", "defaultImageSize": "Default size",
"maxImagesPerTurn": "Max images per turn", "maxImagesPerTurn": "Max images per turn",
"imageSaveDir": "Save directory", "imageSaveDir": "Save directory",
"botName": "Bot name",
"botIcon": "Bot icon",
"timezone": "Timezone", "timezone": "Timezone",
"workspacePath": "Default workspace", "workspacePath": "Default workspace",
"localServiceAccess": "Local services", "localServiceAccess": "Local services",
@ -235,8 +233,6 @@
"defaultAspectRatio": "Used when the prompt does not choose an aspect ratio.", "defaultAspectRatio": "Used when the prompt does not choose an aspect ratio.",
"defaultImageSize": "Size hint sent to providers that support it.", "defaultImageSize": "Size hint sent to providers that support it.",
"maxImagesPerTurn": "Upper bound for one generate_image request.", "maxImagesPerTurn": "Upper bound for one generate_image request.",
"botName": "Shown wherever nanobot uses a display name.",
"botIcon": "Short emoji or text shown with the bot name.",
"timezone": "Used for schedules and time-aware replies.", "timezone": "Used for schedules and time-aware replies.",
"cliAppsCatalog": "Install only the app-specific CLI adapters nanobot can run locally; native apps stay untouched.", "cliAppsCatalog": "Install only the app-specific CLI adapters nanobot can run locally; native apps stay untouched.",
"cliAppsFilter": "Search by app, category, or capability.", "cliAppsFilter": "Search by app, category, or capability.",

View File

@ -97,7 +97,7 @@
"imageDefaults": "Valores predeterminados", "imageDefaults": "Valores predeterminados",
"webSearch": "Búsqueda web", "webSearch": "Búsqueda web",
"webBehavior": "Comportamiento", "webBehavior": "Comportamiento",
"identity": "Identidad", "regional": "Configuración regional",
"webuiSafety": "Seguridad de WebUI", "webuiSafety": "Seguridad de WebUI",
"capabilities": "Capacidades", "capabilities": "Capacidades",
"cliApps": "Aplicaciones CLI", "cliApps": "Aplicaciones CLI",
@ -136,8 +136,6 @@
"defaultImageSize": "Tamaño predeterminado", "defaultImageSize": "Tamaño predeterminado",
"maxImagesPerTurn": "Máx. imágenes por turno", "maxImagesPerTurn": "Máx. imágenes por turno",
"imageSaveDir": "Directorio de guardado", "imageSaveDir": "Directorio de guardado",
"botName": "Nombre del bot",
"botIcon": "Icono del bot",
"timezone": "Zona horaria", "timezone": "Zona horaria",
"workspacePath": "Workspace predeterminado", "workspacePath": "Workspace predeterminado",
"localServiceAccess": "Servicios locales", "localServiceAccess": "Servicios locales",
@ -179,8 +177,6 @@
"defaultAspectRatio": "Se usa cuando el prompt no elige una proporción.", "defaultAspectRatio": "Se usa cuando el prompt no elige una proporción.",
"defaultImageSize": "Pista de tamaño enviada a proveedores compatibles.", "defaultImageSize": "Pista de tamaño enviada a proveedores compatibles.",
"maxImagesPerTurn": "Límite superior para una solicitud generate_image.", "maxImagesPerTurn": "Límite superior para una solicitud generate_image.",
"botName": "Se muestra donde nanobot usa un nombre visible.",
"botIcon": "Emoji o texto corto junto al nombre del bot.",
"timezone": "Se usa para horarios y respuestas con conciencia temporal.", "timezone": "Se usa para horarios y respuestas con conciencia temporal.",
"localServiceAccess": "Permite que comandos shell con Full Access alcancen servicios localhost.", "localServiceAccess": "Permite que comandos shell con Full Access alcancen servicios localhost.",
"webuiDefaultAccess": "Usado por chats web sin permiso específico de proyecto.", "webuiDefaultAccess": "Usado por chats web sin permiso específico de proyecto.",

View File

@ -97,7 +97,7 @@
"imageDefaults": "Valeurs par défaut", "imageDefaults": "Valeurs par défaut",
"webSearch": "Recherche web", "webSearch": "Recherche web",
"webBehavior": "Comportement", "webBehavior": "Comportement",
"identity": "Identité", "regional": "Paramètres régionaux",
"webuiSafety": "Sécurité WebUI", "webuiSafety": "Sécurité WebUI",
"capabilities": "Capacités", "capabilities": "Capacités",
"cliApps": "Applications CLI", "cliApps": "Applications CLI",
@ -136,8 +136,6 @@
"defaultImageSize": "Taille par défaut", "defaultImageSize": "Taille par défaut",
"maxImagesPerTurn": "Images max. par tour", "maxImagesPerTurn": "Images max. par tour",
"imageSaveDir": "Dossier denregistrement", "imageSaveDir": "Dossier denregistrement",
"botName": "Nom du bot",
"botIcon": "Icône du bot",
"timezone": "Fuseau horaire", "timezone": "Fuseau horaire",
"workspacePath": "Espace de travail par défaut", "workspacePath": "Espace de travail par défaut",
"localServiceAccess": "Services locaux", "localServiceAccess": "Services locaux",
@ -179,8 +177,6 @@
"defaultAspectRatio": "Utilisé lorsque le prompt ne choisit pas de ratio.", "defaultAspectRatio": "Utilisé lorsque le prompt ne choisit pas de ratio.",
"defaultImageSize": "Indication de taille envoyée aux fournisseurs compatibles.", "defaultImageSize": "Indication de taille envoyée aux fournisseurs compatibles.",
"maxImagesPerTurn": "Limite supérieure pour une requête generate_image.", "maxImagesPerTurn": "Limite supérieure pour une requête generate_image.",
"botName": "Affiché là où nanobot utilise un nom visible.",
"botIcon": "Emoji ou texte court affiché avec le nom du bot.",
"timezone": "Utilisé pour les horaires et les réponses tenant compte du temps.", "timezone": "Utilisé pour les horaires et les réponses tenant compte du temps.",
"localServiceAccess": "Autorise les commandes shell Full Access à atteindre les services localhost.", "localServiceAccess": "Autorise les commandes shell Full Access à atteindre les services localhost.",
"webuiDefaultAccess": "Utilisé par les chats web sans permission propre au projet.", "webuiDefaultAccess": "Utilisé par les chats web sans permission propre au projet.",

View File

@ -97,7 +97,7 @@
"imageDefaults": "Default", "imageDefaults": "Default",
"webSearch": "Pencarian web", "webSearch": "Pencarian web",
"webBehavior": "Perilaku", "webBehavior": "Perilaku",
"identity": "Identitas", "regional": "Regional",
"webuiSafety": "Keamanan WebUI", "webuiSafety": "Keamanan WebUI",
"capabilities": "Kemampuan", "capabilities": "Kemampuan",
"cliApps": "Aplikasi CLI", "cliApps": "Aplikasi CLI",
@ -136,8 +136,6 @@
"defaultImageSize": "Ukuran default", "defaultImageSize": "Ukuran default",
"maxImagesPerTurn": "Maks. gambar per giliran", "maxImagesPerTurn": "Maks. gambar per giliran",
"imageSaveDir": "Direktori simpan", "imageSaveDir": "Direktori simpan",
"botName": "Nama bot",
"botIcon": "Ikon bot",
"timezone": "Zona waktu", "timezone": "Zona waktu",
"workspacePath": "Workspace default", "workspacePath": "Workspace default",
"localServiceAccess": "Layanan lokal", "localServiceAccess": "Layanan lokal",
@ -179,8 +177,6 @@
"defaultAspectRatio": "Se usa cuando el prompt no elige una proporción.", "defaultAspectRatio": "Se usa cuando el prompt no elige una proporción.",
"defaultImageSize": "Petunjuk ukuran yang dikirim ke penyedia yang mendukungnya.", "defaultImageSize": "Petunjuk ukuran yang dikirim ke penyedia yang mendukungnya.",
"maxImagesPerTurn": "Batas atas untuk satu permintaan generate_image.", "maxImagesPerTurn": "Batas atas untuk satu permintaan generate_image.",
"botName": "Se muestra donde nanobot usa un nombre visible.",
"botIcon": "Emoji o texto corto junto al nombre del bot.",
"timezone": "Se usa para horarios y respuestas con conciencia temporal.", "timezone": "Se usa para horarios y respuestas con conciencia temporal.",
"localServiceAccess": "Izinkan perintah shell Full Access menjangkau layanan localhost.", "localServiceAccess": "Izinkan perintah shell Full Access menjangkau layanan localhost.",
"webuiDefaultAccess": "Digunakan oleh chat web tanpa izin khusus proyek.", "webuiDefaultAccess": "Digunakan oleh chat web tanpa izin khusus proyek.",

View File

@ -97,7 +97,7 @@
"imageDefaults": "既定値", "imageDefaults": "既定値",
"webSearch": "ウェブ検索", "webSearch": "ウェブ検索",
"webBehavior": "動作", "webBehavior": "動作",
"identity": "ID", "regional": "地域",
"webuiSafety": "WebUI の安全性", "webuiSafety": "WebUI の安全性",
"capabilities": "機能", "capabilities": "機能",
"cliApps": "CLI アプリ", "cliApps": "CLI アプリ",
@ -136,8 +136,6 @@
"defaultImageSize": "既定のサイズ", "defaultImageSize": "既定のサイズ",
"maxImagesPerTurn": "1 ターンの最大画像数", "maxImagesPerTurn": "1 ターンの最大画像数",
"imageSaveDir": "保存先ディレクトリ", "imageSaveDir": "保存先ディレクトリ",
"botName": "Bot 名",
"botIcon": "Bot アイコン",
"timezone": "タイムゾーン", "timezone": "タイムゾーン",
"workspacePath": "既定のワークスペース", "workspacePath": "既定のワークスペース",
"localServiceAccess": "ローカルサービス", "localServiceAccess": "ローカルサービス",
@ -179,8 +177,6 @@
"defaultAspectRatio": "プロンプトで比率が指定されていない場合に使用します。", "defaultAspectRatio": "プロンプトで比率が指定されていない場合に使用します。",
"defaultImageSize": "対応しているプロバイダーへ送信するサイズ指定です。", "defaultImageSize": "対応しているプロバイダーへ送信するサイズ指定です。",
"maxImagesPerTurn": "1 回の generate_image リクエストで生成できる画像数の上限です。", "maxImagesPerTurn": "1 回の generate_image リクエストで生成できる画像数の上限です。",
"botName": "nanobot が表示名を使う場所に表示されます。",
"botIcon": "Bot 名の横に表示する短い emoji またはテキストです。",
"timezone": "スケジュールと時刻を考慮する返信に使用します。", "timezone": "スケジュールと時刻を考慮する返信に使用します。",
"localServiceAccess": "Full Access の shell コマンドが localhost サービスにアクセスできるようにします。", "localServiceAccess": "Full Access の shell コマンドが localhost サービスにアクセスできるようにします。",
"webuiDefaultAccess": "プロジェクト固有の権限がない Web チャットで使用します。", "webuiDefaultAccess": "プロジェクト固有の権限がない Web チャットで使用します。",

View File

@ -97,7 +97,7 @@
"imageDefaults": "기본값", "imageDefaults": "기본값",
"webSearch": "웹 검색", "webSearch": "웹 검색",
"webBehavior": "동작", "webBehavior": "동작",
"identity": "ID", "regional": "지역",
"webuiSafety": "WebUI 보안", "webuiSafety": "WebUI 보안",
"capabilities": "기능", "capabilities": "기능",
"cliApps": "CLI 앱", "cliApps": "CLI 앱",
@ -136,8 +136,6 @@
"defaultImageSize": "기본 크기", "defaultImageSize": "기본 크기",
"maxImagesPerTurn": "턴당 최대 이미지 수", "maxImagesPerTurn": "턴당 최대 이미지 수",
"imageSaveDir": "저장 디렉터리", "imageSaveDir": "저장 디렉터리",
"botName": "Bot 이름",
"botIcon": "Bot 아이콘",
"timezone": "시간대", "timezone": "시간대",
"workspacePath": "기본 작업공간", "workspacePath": "기본 작업공간",
"localServiceAccess": "로컬 서비스", "localServiceAccess": "로컬 서비스",
@ -179,8 +177,6 @@
"defaultAspectRatio": "프롬프트가 비율을 선택하지 않을 때 사용됩니다.", "defaultAspectRatio": "프롬프트가 비율을 선택하지 않을 때 사용됩니다.",
"defaultImageSize": "지원하는 제공자에 보낼 크기 힌트입니다.", "defaultImageSize": "지원하는 제공자에 보낼 크기 힌트입니다.",
"maxImagesPerTurn": "한 번의 generate_image 요청에서 생성할 수 있는 이미지 상한입니다.", "maxImagesPerTurn": "한 번의 generate_image 요청에서 생성할 수 있는 이미지 상한입니다.",
"botName": "nanobot이 표시 이름을 사용하는 곳에 표시됩니다.",
"botIcon": "Bot 이름 옆에 표시할 짧은 emoji 또는 텍스트입니다.",
"timezone": "일정과 시간 인식 답변에 사용됩니다.", "timezone": "일정과 시간 인식 답변에 사용됩니다.",
"localServiceAccess": "Full Access shell 명령이 localhost 서비스에 접근할 수 있게 합니다.", "localServiceAccess": "Full Access shell 명령이 localhost 서비스에 접근할 수 있게 합니다.",
"webuiDefaultAccess": "프로젝트별 권한이 없는 Web 채팅에 사용됩니다.", "webuiDefaultAccess": "프로젝트별 권한이 없는 Web 채팅에 사용됩니다.",

View File

@ -99,7 +99,7 @@
"webBehavior": "Comportamento", "webBehavior": "Comportamento",
"cliApps": "Apps CLI", "cliApps": "Apps CLI",
"mcp": "Servidores MCP", "mcp": "Servidores MCP",
"identity": "Identidade", "regional": "Regional",
"webuiSafety": "Segurança da WebUI", "webuiSafety": "Segurança da WebUI",
"capabilities": "Capacidades", "capabilities": "Capacidades",
"apps": "Aplicativos", "apps": "Aplicativos",
@ -190,8 +190,6 @@
"defaultImageSize": "Tamanho padrão", "defaultImageSize": "Tamanho padrão",
"maxImagesPerTurn": "Máx. de imagens por turno", "maxImagesPerTurn": "Máx. de imagens por turno",
"imageSaveDir": "Diretório de salvamento", "imageSaveDir": "Diretório de salvamento",
"botName": "Nome do bot",
"botIcon": "Ícone do bot",
"timezone": "Fuso horário", "timezone": "Fuso horário",
"workspacePath": "Workspace padrão", "workspacePath": "Workspace padrão",
"localServiceAccess": "Serviços locais", "localServiceAccess": "Serviços locais",
@ -235,8 +233,6 @@
"defaultAspectRatio": "Usado quando o prompt não escolhe uma proporção.", "defaultAspectRatio": "Usado quando o prompt não escolhe uma proporção.",
"defaultImageSize": "Dica de tamanho enviada a provedores compatíveis.", "defaultImageSize": "Dica de tamanho enviada a provedores compatíveis.",
"maxImagesPerTurn": "Limite superior para uma requisição de generate_image.", "maxImagesPerTurn": "Limite superior para uma requisição de generate_image.",
"botName": "Exibido sempre que o nanobot usa um nome visível.",
"botIcon": "Emoji ou texto curto exibido junto ao nome do bot.",
"timezone": "Usado para agendamentos e respostas sensíveis ao horário.", "timezone": "Usado para agendamentos e respostas sensíveis ao horário.",
"cliAppsCatalog": "Instale apenas os adaptadores CLI de apps que o nanobot pode executar localmente; apps nativos permanecem intactos.", "cliAppsCatalog": "Instale apenas os adaptadores CLI de apps que o nanobot pode executar localmente; apps nativos permanecem intactos.",
"cliAppsFilter": "Busque por app, categoria ou capacidade.", "cliAppsFilter": "Busque por app, categoria ou capacidade.",

View File

@ -97,7 +97,7 @@
"imageDefaults": "Mặc định", "imageDefaults": "Mặc định",
"webSearch": "Tìm kiếm web", "webSearch": "Tìm kiếm web",
"webBehavior": "Hành vi", "webBehavior": "Hành vi",
"identity": "Danh tính", "regional": "Khu vực",
"webuiSafety": "An toàn WebUI", "webuiSafety": "An toàn WebUI",
"capabilities": "Khả năng", "capabilities": "Khả năng",
"cliApps": "Ứng dụng CLI", "cliApps": "Ứng dụng CLI",
@ -136,8 +136,6 @@
"defaultImageSize": "Kích thước mặc định", "defaultImageSize": "Kích thước mặc định",
"maxImagesPerTurn": "Ảnh tối đa mỗi lượt", "maxImagesPerTurn": "Ảnh tối đa mỗi lượt",
"imageSaveDir": "Thư mục lưu", "imageSaveDir": "Thư mục lưu",
"botName": "Tên bot",
"botIcon": "Biểu tượng bot",
"timezone": "Múi giờ", "timezone": "Múi giờ",
"workspacePath": "Workspace mặc định", "workspacePath": "Workspace mặc định",
"localServiceAccess": "Dịch vụ cục bộ", "localServiceAccess": "Dịch vụ cục bộ",
@ -179,8 +177,6 @@
"defaultAspectRatio": "Se usa cuando el prompt no elige una proporción.", "defaultAspectRatio": "Se usa cuando el prompt no elige una proporción.",
"defaultImageSize": "Gợi ý kích thước gửi tới nhà cung cấp hỗ trợ.", "defaultImageSize": "Gợi ý kích thước gửi tới nhà cung cấp hỗ trợ.",
"maxImagesPerTurn": "Giới hạn trên cho một yêu cầu generate_image.", "maxImagesPerTurn": "Giới hạn trên cho một yêu cầu generate_image.",
"botName": "Se muestra donde nanobot usa un nombre visible.",
"botIcon": "Emoji o texto corto junto al nombre del bot.",
"timezone": "Se usa para horarios y respuestas con conciencia temporal.", "timezone": "Se usa para horarios y respuestas con conciencia temporal.",
"localServiceAccess": "Cho phép lệnh shell Full Access truy cập dịch vụ localhost.", "localServiceAccess": "Cho phép lệnh shell Full Access truy cập dịch vụ localhost.",
"webuiDefaultAccess": "Dùng cho chat web không có quyền riêng theo dự án.", "webuiDefaultAccess": "Dùng cho chat web không có quyền riêng theo dự án.",

View File

@ -99,7 +99,7 @@
"webBehavior": "行为", "webBehavior": "行为",
"cliApps": "CLI 应用", "cliApps": "CLI 应用",
"mcp": "MCP 服务", "mcp": "MCP 服务",
"identity": "身份", "regional": "区域",
"webuiSafety": "WebUI 安全", "webuiSafety": "WebUI 安全",
"capabilities": "能力", "capabilities": "能力",
"apps": "应用", "apps": "应用",
@ -190,8 +190,6 @@
"defaultImageSize": "默认尺寸", "defaultImageSize": "默认尺寸",
"maxImagesPerTurn": "每轮最大图片数", "maxImagesPerTurn": "每轮最大图片数",
"imageSaveDir": "保存目录", "imageSaveDir": "保存目录",
"botName": "Bot 名称",
"botIcon": "Bot 图标",
"timezone": "时区", "timezone": "时区",
"workspacePath": "默认工作区", "workspacePath": "默认工作区",
"localServiceAccess": "本机服务", "localServiceAccess": "本机服务",
@ -235,8 +233,6 @@
"defaultAspectRatio": "当提示词没有指定比例时使用。", "defaultAspectRatio": "当提示词没有指定比例时使用。",
"defaultImageSize": "发送给支持此选项的提供商的尺寸提示。", "defaultImageSize": "发送给支持此选项的提供商的尺寸提示。",
"maxImagesPerTurn": "单次 generate_image 请求可生成的图片上限。", "maxImagesPerTurn": "单次 generate_image 请求可生成的图片上限。",
"botName": "显示在 nanobot 使用展示名称的地方。",
"botIcon": "显示在 Bot 名称旁的短 emoji 或文字。",
"timezone": "用于日程和需要时间感知的回复。", "timezone": "用于日程和需要时间感知的回复。",
"cliAppsCatalog": "只安装 nanobot 可本地运行的应用 CLI 适配器;不会改动原生应用。", "cliAppsCatalog": "只安装 nanobot 可本地运行的应用 CLI 适配器;不会改动原生应用。",
"cliAppsFilter": "按应用、类别或能力搜索。", "cliAppsFilter": "按应用、类别或能力搜索。",

View File

@ -97,7 +97,7 @@
"imageDefaults": "預設值", "imageDefaults": "預設值",
"webSearch": "網頁搜尋", "webSearch": "網頁搜尋",
"webBehavior": "行為", "webBehavior": "行為",
"identity": "身分", "regional": "區域",
"webuiSafety": "WebUI 安全", "webuiSafety": "WebUI 安全",
"capabilities": "能力", "capabilities": "能力",
"cliApps": "CLI 應用程式", "cliApps": "CLI 應用程式",
@ -136,8 +136,6 @@
"defaultImageSize": "預設尺寸", "defaultImageSize": "預設尺寸",
"maxImagesPerTurn": "每輪最大圖片數", "maxImagesPerTurn": "每輪最大圖片數",
"imageSaveDir": "儲存目錄", "imageSaveDir": "儲存目錄",
"botName": "Bot 名稱",
"botIcon": "Bot 圖示",
"timezone": "時區", "timezone": "時區",
"workspacePath": "預設工作區", "workspacePath": "預設工作區",
"localServiceAccess": "本機服務", "localServiceAccess": "本機服務",
@ -179,8 +177,6 @@
"defaultAspectRatio": "提示詞未指定比例時使用。", "defaultAspectRatio": "提示詞未指定比例時使用。",
"defaultImageSize": "傳送給支援此選項的供應商的尺寸提示。", "defaultImageSize": "傳送給支援此選項的供應商的尺寸提示。",
"maxImagesPerTurn": "單次 generate_image 請求可產生的圖片數上限。", "maxImagesPerTurn": "單次 generate_image 請求可產生的圖片數上限。",
"botName": "顯示於 nanobot 所有使用顯示名稱的位置。",
"botIcon": "顯示在 Bot 名稱旁的短 emoji 或文字。",
"timezone": "用於排程,以及需要時間資訊的回覆。", "timezone": "用於排程,以及需要時間資訊的回覆。",
"localServiceAccess": "允許具有完整存取權的 shell 命令存取 localhost 服務。", "localServiceAccess": "允許具有完整存取權的 shell 命令存取 localhost 服務。",
"webuiDefaultAccess": "用於未指定個別專案權限的 Web 聊天。", "webuiDefaultAccess": "用於未指定個別專案權限的 Web 聊天。",

View File

@ -858,8 +858,6 @@ export async function updateSettings(
query.set("context_window_tokens", String(update.contextWindowTokens)); query.set("context_window_tokens", String(update.contextWindowTokens));
} }
if (update.timezone !== undefined) query.set("timezone", update.timezone); if (update.timezone !== undefined) query.set("timezone", update.timezone);
if (update.botName !== undefined) query.set("bot_name", update.botName);
if (update.botIcon !== undefined) query.set("bot_icon", update.botIcon);
if (update.toolHintMaxLength !== undefined) { if (update.toolHintMaxLength !== undefined) {
query.set("tool_hint_max_length", String(update.toolHintMaxLength)); query.set("tool_hint_max_length", String(update.toolHintMaxLength));
} }

View File

@ -490,8 +490,6 @@ export interface SettingsPayload {
temperature: number; temperature: number;
reasoning_effort: string | null; reasoning_effort: string | null;
timezone: string; timezone: string;
bot_name: string;
bot_icon: string;
tool_hint_max_length: number; tool_hint_max_length: number;
}; };
model_presets: Array<{ model_presets: Array<{
@ -1028,8 +1026,6 @@ export interface SettingsUpdate {
modelPreset?: string | null; modelPreset?: string | null;
contextWindowTokens?: number; contextWindowTokens?: number;
timezone?: string; timezone?: string;
botName?: string;
botIcon?: string;
toolHintMaxLength?: number; toolHintMaxLength?: number;
} }

View File

@ -413,13 +413,11 @@ describe("webui API helpers", () => {
provider: "openrouter", provider: "openrouter",
contextWindowTokens: 262144, contextWindowTokens: 262144,
timezone: "Asia/Shanghai", timezone: "Asia/Shanghai",
botName: "nanobot",
botIcon: "nb",
toolHintMaxLength: 120, toolHintMaxLength: 120,
}); });
expect(fetch).toHaveBeenCalledWith( expect(fetch).toHaveBeenCalledWith(
"/api/settings/update?model_preset=default&model=openrouter%2Ftest&provider=openrouter&context_window_tokens=262144&timezone=Asia%2FShanghai&bot_name=nanobot&bot_icon=nb&tool_hint_max_length=120", "/api/settings/update?model_preset=default&model=openrouter%2Ftest&provider=openrouter&context_window_tokens=262144&timezone=Asia%2FShanghai&tool_hint_max_length=120",
expect.objectContaining({ expect.objectContaining({
headers: { Authorization: "Bearer tok" }, headers: { Authorization: "Bearer tok" },
}), }),

View File

@ -62,8 +62,6 @@ function baseSettingsPayload() {
temperature: 0.1, temperature: 0.1,
reasoning_effort: null, reasoning_effort: null,
timezone: "UTC", timezone: "UTC",
bot_name: "nanobot",
bot_icon: "nb",
tool_hint_max_length: 40, tool_hint_max_length: 40,
}, },
model_presets: [{ model_presets: [{
@ -1761,8 +1759,6 @@ describe("App layout", () => {
temperature: 0.1, temperature: 0.1,
reasoning_effort: null, reasoning_effort: null,
timezone: "UTC", timezone: "UTC",
bot_name: "nanobot",
bot_icon: "nb",
tool_hint_max_length: 40, tool_hint_max_length: 40,
}, },
model_presets: [ model_presets: [
@ -2089,7 +2085,10 @@ describe("App layout", () => {
expect(screen.queryByDisplayValue("unsaved-brave-key")).not.toBeInTheDocument(); expect(screen.queryByDisplayValue("unsaved-brave-key")).not.toBeInTheDocument();
fireEvent.click(within(settingsNav).getByRole("button", { name: "System" })); fireEvent.click(within(settingsNav).getByRole("button", { name: "System" }));
expect(screen.getByText("Bot name")).toBeInTheDocument(); expect(screen.getByText("Regional")).toBeInTheDocument();
expect(screen.getByText("Timezone")).toBeInTheDocument();
expect(screen.queryByText("Bot name")).not.toBeInTheDocument();
expect(screen.queryByText("Bot icon")).not.toBeInTheDocument();
expect(screen.queryByText("Tool hint length")).not.toBeInTheDocument(); expect(screen.queryByText("Tool hint length")).not.toBeInTheDocument();
expect(screen.queryByText("Heartbeat")).not.toBeInTheDocument(); expect(screen.queryByText("Heartbeat")).not.toBeInTheDocument();
expect(screen.queryByText("Dream")).not.toBeInTheDocument(); expect(screen.queryByText("Dream")).not.toBeInTheDocument();
@ -2281,8 +2280,6 @@ describe("App layout", () => {
temperature: 0.1, temperature: 0.1,
reasoning_effort: null, reasoning_effort: null,
timezone: "UTC", timezone: "UTC",
bot_name: "nanobot",
bot_icon: "nb",
tool_hint_max_length: 40, tool_hint_max_length: 40,
}, },
model_presets: [ model_presets: [

View File

@ -30,8 +30,6 @@ function settingsPayload(): SettingsPayload {
temperature: 0.1, temperature: 0.1,
reasoning_effort: null, reasoning_effort: null,
timezone: "UTC", timezone: "UTC",
bot_name: "nanobot",
bot_icon: "nb",
tool_hint_max_length: 40, tool_hint_max_length: 40,
}, },
model_presets: [{ model_presets: [{

View File

@ -309,8 +309,6 @@ function modelSettings(model: string, provider: string): SettingsPayload {
temperature: 0.7, temperature: 0.7,
reasoning_effort: null, reasoning_effort: null,
timezone: "UTC", timezone: "UTC",
bot_name: "nanobot",
bot_icon: "",
tool_hint_max_length: 40, tool_hint_max_length: 40,
}, },
model_presets: [{ model_presets: [{