feat(webui): expand and organize settings with autosave (#5704)

* feat(webui): expand settings with autosave and live configuration

* feat(memory): add long-term memory and idle compaction switches

* refactor(webui): clarify settings hierarchy and align compact controls

* refactor(webui): keep only memory consolidation in memory settings

* refactor(webui): defer runtime changes until explicit restart

* refactor(webui): remove default workspace setting

* fix(webui): align model lists and remove preset counters

* fix(i18n): use natural Chinese labels for chat platforms

* fix(i18n): shorten chat settings navigation label

* fix(webui): match settings navigation icons to text size

* refactor(webui): remove redundant settings sidebar heading

* refactor(webui): use icon-only back navigation in settings

* fix(webui): remove back arrow hover hint

* refactor(webui): remove redundant overview details

* refactor(webui): hide secondary descriptions in settings rows

* style(webui): replace settings dividers with rounded highlights

* refactor(webui): remove redundant model list subtitles and badges

* fix(i18n): restore chat translation namespace boundaries

* fix(i18n): complete settings translations for all locales

* fix(webui): reveal settings only for enabled capabilities

* fix(webui): consolidate capabilities and isolate settings feedback

* fix(webui): clear restart notices when settings are reverted

* fix(webui): anchor restart controls in settings sidebar

* fix(webui): shorten sidebar restart label

* fix(webui): align settings spacing and control sizes

* refactor(webui): unify settings dialogs and interaction feedback

* fix(webui): keep settings option groups on one line without scrolling

* refactor(webui): align settings spacing and sidebar icon proportions

* style(webui): match main sidebar typography to settings

* style(webui): use monospace for sidebar session handles

* refactor(webui): remove heartbeat configuration from automations

* feat(webui): expose configuration actions beside capability toggles

* style(webui): remove ellipsis from configuration actions

* refactor(webui): remove redundant app configuration controls

* feat(webui): add compact sidebar navigation and shortcut hints

* fix(webui): synchronize npm dependency lockfile

* test(webui): align input radius expectation with pill styling

* feat(webui): show daily token usage and cache breakdown

* feat(webui): add model usage details and cache hit rates

* feat(webui): chart daily token usage by model

* refactor(webui): simplify usage details and model labels

* fix(webui): hide usage dialog date range

* refactor(webui): consolidate model usage into chart legends

* fix(webui): enforce restart choices and correct settings test route

* fix(webui): polish settings localization and controls

* fix(webui): avoid repeated usage legend labels

* fix(webui): skip empty usage columns in keyboard navigation

* test(webui): assert settings behavior positively

* feat(webui): refine sidebar navigation and add drag resizing

* style(webui): soften sidebar scroll edges

* style(webui): harmonize sidebar typography and text colors

* feat(webui): move channels to the main sidebar

* style(webui): remove dotted underlines from settings hints

* fix(webui): unify tooltip hover delay

* fix(webui): support Seatbelt sandbox settings

* fix(webui): remove unused appearance density preference

* fix(webui): align settings input values consistently

* style(webui): group compact settings controls before inputs

* feat(webui): edit multiline settings in compact dialogs

* feat(webui): add continuous settings scrolling with gentle snapping

* Revert "feat(webui): add continuous settings scrolling with gentle snapping"

This reverts commit f0978c261a53c844185eeab4d0c3190fbd196fe6.
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-10 11:10:51 +08:00
1 parent 20f115bf46
commit 8ea683679d
244 files changed
+6929 -3900

No files matched your search

+96 -38
View File
@@ -12,9 +12,12 @@ import { Eye, EyeOff, Moon, ShieldCheck, Sun, X } from "lucide-react";
import { useTranslation } from "react-i18next";
import { channelUiPresentation } from "@/channel-plugins/registry";
import { Sidebar } from "@/components/Sidebar";
import { SidebarResizeHandle, SIDEBAR_MIN_WIDTH, SIDEBAR_MAX_WIDTH } from "@/components/SidebarResizeHandle";
import { matchSidebarShortcut } from "@/lib/sidebar-shortcuts";
import type { SidebarDeleteItem } from "@/components/ChatList";
import type { SettingsSectionKey } from "@/components/settings/SettingsView";
import { ThreadVisibilityContext } from "@/hooks/useThreadVisibility";
import type { SettingsExitGuard } from "@/components/settings/contracts";
import { PaneWorkbench } from "@/components/workbench/PaneWorkbench";
import {
MAX_WORKBENCH_PANES,
@@ -109,6 +112,7 @@ const RESTART_STARTED_KEY = "nanobot-webui.restartStartedAt";
const RESTART_ROUTE_KEY = "nanobot-webui.restartRoute";
const RESTART_ROUTE_TTL_MS = 5 * 60 * 1000;
const SIDEBAR_WIDTH = 272;
const SIDEBAR_WIDTH_STORAGE_KEY = "nanobot-webui.sidebar.width";
const SIDEBAR_RAIL_WIDTH = 56;
const MOBILE_SIDEBAR_WIDTH = `min(${SIDEBAR_WIDTH}px, calc(100vw - 0.75rem))`;
const TOKEN_REFRESH_MARGIN_MS = 30_000;
@@ -116,7 +120,7 @@ const TOKEN_REFRESH_MIN_DELAY_MS = 5_000;
const PAIRING_POLL_INTERVAL_MS = 5_000;
const PAIRING_IDLE_POLL_INTERVAL_MS = 15_000;
const PAIRING_DISMISS_SNOOZE_MS = 30_000;
type ShellView = "chat" | "settings" | "apps" | "automations" | "skills";
type ShellView = "chat" | "settings" | "apps" | "automations" | "skills" | "channels";
type ShellRoute = {
view: ShellView;
activeKey: string | null;
@@ -161,7 +165,9 @@ function SurfaceLoadingFallback({ label }: { label?: string }) {
}
const SETTINGS_SECTION_KEYS: SettingsSectionKey[] = [
"capabilities",
"overview",
"about",
"appearance",
"models",
"image",
@@ -170,6 +176,7 @@ const SETTINGS_SECTION_KEYS: SettingsSectionKey[] = [
"channels",
"apps",
"automations",
"memory",
"skills",
"runtime",
"advanced",
@@ -184,7 +191,7 @@ function defaultShellRoute(): ShellRoute {
}
function shellViewForSettingsSection(section: SettingsSectionKey): ShellView {
if (section === "apps" || section === "automations" || section === "skills") return section;
if (section === "apps" || section === "automations" || section === "skills" || section === "channels") return section;
return "settings";
}
@@ -252,6 +259,9 @@ function readShellRoute(): ShellRoute {
if (path === "/automations") {
return { view: "automations", activeKey, settingsSection: "automations" };
}
if (path === "/channels") {
return { view: "channels", activeKey, settingsSection: "channels" };
}
if (path === "/skills") {
return { view: "skills", activeKey, settingsSection: "skills" };
}
@@ -430,6 +440,16 @@ function AuthForm({
);
}
function readSidebarWidth(): number {
try {
const width = Number(window.localStorage.getItem(SIDEBAR_WIDTH_STORAGE_KEY));
return Number.isFinite(width) && width >= SIDEBAR_MIN_WIDTH
? Math.min(SIDEBAR_MAX_WIDTH, width) : SIDEBAR_WIDTH;
} catch {
return SIDEBAR_WIDTH;
}
}
function readSidebarOpen(): boolean {
if (typeof window === "undefined") return true;
try {
@@ -1042,6 +1062,8 @@ function Shell({
useState<SettingsSectionKey>(initialRouteRef.current.settingsSection);
const [hostSidebarOpen, setHostSidebarOpen] =
useState<boolean>(readSidebarOpen);
const [sidebarWidth, setSidebarWidth] = useState(readSidebarWidth);
const [sidebarDragging, setSidebarDragging] = useState(false);
const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false);
const [sessionSearchOpen, setSessionSearchOpen] = useState(false);
const mobileWorkbench = useMediaQuery("(max-width: 767px)");
@@ -1089,6 +1111,12 @@ function Shell({
const skills = useSkills(getToken);
const pageVisible = usePageVisibility();
const [settingsSnapshot, setSettingsSnapshot] = useState<SettingsPayload | null>(null);
const settingsExitGuardRef = useRef<SettingsExitGuard | null>(null);
const currentShellRouteRef = useRef<ShellRoute>({ view, activeKey, settingsSection: settingsInitialSection });
currentShellRouteRef.current = { view, activeKey, settingsSection: settingsInitialSection };
const registerSettingsExitGuard = useCallback((guard: SettingsExitGuard | null) => {
settingsExitGuardRef.current = guard;
}, []);
const [workspaceError, setWorkspaceError] = useState<string | null>(null);
const [draftWorkspaceScope, setDraftWorkspaceScope] =
useState<WorkspaceScopePayload | null>(null);
@@ -1119,10 +1147,15 @@ function Shell({
const navigate = useCallback(
(route: ShellRoute, options?: { replace?: boolean }) => {
setActiveKey(route.activeKey);
setView(route.view);
setSettingsInitialSection(route.settingsSection);
writeShellRoute(route, options?.replace);
const leave = () => {
setActiveKey(route.activeKey);
setView(route.view);
setSettingsInitialSection(route.settingsSection);
writeShellRoute(route, options?.replace);
};
if (currentShellRouteRef.current.view === "settings" && route.view !== "settings" && settingsExitGuardRef.current) {
settingsExitGuardRef.current(leave);
} else leave();
},
[],
);
@@ -1130,6 +1163,18 @@ function Shell({
useEffect(() => {
const applyRoute = () => {
const route = readShellRoute();
if (currentShellRouteRef.current.view === "settings" && route.view !== "settings" && settingsExitGuardRef.current) {
writeShellRoute(currentShellRouteRef.current, true);
settingsExitGuardRef.current(() => {
setActiveKey(route.activeKey);
setView(route.view);
setSettingsInitialSection(route.settingsSection);
writeShellRoute(route, true);
setWorkspaceError(null);
if (route.view === "chat" && !route.activeKey) setDraftWorkspaceScope(null);
});
return;
}
setActiveKey(route.activeKey);
setView(route.view);
setSettingsInitialSection(route.settingsSection);
@@ -1184,7 +1229,12 @@ function Shell({
} catch {
// ignore storage errors (private mode, etc.)
}
}, [hostSidebarOpen]);
try {
window.localStorage.setItem(SIDEBAR_WIDTH_STORAGE_KEY, String(sidebarWidth));
} catch {
// Storage can be unavailable in private browsing.
}
}, [hostSidebarOpen, sidebarWidth]);
useEffect(() => {
writeSessionUpdateChatIds(updatedChatIds);
@@ -1442,10 +1492,6 @@ function Shell({
});
}, [client, loading, sessions]);
const closeHostSidebar = useCallback(() => {
setHostSidebarOpen(false);
}, []);
const openHostSidebar = useCallback(() => {
setHostSidebarOpen(true);
}, []);
@@ -1884,28 +1930,6 @@ function Shell({
updateWorkbenchState,
]);
useEffect(() => {
const handleKeyDown = (event: globalThis.KeyboardEvent) => {
if (event.defaultPrevented) return;
const commandShiftO =
(event.metaKey || event.ctrlKey) && event.shiftKey && !event.altKey;
if (commandShiftO && event.key.toLowerCase() === "o") {
event.preventDefault();
onNewChat();
return;
}
const plainCommandK =
(event.metaKey || event.ctrlKey) && !event.altKey && !event.shiftKey;
if (!plainCommandK) return;
if (event.key.toLowerCase() !== "k") return;
event.preventDefault();
onOpenSessionSearch();
};
window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
}, [onNewChat, onOpenSessionSearch]);
const onSelectSearchResult = useCallback(
(key: string) => {
setSessionSearchOpen(false);
@@ -1916,7 +1940,7 @@ function Shell({
const onOpenSettings = useCallback((section: SettingsSectionKey = "overview") => {
setSessionSearchOpen(false);
navigate({ view: "settings", activeKey, settingsSection: section });
navigate({ view: shellViewForSettingsSection(section), activeKey, settingsSection: section });
setMobileSidebarOpen(false);
}, [activeKey, navigate]);
@@ -1940,12 +1964,31 @@ function Shell({
setMobileSidebarOpen(false);
}, [activeKey, navigate]);
const onOpenChannels = useCallback(() => {
setSessionSearchOpen(false);
navigate({ view: "channels", activeKey, settingsSection: "channels" });
setMobileSidebarOpen(false);
}, [activeKey, navigate]);
const onOpenSkills = useCallback(() => {
setSessionSearchOpen(false);
navigate({ view: "skills", activeKey, settingsSection: "skills" });
setMobileSidebarOpen(false);
}, [activeKey, navigate]);
useEffect(() => {
const actions = { newChat: onNewChat, search: onOpenSessionSearch, apps: onOpenApps,
skills: onOpenSkills, automations: onOpenAutomations, channels: onOpenChannels, settings: () => onOpenSettings() };
const handleKeyDown = (event: globalThis.KeyboardEvent) => {
const action = matchSidebarShortcut(event);
if (!action) return;
event.preventDefault();
actions[action]();
};
window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
}, [onNewChat, onOpenSessionSearch, onOpenApps, onOpenSkills, onOpenAutomations, onOpenChannels, onOpenSettings]);
const onSettingsSectionChange = useCallback(
(section: SettingsSectionKey) => {
navigate({
@@ -2426,6 +2469,10 @@ function Shell({
});
return;
}
if (view === "channels") {
document.title = t("app.documentTitle.chat", { title: t("settings.nav.channels") });
return;
}
if (view === "skills") {
document.title = t("app.documentTitle.chat", {
title: t("settings.nav.skills", { defaultValue: "Skills" }),
@@ -2486,10 +2533,11 @@ function Shell({
onOpenSettings,
onOpenApps,
onOpenAutomations,
onOpenChannels,
onOpenSkills,
onSettingsIntent,
onOpenSearch: onOpenSessionSearch,
activeUtility: view === "apps" || view === "automations" || view === "skills" ? view : null,
activeUtility: view === "apps" || view === "automations" || view === "skills" || view === "channels" ? view : null,
onToggleArchived,
pinnedKeys: sidebarPinnedTabKeys,
archivedKeys: sidebarArchivedTabKeys,
@@ -2507,7 +2555,7 @@ function Shell({
archivedCount: sidebarArchivedTabKeys.length,
defaultWorkspacePath: workspaces?.default_scope.project_path ?? null,
};
const hostSidebarFlowWidth = hostSidebarOpen ? SIDEBAR_WIDTH : SIDEBAR_RAIL_WIDTH;
const hostSidebarFlowWidth = hostSidebarOpen ? sidebarWidth : SIDEBAR_RAIL_WIDTH;
useEffect(() => {
document.documentElement.classList.toggle("native-host", showHostChrome);
@@ -2555,9 +2603,10 @@ function Shell({
{showMainSidebar ? (
<aside
data-testid="host-sidebar-flow"
id="main-sidebar"
className={cn(
"relative z-20 hidden shrink-0 overflow-hidden lg:block",
"transition-[width] duration-300 ease-out",
sidebarDragging ? "select-none" : "transition-[width] duration-300 ease-out motion-reduce:transition-none",
)}
style={{
width: hostSidebarFlowWidth,
@@ -2575,10 +2624,18 @@ function Shell({
{...sidebarProps}
collapsed={!hostSidebarOpen}
hostChromeInset={showHostChrome}
onCollapse={closeHostSidebar}
onExpand={openHostSidebar}
/>
</div>
<SidebarResizeHandle
width={sidebarWidth}
open={hostSidebarOpen}
onDraggingChange={setSidebarDragging}
onResize={(width, open) => {
if (open) setSidebarWidth(width);
setHostSidebarOpen(open);
}}
/>
</aside>
) : null}
@@ -2764,6 +2821,7 @@ function Shell({
<div className="absolute inset-0 flex flex-col">
<Suspense fallback={<SurfaceLoadingFallback />}>
<SettingsView
registerExitGuard={registerSettingsExitGuard}
theme={theme}
initialSection={settingsInitialSection}
initialSettings={settingsSnapshot}
+1
View File
@@ -7,6 +7,7 @@ import type {
} from "@/lib/types";
export type ChannelPluginPanelProps = {
connectRequestId?: number;
token: string;
feature: NanobotFeatureInfo;
actionKey: string | null;
+39 -39
View File
@@ -132,11 +132,11 @@ function SidebarSessionHandle({ handle }: { handle: ChatSummary["handle"] }) {
return (
<span
data-sidebar-session-handle
className="flex max-w-20 shrink-0 items-center overflow-hidden whitespace-nowrap text-[11px] font-medium leading-5"
className="flex max-w-20 shrink-0 items-center overflow-hidden whitespace-nowrap font-mono text-[11px] font-medium leading-5"
>
<span
data-sidebar-session-handle-underline
className="inline border-b-2 text-foreground"
className="inline border-b-2 text-sidebar-muted-foreground"
style={{
"--sidebar-session-handle-color": sessionHandleColor(handle.id),
borderBottomColor: "var(--sidebar-session-handle-color)",
@@ -545,7 +545,7 @@ export const ChatList = memo(function ChatList({
if (loading && sessions.length === 0 && temporarySessions.length === 0) {
return (
<div className="px-3 py-6 text-[12px] text-muted-foreground">
<div className="px-3 py-6 text-[12px] text-sidebar-muted-foreground">
{t("chat.loading")}
</div>
);
@@ -553,7 +553,7 @@ export const ChatList = memo(function ChatList({
if (sessions.length === 0 && temporarySessions.length === 0) {
return (
<div className="px-3 py-6 text-[12px] leading-5 text-muted-foreground/80">
<div className="px-3 py-6 text-[12px] leading-5 text-sidebar-muted-foreground">
{emptyLabel ?? t("chat.noSessions")}
</div>
);
@@ -627,8 +627,8 @@ export const ChatList = memo(function ChatList({
closeDeleteSelection();
};
return (
<TooltipProvider delayDuration={650} skipDelayDuration={120}>
<div className="h-full min-h-0 min-w-0 overflow-x-hidden overflow-y-auto overscroll-contain scrollbar-thin scrollbar-track-transparent">
<TooltipProvider>
<div className="sidebar-scroll-fade h-full min-h-0 min-w-0 overflow-x-hidden overflow-y-auto overscroll-contain py-4 scrollbar-thin scrollbar-track-transparent">
<div
data-chat-list-content
data-pane-detach-target={
@@ -713,7 +713,7 @@ export const ChatList = memo(function ChatList({
return (
<section key={group.id} aria-label={group.label} className="relative z-[1]">
{index === firstProjectGroupIndex ? (
<div className="px-2 pb-1 text-[12px] font-medium text-muted-foreground/65">
<div className="px-2 pb-1 text-[12px] font-medium text-sidebar-muted-foreground">
{labels.projects}
</div>
) : null}
@@ -948,12 +948,12 @@ export const ChatList = memo(function ChatList({
actionMenus.openFromContextMenu(event, actionMenuId)
)}
className={cn(
"group flex min-w-0 max-w-full items-center gap-1 rounded-control px-2 text-[13px]",
"group flex min-w-0 max-w-full items-center gap-1 rounded-control px-2 text-[13px] font-normal leading-5",
SIDEBAR_SELECTION_ITEM_CLASS,
compact ? "min-h-7" : "min-h-8",
topicActive
? "text-sidebar-foreground"
: "text-sidebar-foreground/82 hover:text-sidebar-foreground",
: "text-sidebar-content hover:text-sidebar-accent-foreground",
deleteSelectionMode && (tabSelected || tabPartiallySelected)
&& "bg-sidebar-accent/55 text-sidebar-accent-foreground",
)}
@@ -995,12 +995,12 @@ export const ChatList = memo(function ChatList({
{projectMode ? (
<span className="relative flex w-full min-w-0 items-center gap-2">
<SidebarSessionHandle handle={s.handle} />
<span className="min-w-0 flex-1 truncate font-medium leading-5">
<span className="min-w-0 flex-1 truncate font-normal leading-5">
{title}
</span>
{isPinned ? <PinnedChatIndicator /> : null}
{timestamp ? (
<span className="shrink-0 text-[11.5px] font-medium text-muted-foreground/58">
<span className="shrink-0 text-[11.5px] font-medium text-sidebar-muted-foreground">
{timestamp}
</span>
) : null}
@@ -1009,7 +1009,7 @@ export const ChatList = memo(function ChatList({
) : (
<span className="relative flex w-full min-w-0 items-center gap-1.5">
<SidebarSessionHandle handle={s.handle} />
<span className="min-w-0 flex-1 truncate font-medium leading-5">
<span className="min-w-0 flex-1 truncate font-normal leading-5">
{title}
</span>
{isPinned ? <PinnedChatIndicator /> : null}
@@ -1017,12 +1017,12 @@ export const ChatList = memo(function ChatList({
</span>
)}
{showPreview ? (
<span className="block w-full truncate text-[11.5px] leading-4 text-muted-foreground/72">
<span className="block w-full truncate text-[11.5px] leading-4 text-sidebar-muted-foreground">
{preview}
</span>
) : null}
{timestamp && !projectMode ? (
<span className="block w-full truncate text-[11px] leading-4 text-muted-foreground/58">
<span className="block w-full truncate text-[11px] leading-4 text-sidebar-muted-foreground">
{timestamp}
</span>
) : null}
@@ -1039,7 +1039,7 @@ export const ChatList = memo(function ChatList({
>
<DropdownMenuTrigger
className={cn(
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground/75 opacity-0 transition-opacity",
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-sidebar-muted-foreground opacity-0 transition-opacity",
"hover:bg-sidebar-accent hover:text-sidebar-foreground group-hover:opacity-100",
"focus-visible:opacity-100 data-[state=open]:opacity-100",
)}
@@ -1134,7 +1134,7 @@ export const ChatList = memo(function ChatList({
Math.min(totalSessionCount, limit + VISIBLE_SESSIONS_INCREMENT),
)
}
className="h-8 w-full rounded-full text-[12px] font-medium text-muted-foreground/65 transition-colors hover:bg-sidebar-accent/65 hover:text-muted-foreground"
className="h-8 w-full rounded-full text-[12px] font-medium text-sidebar-muted-foreground transition-colors hover:bg-sidebar-accent/65 hover:text-sidebar-muted-foreground"
>
{t("chat.showMore", { count: hiddenSessionCount })}
</button>
@@ -1151,7 +1151,7 @@ export const ChatList = memo(function ChatList({
aria-label={t("chat.cancelSelection", {
defaultValue: "Cancel selection",
})}
className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground"
className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sidebar-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground"
>
<X className="h-4 w-4" aria-hidden />
</button>
@@ -1220,7 +1220,7 @@ function WorkbenchTabHeader({
data-workbench-tab
onContextMenu={(event) => actionMenus.openFromContextMenu(event, actionMenuId)}
className={cn(
"group/tab flex min-w-0 items-center gap-0.5 rounded-control px-1.5 text-sidebar-foreground/85",
"group/tab flex min-w-0 items-center gap-0.5 rounded-control px-1.5 text-sidebar-content",
collapsed ? "min-h-6" : "min-h-7",
)}
>
@@ -1238,7 +1238,7 @@ function WorkbenchTabHeader({
aria-pressed={deleteSelectionMode ? selected : undefined}
className={cn(
"flex min-w-0 flex-1 items-center gap-2 overflow-hidden px-0.5 py-1 text-left",
"text-[12.5px] font-normal leading-5",
"text-[13px] font-normal leading-5",
deleteSelectionMode && "cursor-default",
)}
>
@@ -1246,7 +1246,7 @@ function WorkbenchTabHeader({
<SelectionIndicator checked={selected} partial={partiallySelected} />
) : null}
<FolderTree
className="h-3.5 w-3.5 shrink-0 text-muted-foreground/70"
className="h-3.5 w-3.5 shrink-0 text-sidebar-muted-foreground"
strokeWidth={1.75}
aria-hidden
/>
@@ -1263,7 +1263,7 @@ function WorkbenchTabHeader({
<DropdownMenuTrigger
className={cn(
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md",
"text-muted-foreground/75 opacity-0 transition-opacity",
"text-sidebar-muted-foreground opacity-0 transition-opacity",
"hover:bg-sidebar-accent hover:text-sidebar-foreground group-hover/tab:opacity-100",
"focus-visible:opacity-100 data-[state=open]:opacity-100",
)}
@@ -1308,7 +1308,7 @@ function WorkbenchTabHeader({
onClick={onToggle}
className={cn(
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md",
"text-muted-foreground/70 transition-[background-color,color,transform] duration-150 ease-out",
"text-sidebar-muted-foreground transition-[background-color,color,transform] duration-150 ease-out",
"hover:bg-sidebar-accent hover:text-sidebar-foreground active:scale-[0.96]",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",
"motion-reduce:transition-none motion-reduce:active:scale-100",
@@ -1426,12 +1426,12 @@ function ActivePaneRows({
actionMenus.openFromContextMenu(event, actionMenuId)
)}
className={cn(
"group/pane flex min-w-0 max-w-full items-center gap-1 rounded-control px-2 text-[13px]",
"group/pane flex min-w-0 max-w-full items-center gap-1 rounded-control px-2 text-[13px] font-normal leading-5",
SIDEBAR_SELECTION_ITEM_CLASS,
compact ? "min-h-7" : "min-h-8",
active
? "text-sidebar-foreground"
: "text-sidebar-foreground/82 hover:text-sidebar-foreground",
: "text-sidebar-content hover:text-sidebar-accent-foreground",
deleteSelectionMode && selected
&& "bg-sidebar-accent/55 text-sidebar-accent-foreground",
)}
@@ -1457,7 +1457,7 @@ function ActivePaneRows({
aria-current={active ? "true" : undefined}
aria-pressed={deleteSelectionMode ? selected : undefined}
className={cn(
"flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left font-medium leading-5",
"flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left font-normal leading-5",
canDragSession && "cursor-grab active:cursor-grabbing",
compact ? "py-1" : "py-1.5",
deleteSelectionMode && "cursor-default",
@@ -1481,7 +1481,7 @@ function ActivePaneRows({
>
<DropdownMenuTrigger
className={cn(
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground/70 opacity-0 transition-opacity",
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-sidebar-muted-foreground opacity-0 transition-opacity",
"hover:bg-sidebar-accent hover:text-sidebar-foreground group-hover/pane:opacity-100",
"focus-visible:opacity-100 data-[state=open]:opacity-100",
)}
@@ -1576,7 +1576,7 @@ function SelectionIndicator({
aria-hidden
className={cn(
"h-4 w-4 shrink-0",
checked || partial ? "text-primary" : "text-muted-foreground/55",
checked || partial ? "text-primary" : "text-sidebar-muted-foreground",
)}
/>
);
@@ -1605,7 +1605,7 @@ function MoveToGroupSubmenu({
onSelect={() => onMove(target.key)}
>
<span className="min-w-0 max-w-56 flex-1 truncate">{target.title}</span>
<span className="shrink-0 tabular-nums text-muted-foreground/70">
<span className="shrink-0 tabular-nums text-sidebar-muted-foreground">
· {target.paneCount}/{MAX_WORKBENCH_PANES}
</span>
</DropdownMenuItem>
@@ -1642,11 +1642,11 @@ function TemporaryChatSection({
<div
data-temporary-chat-row={session.key}
className={cn(
"group flex min-h-8 min-w-0 max-w-full items-center gap-2 rounded-xl px-2 text-[13px]",
"group flex min-h-8 min-w-0 max-w-full items-center gap-2 rounded-xl px-2 text-[13px] font-normal leading-5",
SIDEBAR_SELECTION_ITEM_CLASS,
active
? "bg-sidebar-selected text-sidebar-accent-foreground"
: "text-sidebar-foreground/82 hover:bg-sidebar-foreground/[0.035] hover:text-sidebar-foreground dark:hover:bg-white/[0.05]",
: "text-sidebar-content settings-hover hover:text-sidebar-accent-foreground",
)}
>
<button
@@ -1659,7 +1659,7 @@ function TemporaryChatSection({
className="h-3.5 w-3.5 shrink-0 text-[hsl(var(--temporary-foreground))]"
aria-hidden
/>
<span className="min-w-0 flex-1 truncate font-medium leading-5">
<span className="min-w-0 flex-1 truncate font-normal leading-5">
{title}
</span>
</button>
@@ -1669,7 +1669,7 @@ function TemporaryChatSection({
type="button"
aria-label={t("temporaryChat.closeAction", { title })}
onClick={() => onClose(session.key)}
className="inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:bg-destructive/10 hover:text-destructive focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60"
className="inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-sidebar-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60"
>
<X className="h-3.5 w-3.5" aria-hidden />
</button>
@@ -1725,7 +1725,7 @@ function ProjectGroupHeader({
onContextMenu={onRequestRename || onNewChat
? (event) => actionMenus.openFromContextMenu(event, actionMenuId)
: undefined}
className="group flex min-w-0 items-center gap-1 px-1 pb-1 pt-1 text-[12px] font-medium text-muted-foreground/78"
className="group flex min-w-0 items-center gap-1 px-1 pb-1 pt-1 text-[13px] font-normal leading-5 text-sidebar-content"
>
{path ? (
<Tooltip>
@@ -1736,7 +1736,7 @@ function ProjectGroupHeader({
</Tooltip>
) : projectButton}
{updatedAt ? (
<span className="shrink-0 text-[11px] text-muted-foreground/55">
<span className="shrink-0 text-[11px] text-sidebar-muted-foreground">
{relativeTime(updatedAt)}
</span>
) : null}
@@ -1748,7 +1748,7 @@ function ProjectGroupHeader({
>
<DropdownMenuTrigger
className={cn(
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground/70 opacity-0 transition-opacity",
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-sidebar-muted-foreground opacity-0 transition-opacity",
"hover:bg-sidebar-accent hover:text-sidebar-foreground group-hover:opacity-100 focus-visible:opacity-100",
"data-[state=open]:opacity-100",
)}
@@ -1786,7 +1786,7 @@ function ProjectGroupHeader({
onClick={onToggle}
className={cn(
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md",
"text-muted-foreground/70 transition-[background-color,color,transform] duration-150 ease-out",
"text-sidebar-muted-foreground transition-[background-color,color,transform] duration-150 ease-out",
"hover:bg-sidebar-accent hover:text-sidebar-foreground active:scale-[0.96]",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",
"motion-reduce:transition-none motion-reduce:active:scale-100",
@@ -1808,7 +1808,7 @@ function ProjectGroupHeader({
function ChatsGroupHeader({ label }: { label: string }) {
return (
<div className="px-2 pb-1 text-[12px] font-medium text-muted-foreground/65">
<div className="px-2 pb-1 text-[12px] font-medium text-sidebar-muted-foreground">
{label}
</div>
);
@@ -1819,7 +1819,7 @@ function PinnedChatIndicator() {
<span
data-sidebar-pinned-indicator
aria-hidden="true"
className="inline-flex shrink-0 items-center text-muted-foreground/65"
className="inline-flex shrink-0 items-center text-sidebar-muted-foreground"
>
<Pin className="h-3.5 w-3.5" aria-hidden="true" />
</span>
@@ -1845,7 +1845,7 @@ function ChatsFoldFooter({
<button
type="button"
onClick={onToggle}
className="h-7 w-full rounded-xl text-left text-[12px] font-medium text-muted-foreground/65 transition-colors hover:bg-sidebar-accent/50 hover:text-muted-foreground"
className="h-7 w-full rounded-xl text-left text-[12px] font-medium text-sidebar-muted-foreground transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-muted-foreground"
>
<span className="px-2">
{folded
+1 -1
View File
@@ -60,7 +60,7 @@ export function FileReferenceChip({
openPreview(event);
};
return (
<TooltipProvider delayDuration={500} skipDelayDuration={100}>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<span
+13 -52
View File
@@ -1,60 +1,21 @@
import { Globe } from "lucide-react";
import { useTranslation } from "react-i18next";
import { setAppLanguage } from "@/i18n";
import {
currentLocale,
} from "@/i18n";
import {
localeOption,
supportedLocales,
type SupportedLocale,
} from "@/i18n/config";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuLabel,
DropdownMenuRadioGroup,
DropdownMenuRadioItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { currentLocale, setAppLanguage } from "@/i18n";
import { supportedLocales, type SupportedLocale } from "@/i18n/config";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
export function LanguageSwitcher() {
const { t } = useTranslation();
const locale = currentLocale();
const selected = localeOption(locale);
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
size="sm"
aria-label={t("sidebar.language.ariaLabel")}
className="h-7 gap-1.5 rounded-md px-2 text-[11px] text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-foreground"
>
<Globe className="h-3.5 w-3.5" />
<span className="max-w-[7rem] truncate">{selected.nativeLabel}</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuLabel>{t("sidebar.language.label")}</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuRadioGroup
value={locale}
onValueChange={(value) => {
void setAppLanguage(value as SupportedLocale);
}}
>
{supportedLocales.map((option) => (
<DropdownMenuRadioItem key={option.code} value={option.code}>
{option.nativeLabel}
</DropdownMenuRadioItem>
))}
</DropdownMenuRadioGroup>
</DropdownMenuContent>
</DropdownMenu>
<Select value={currentLocale()} onValueChange={(value) => { void setAppLanguage(value as SupportedLocale); }}>
<SelectTrigger className="min-w-40 rounded-full" aria-label={t("sidebar.language.ariaLabel")}>
<SelectValue />
</SelectTrigger>
<SelectContent>
{supportedLocales.map((option) => (
<SelectItem key={option.code} value={option.code}>{option.nativeLabel}</SelectItem>
))}
</SelectContent>
</Select>
);
}
+3 -3
View File
@@ -302,7 +302,7 @@ function IncomingSessionMessage({
</div>
</div>
{createdAtLabel || showCopyAction ? (
<TooltipProvider delayDuration={220} skipDelayDuration={80}>
<TooltipProvider>
<div
className="mt-1 flex min-h-8 items-center gap-1.5 text-muted-foreground"
>
@@ -422,7 +422,7 @@ export function MessageBubble({
</p>
) : null}
{showDeliveryStatus || showCreatedAt || (hasText && showCopyAction) ? (
<TooltipProvider delayDuration={220} skipDelayDuration={80}>
<TooltipProvider>
<div className="flex min-h-8 items-center justify-end gap-1.5 text-muted-foreground">
{showCreatedAt ? (
<MessageTimestamp
@@ -524,7 +524,7 @@ export function MessageBubble({
</>
)}
{showAssistantFooterSlot ? (
<TooltipProvider delayDuration={220} skipDelayDuration={80}>
<TooltipProvider>
<div
data-assistant-footer
data-state={showAssistantFooterRow ? "visible" : "reserved"}
+99 -67
View File
@@ -8,7 +8,8 @@ import {
Archive,
Brain,
CalendarClock,
Menu,
MessageCircle,
PanelLeftClose,
Search,
Settings,
SquarePen,
@@ -27,11 +28,13 @@ import {
SidebarSelectionHighlight,
} from "@/components/SidebarSelectionHighlight";
import { Button } from "@/components/ui/button";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import type {
ChatSummary,
SidebarViewState,
} from "@/lib/types";
import { cn } from "@/lib/utils";
import { sidebarShortcutAria, sidebarShortcutLabel } from "@/lib/sidebar-shortcuts";
interface SidebarProps {
sessions: ChatSummary[];
@@ -64,11 +67,12 @@ interface SidebarProps {
onOpenApps: () => void;
onOpenSkills: () => void;
onOpenAutomations: () => void;
onOpenChannels: () => void;
onSettingsIntent?: () => void;
onOpenSearch: () => void;
activeUtility?: "apps" | "skills" | "automations" | null;
activeUtility?: "apps" | "skills" | "automations" | "channels" | null;
onToggleArchived: () => void;
onCollapse: () => void;
onCollapse?: () => void;
onExpand?: () => void;
containActionMenus?: boolean;
collapsed?: boolean;
@@ -102,38 +106,62 @@ function isApplePlatform(): boolean {
return /mac|iphone|ipad|ipod/i.test(`${platform} ${userAgentPlatform}`);
}
function newChatShortcutLabel(): string {
return isApplePlatform() ? "⌘⇧O" : "Ctrl+Shift+O";
}
export function Sidebar(props: SidebarProps) {
const { t } = useTranslation();
const [menuPortalContainer, setMenuPortalContainer] =
useState<HTMLElement | null>(null);
const collapsed = Boolean(props.collapsed);
const toggleLabel = t("thread.header.toggleSidebar");
const newChatShortcut = newChatShortcutLabel();
const apple = isApplePlatform();
const activeActionRef = useRef<HTMLButtonElement>(null);
const activeActionId = props.newChatActive
const activeActionId = collapsed && props.newChatActive
? "new-chat"
: props.activeUtility
? `utility:${props.activeUtility}`
: null;
const newChatButton = (
<SidebarActionButton
collapsed={collapsed}
label={t("sidebar.newChat")}
iconOnly
className={collapsed ? undefined : "rounded-full border border-border/70 bg-background/80 shadow-sm"}
onClick={props.onNewChat}
active={props.newChatActive}
selectionRef={collapsed ? activeActionRef : undefined}
icon={<SquarePen className="h-4 w-4" />}
shortcut={sidebarShortcutLabel("newChat", apple)}
ariaKeyShortcuts={sidebarShortcutAria("newChat")}
/>
);
const searchButton = (
<SidebarActionButton
collapsed={collapsed}
label={t("sidebar.searchAria")}
shortcut={sidebarShortcutLabel("search", apple)}
ariaKeyShortcuts={sidebarShortcutAria("search")}
iconOnly
onClick={props.onOpenSearch}
icon={<Search className="h-4 w-4" />}
/>
);
return (
<TooltipProvider>
<nav
ref={props.containActionMenus ? setMenuPortalContainer : undefined}
aria-label={t("sidebar.navigation")}
className={cn(
"flex h-full w-full min-w-0 flex-col text-sidebar-foreground",
"flex h-full w-full min-w-0 flex-col text-sidebar-content",
props.hostChromeInset ? "bg-transparent" : "bg-sidebar",
)}
>
<div
data-testid="sidebar-brand-row"
className={cn(
"flex items-start px-3 pb-2.5 pt-3",
collapsed ? "w-14 justify-start" : "justify-between",
"flex items-start gap-1 pb-4 pt-3",
collapsed ? "w-14 justify-start px-3" : "justify-between ps-4 pe-2",
)}
>
<button
@@ -145,11 +173,11 @@ export function Sidebar(props: SidebarProps) {
onClick={collapsed ? props.onExpand : undefined}
tabIndex={collapsed ? 0 : -1}
className={cn(
"host-no-drag flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-xl transition-colors",
"host-no-drag flex h-8 w-8 shrink-0 items-center justify-center rounded-xl transition-colors",
props.hostChromeInset && "mt-5",
collapsed
? "-ml-0.5 hover:bg-sidebar-accent/75"
: "pointer-events-none -ml-0.5",
? "hover:bg-sidebar-accent/60"
: "pointer-events-none",
)}
>
<img
@@ -160,15 +188,14 @@ export function Sidebar(props: SidebarProps) {
/>
</button>
{!collapsed && (
<Button
variant="ghost"
size="icon"
aria-label={t("sidebar.collapse")}
onClick={props.onCollapse}
className="host-no-drag mt-1 h-7 w-7 rounded-lg text-muted-foreground/85 hover:bg-sidebar-accent/75 hover:text-sidebar-foreground"
>
<Menu className="h-3.5 w-3.5" />
</Button>
<div className={cn("flex min-w-0 flex-1 items-center justify-end gap-1", props.hostChromeInset && "mt-5")}>
{searchButton}
{newChatButton}
{props.onCollapse && (
<SidebarActionButton collapsed={false} label={t("sidebar.collapse")} iconOnly
onClick={props.onCollapse} icon={<PanelLeftClose className="h-4 w-4" />} />
)}
</div>
)}
</div>
@@ -177,29 +204,16 @@ export function Sidebar(props: SidebarProps) {
activeId={activeActionId}
scope="actions"
className={cn(
"relative space-y-1.5 px-2 pb-2",
collapsed && "flex w-14 flex-col items-center px-0",
"relative gap-0.5 pb-3",
collapsed ? "flex w-14 flex-col items-center px-0" : "flex flex-col px-2",
)}
>
<SidebarActionButton
collapsed={collapsed}
label={t("sidebar.newChat")}
onClick={props.onNewChat}
active={props.newChatActive}
selectionRef={activeActionRef}
icon={<SquarePen className="h-4 w-4" />}
shortcut={newChatShortcut}
ariaKeyShortcuts="Meta+Shift+O Control+Shift+O"
/>
<SidebarActionButton
collapsed={collapsed}
label={t("sidebar.searchAria")}
onClick={props.onOpenSearch}
icon={<Search className="h-4 w-4" />}
/>
{collapsed && <>{newChatButton}{searchButton}</>}
<SidebarActionButton
collapsed={collapsed}
label={t("sidebar.apps")}
shortcut={sidebarShortcutLabel("apps", apple)}
ariaKeyShortcuts={sidebarShortcutAria("apps")}
onClick={props.onOpenApps}
onIntent={props.onSettingsIntent}
active={props.activeUtility === "apps"}
@@ -209,6 +223,8 @@ export function Sidebar(props: SidebarProps) {
<SidebarActionButton
collapsed={collapsed}
label={t("sidebar.skills.title")}
shortcut={sidebarShortcutLabel("skills", apple)}
ariaKeyShortcuts={sidebarShortcutAria("skills")}
onClick={props.onOpenSkills}
onIntent={props.onSettingsIntent}
active={props.activeUtility === "skills"}
@@ -218,12 +234,25 @@ export function Sidebar(props: SidebarProps) {
<SidebarActionButton
collapsed={collapsed}
label={t("sidebar.automations", { defaultValue: "Automations" })}
shortcut={sidebarShortcutLabel("automations", apple)}
ariaKeyShortcuts={sidebarShortcutAria("automations")}
onClick={props.onOpenAutomations}
onIntent={props.onSettingsIntent}
active={props.activeUtility === "automations"}
selectionRef={activeActionRef}
icon={<CalendarClock className="h-4 w-4" />}
/>
<SidebarActionButton
collapsed={collapsed}
label={t("settings.nav.channels")}
shortcut={sidebarShortcutLabel("channels", apple)}
ariaKeyShortcuts={sidebarShortcutAria("channels")}
onClick={props.onOpenChannels}
onIntent={props.onSettingsIntent}
active={props.activeUtility === "channels"}
selectionRef={activeActionRef}
icon={<MessageCircle className="h-4 w-4" />}
/>
{props.archivedCount ? (
<SidebarActionButton
collapsed={collapsed}
@@ -236,6 +265,7 @@ export function Sidebar(props: SidebarProps) {
<div
className={cn(
"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden transition-opacity duration-200",
props.onExpand && !collapsed && "me-3",
collapsed && "pointer-events-none opacity-0",
)}
>
@@ -288,26 +318,31 @@ export function Sidebar(props: SidebarProps) {
</div>
<div
className={cn(
"flex items-center gap-1 bg-sidebar/55 px-2.5 py-3 text-xs",
"flex items-center justify-between gap-1 bg-sidebar/55 px-2.5 py-3 text-xs",
collapsed && "w-14 flex-col px-0",
)}
>
<SidebarActionButton
collapsed={collapsed}
label={t("sidebar.settings")}
iconOnly
shortcut={sidebarShortcutLabel("settings", apple)}
ariaKeyShortcuts={sidebarShortcutAria("settings")}
onClick={props.onOpenSettings}
onIntent={props.onSettingsIntent}
className={collapsed ? undefined : "flex-1"}
className="w-9"
icon={<Settings className="h-4 w-4" />}
/>
<ConnectionBadge />
</div>
</nav>
</TooltipProvider>
);
}
function SidebarActionButton({
collapsed,
iconOnly = false,
label,
icon,
onClick,
@@ -319,6 +354,7 @@ function SidebarActionButton({
selectionRef,
}: {
collapsed: boolean;
iconOnly?: boolean;
label: string;
icon: ReactNode;
onClick: () => void;
@@ -329,9 +365,9 @@ function SidebarActionButton({
onIntent?: () => void;
selectionRef?: RefObject<HTMLButtonElement>;
}) {
const title = shortcut ? `${label} (${shortcut})` : collapsed ? label : undefined;
const compact = collapsed || iconOnly;
return (
const button = (
<Button
ref={active ? selectionRef : undefined}
type="button"
@@ -339,41 +375,37 @@ function SidebarActionButton({
aria-label={label}
aria-current={active ? "page" : undefined}
aria-keyshortcuts={ariaKeyShortcuts}
title={title}
onClick={() => onClick()}
onFocus={onIntent}
onPointerEnter={onIntent}
className={cn(
"touch-target group h-8 min-w-0 gap-2 overflow-hidden rounded-xl font-medium",
"touch-target group h-8 min-w-0 gap-2 overflow-hidden rounded-xl font-normal",
SIDEBAR_SELECTION_ACTION_ITEM_CLASS,
collapsed
? "w-9 justify-center gap-0 px-0"
: "w-full justify-start gap-2 px-3 text-[12.5px]",
? "w-8 justify-center gap-0 px-0"
: iconOnly ? "w-8 shrink-0 justify-center gap-0 rounded-xl px-0"
: "w-full justify-start gap-2 px-2 text-[13px] leading-5 [&_svg]:h-[18px] [&_svg]:w-[18px] [&_svg]:stroke-[1.75]",
active
? "text-sidebar-accent-foreground"
: "text-sidebar-foreground/85 hover:bg-sidebar-foreground/[0.035] hover:text-sidebar-foreground dark:hover:bg-white/[0.05]",
: "text-sidebar-content settings-hover hover:text-sidebar-accent-foreground",
className,
)}
>
<span
className={cn(
"flex shrink-0 items-center justify-center transition-transform duration-300 ease-out",
collapsed ? "translate-x-0" : "translate-x-0",
)}
aria-hidden
>
<span className="flex shrink-0 items-center justify-center" aria-hidden>
{icon}
</span>
<span
className={cn(
"min-w-0 overflow-hidden truncate whitespace-nowrap transition-[max-width,opacity,transform] duration-200 ease-out",
collapsed
? "max-w-0 -translate-x-1 opacity-0"
: "max-w-[12rem] translate-x-0 opacity-100",
)}
>
{!compact && <span className="min-w-0 max-w-[12rem] truncate whitespace-nowrap">
{label}
</span>
</span>}
</Button>
);
return compact || shortcut ? (
<Tooltip>
<TooltipTrigger asChild>{button}</TooltipTrigger>
<TooltipContent side={collapsed ? "right" : "bottom"} className="flex items-center gap-4">
<span>{label}</span>
{shortcut ? <kbd className="whitespace-nowrap font-sans text-muted-foreground">{shortcut}</kbd> : null}
</TooltipContent>
</Tooltip>
) : button;
}
@@ -0,0 +1,68 @@
import { useRef, type PointerEvent } from "react";
import { useTranslation } from "react-i18next";
export const SIDEBAR_MIN_WIDTH = 220;
export const SIDEBAR_MAX_WIDTH = 480;
interface SidebarResizeHandleProps {
width: number;
open: boolean;
onResize: (width: number, open: boolean) => void;
onDraggingChange: (dragging: boolean) => void;
}
export function SidebarResizeHandle({ width, open, onResize, onDraggingChange }: SidebarResizeHandleProps) {
const { t } = useTranslation();
const drag = useRef<{ x: number; width: number; open: boolean } | null>(null);
const finish = () => {
drag.current = null;
onDraggingChange(false);
};
const move = (event: PointerEvent<HTMLDivElement>) => {
const start = drag.current;
if (!start) return;
const next = start.width + event.clientX - start.x;
const expanded = start.open ? next >= 160 : next >= 200;
start.open = expanded;
onResize(Math.min(SIDEBAR_MAX_WIDTH, Math.max(SIDEBAR_MIN_WIDTH, next)), expanded);
};
return (
<div
role="separator"
tabIndex={0}
aria-label={t("sidebar.resize")}
aria-orientation="vertical"
aria-controls="main-sidebar"
aria-valuemin={56}
aria-valuemax={SIDEBAR_MAX_WIDTH}
aria-valuenow={open ? width : 56}
className="host-no-drag absolute inset-y-0 right-0 z-30 w-3 cursor-grab active:cursor-grabbing touch-none select-none outline-none after:absolute after:top-1/2 after:right-1 after:h-12 after:w-1 after:-translate-y-1/2 after:rounded-full after:bg-transparent hover:after:bg-orange-500/70 active:after:bg-orange-500 focus-visible:after:bg-orange-500"
onPointerDown={(event) => {
if (event.button !== 0) return;
event.preventDefault();
event.currentTarget.setPointerCapture(event.pointerId);
drag.current = { x: event.clientX, width: open ? width : 56, open };
onDraggingChange(true);
}}
onPointerMove={move}
onPointerUp={(event) => {
if (!drag.current) return;
move(event);
finish();
event.currentTarget.releasePointerCapture(event.pointerId);
}}
onPointerCancel={finish}
onLostPointerCapture={finish}
onKeyDown={(event) => {
if (!["ArrowLeft", "ArrowRight", "Home", "End", "Enter"].includes(event.key)) return;
event.preventDefault();
if (event.key === "Home") onResize(width, false);
else if (event.key === "End") onResize(SIDEBAR_MAX_WIDTH, true);
else if (event.key === "Enter") onResize(width, !open);
else if (event.key === "ArrowLeft") onResize(Math.max(SIDEBAR_MIN_WIDTH, width - 32), open && width > SIDEBAR_MIN_WIDTH);
else onResize(open ? Math.min(SIDEBAR_MAX_WIDTH, width + 32) : width, true);
}}
/>
);
}
+285 -171
View File
@@ -1,4 +1,10 @@
import { ChevronLeft, Loader2 } from "lucide-react";
import { useCallback, useEffect, useState, type ReactNode } from "react";
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogLayoutContext, DialogTitle } from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import type { SettingsExitGuard } from "@/components/settings/contracts";
import { isCapabilitySection, type SettingsSectionKey } from "@/components/settings/contracts";
import { SettingsFeature } from "@/components/settings/shared/SettingsFeature";
import { SkillsCatalogSettings } from "@/components/settings/SkillsCatalogSettings";
import { ImageGenerationSettings } from "@/components/settings/capabilities/ImageGenerationSettings";
@@ -14,12 +20,14 @@ import {
ProvidersSettings,
providerFormFromRow,
} from "@/components/settings/models/ProviderSettings";
import { AppearanceSettings, OverviewSettings } from "@/components/settings/overview/OverviewSettings";
import { AboutSettings, AppearanceSettings, OverviewSettings } from "@/components/settings/overview/OverviewSettings";
import { SettingsSidebar, standaloneSectionTitle } from "@/components/settings/SettingsSidebar";
import {
NanobotFeatureInstallDialog,
SettingsGroup,
SettingsRow,
SettingsSectionTitle,
RestartRequiredNotice,
} from "@/components/settings/shared/SettingsControls";
import { AppsCatalogSettings } from "@/components/settings/system/AppsSettings";
import {
@@ -28,12 +36,15 @@ import {
AutomationsSettings,
} from "@/components/settings/system/AutomationsSettings";
import { ChannelsSettings } from "@/components/settings/system/ChannelsSettings";
import { RUNTIME_CONFIG_FIELDS, type RuntimeConfigPage } from "@/components/settings/system/runtime-config-fields";
import { RuntimeConfigSettings } from "@/components/settings/system/RuntimeConfigSettings";
import { RuntimeSettings } from "@/components/settings/system/RuntimeSettings";
import type { SettingsController } from "@/components/settings/useSettingsController";
import type { SkillSummary } from "@/lib/types";
import { cn } from "@/lib/utils";
interface SettingsPageProps {
registerExitGuard?: (guard: SettingsExitGuard | null) => void;
controller: SettingsController;
theme: "light" | "dark";
showSidebar: boolean;
@@ -46,6 +57,7 @@ interface SettingsPageProps {
}
export function SettingsPage({
registerExitGuard,
controller,
theme,
showSidebar,
@@ -56,6 +68,8 @@ export function SettingsPage({
isRestarting,
hostChromeInset,
}: SettingsPageProps) {
const [dialogLayoutAnchor, setDialogLayoutAnchor] = useState<HTMLDivElement | null>(null);
const [pendingExit, setPendingExit] = useState<(() => void) | null>(null);
const {
activeSection,
apiService,
@@ -76,7 +90,6 @@ export function SettingsPage({
beginModelPresetCreation,
cancelModelPresetCreation,
changeModelCallOrder,
channelsQuery,
cliApps,
cliAppsAction,
cliAppsError,
@@ -109,7 +122,6 @@ export function SettingsPage({
handleSaveCustomMcp,
handleToggleProvider,
handleWebSearchProviderChange,
hasPendingRestart,
hostEngineApplying,
imageGenerationDirty,
imageGenerationForm,
@@ -147,7 +159,7 @@ export function SettingsPage({
networkSafetyDirty,
networkSafetyForm,
networkSafetySaving,
pendingRestartSections,
pendingRestartSections: controllerPendingRestartSections,
providerForms,
providerOAuthCompleting,
providerOAuthDialogError,
@@ -173,7 +185,6 @@ export function SettingsPage({
setAutomationsFilter,
setAutomationsQuery,
setAutomationsSort,
setChannelsQuery,
setCliAppsError,
setCliAppsMessage,
setCustomMcpForm,
@@ -216,18 +227,95 @@ export function SettingsPage({
webSearchSaving,
} = controller;
const renderSection = () => {
const restartInProgress = isRestarting || hostEngineApplying;
const requestExit = useCallback<SettingsExitGuard>((leave) => {
if (settings?.requires_restart && !restartInProgress) setPendingExit(() => leave);
else leave();
}, [settings?.requires_restart, restartInProgress]);
useEffect(() => {
registerExitGuard?.(requestExit);
return () => registerExitGuard?.(null);
}, [registerExitGuard, requestExit]);
const backToChat = () => registerExitGuard ? onBackToChat() : requestExit(onBackToChat);
const pendingRestartSections = showSidebar
? { runtime: false, image: false, browser: false }
: controllerPendingRestartSections;
const runtimeConfiguration = (page: RuntimeConfigPage) => settings && (
<RuntimeConfigSettings page={page} settings={settings} state={controller.runtimeConfigState}
onRestart={showSidebar ? undefined : restartViaSettingsSurface} isRestarting={restartInProgress}
remoteBrowserAccess={remoteBrowserAccess}>
{page === "advanced" ? (
<AdvancedSettings
error={controller.capabilityErrors.safety}
form={networkSafetyForm}
dirty={networkSafetyDirty}
saving={networkSafetySaving}
isNativeHostSurface={(settings.surface ?? settings.runtime_surface) === "native"}
onChangeForm={setNetworkSafetyForm}
onSave={saveNetworkSafetySettings}
onRestart={restartViaSettingsSurface}
isRestarting={restartInProgress}
requiresRestartPending={pendingRestartSections.runtime}
/>
) : null}
</RuntimeConfigSettings>
);
const renderSection = (section: SettingsSectionKey, embedded = false): ReactNode => {
if (!settings) return null;
switch (activeSection) {
switch (section) {
case "capabilities": {
const state = controller.runtimeConfigState;
const toggleRuntime = (path: string, enabled: boolean) => {
const field = RUNTIME_CONFIG_FIELDS.find((item) => item.path === path);
if (field) state.change(field, enabled);
};
return (
<section className="settings-stack">
<div className="settings-section-heading">
<SettingsSectionTitle>{t("settings.nav.capabilities")}</SettingsSectionTitle>
{!showSidebar && settings.requires_restart ? <RestartRequiredNotice message={t("settings.status.savedRestartApply")}
onRestart={restartViaSettingsSurface} isRestarting={restartInProgress} /> : null}
</div>
<SettingsFeature title={t("settings.rows.imageGeneration")} enabled={imageGenerationForm.enabled}
error={imageGenerationForm.enabled && !settings.image_generation.providers.find((provider) => provider.name === imageGenerationForm.provider)?.configured
? t("settings.image.missingCredential") : controller.capabilityErrors.image}
disabled={restartInProgress || imageGenerationSaving} initialOpen={activeSection === "image"}
onChange={(enabled) => setImageGenerationForm((prev) => ({ ...prev, enabled }))}>
{renderSection("image", true)}
</SettingsFeature>
<SettingsFeature title={t("settings.rows.transcription")} enabled={transcriptionForm.enabled}
error={controller.capabilityErrors.voice}
disabled={restartInProgress || transcriptionSaving} initialOpen={activeSection === "voice"}
onChange={(enabled) => setTranscriptionForm((prev) => ({ ...prev, enabled }))}>
{renderSection("voice", true)}
</SettingsFeature>
<SettingsFeature title={t("settings.runtimeConfig.groups.web.title")}
enabled={settings.runtime_config ? state.value("tools.web.enable") === true : settings.web.enable}
disabled={restartInProgress || state.saving === "web" || !settings.runtime_config}
initialOpen={activeSection === "browser"} error={state.errors.web || controller.capabilityErrors.web}
onChange={(enabled) => toggleRuntime("tools.web.enable", enabled)}>
{renderSection("browser", true)}
</SettingsFeature>
<SettingsFeature title={t("settings.runtimeConfig.fields.agents_defaults_dream_enabled.label")}
enabled={state.value("agents.defaults.dream.enabled") === true}
disabled={restartInProgress || state.saving === "memory" || !settings.runtime_config} error={state.errors.memory}
onChange={(enabled) => toggleRuntime("agents.defaults.dream.enabled", enabled)} />
{!settings.runtime_config ? <p className="settings-list-inset text-[13px] text-muted-foreground">{t("settings.runtimeConfig.unavailable")}</p> : null}
</section>
);
}
case "overview":
return (
<OverviewSettings
settings={settings}
requiresRestart={hasPendingRestart}
showBrandLogos={localPrefs.brandLogos}
onSelectSection={selectSection}
/>
);
case "about":
return <AboutSettings currentVersion={settings.version?.current} />;
case "appearance":
return (
<AppearanceSettings
@@ -239,7 +327,7 @@ export function SettingsPage({
);
case "models":
return (
<div className="space-y-8">
<div className="settings-stack">
<ModelsSettings
token={token}
form={form}
@@ -305,32 +393,37 @@ export function SettingsPage({
onCreateCustomProvider={createCustomProvider}
onProviderOAuthLogin={(provider) => runProviderOAuth(provider, "login")}
onProviderOAuthLogout={(provider) => runProviderOAuth(provider, "logout")}
imageProviderRestartPending={pendingRestartSections.image || pendingRestartSections.runtime}
onRestart={restartViaSettingsSurface}
isRestarting={isRestarting || hostEngineApplying}
/>
</div>
);
case "image":
return (
<ImageGenerationSettings
token={token}
settings={settings}
form={imageGenerationForm}
dirty={imageGenerationDirty}
saving={imageGenerationSaving}
onChangeForm={setImageGenerationForm}
onSave={saveImageGenerationSettings}
onOpenProviders={() => selectSection("models")}
showBrandLogos={localPrefs.brandLogos}
onRestart={restartViaSettingsSurface}
isRestarting={isRestarting || hostEngineApplying}
requiresRestartPending={pendingRestartSections.image}
/>
<div className="settings-stack">
<ImageGenerationSettings
error={controller.capabilityErrors.image}
embedded={embedded}
token={token}
settings={settings}
form={imageGenerationForm}
dirty={imageGenerationDirty}
saving={imageGenerationSaving}
onChangeForm={setImageGenerationForm}
onSave={saveImageGenerationSettings}
onOpenProviders={() => selectSection("models")}
showBrandLogos={localPrefs.brandLogos}
onRestart={restartViaSettingsSurface}
isRestarting={restartInProgress}
requiresRestartPending={pendingRestartSections.image}
>
{imageGenerationForm.enabled ? runtimeConfiguration("image") : null}
</ImageGenerationSettings>
</div>
);
case "voice":
return (
<TranscriptionSettings
error={controller.capabilityErrors.voice}
embedded={embedded}
settings={settings}
form={transcriptionForm}
dirty={transcriptionDirty}
@@ -340,36 +433,44 @@ export function SettingsPage({
onOpenProviders={() => selectSection("models")}
showBrandLogos={localPrefs.brandLogos}
onRestart={restartViaSettingsSurface}
isRestarting={isRestarting || hostEngineApplying}
isRestarting={restartInProgress}
requiresRestartPending={pendingRestartSections.browser}
/>
);
case "browser":
return (
<WebSettings
settings={settings}
form={webSearchForm}
keyVisible={webSearchKeyVisible}
keyEditing={webSearchKeyEditing}
saving={webSearchSaving}
onChangeForm={setWebSearchForm}
onChangeProvider={handleWebSearchProviderChange}
onToggleKey={() => setWebSearchKeyVisible((visible) => !visible)}
onToggleKeyEditing={() => {
setWebSearchKeyEditing((editing) => !editing);
setWebSearchKeyVisible(false);
setWebSearchForm((prev) => ({ ...prev, apiKey: "" }));
}}
onReset={resetWebSearchDraft}
onSave={saveWebSearch}
showBrandLogos={localPrefs.brandLogos}
onRestart={restartViaSettingsSurface}
isRestarting={isRestarting || hostEngineApplying}
requiresRestartPending={pendingRestartSections.browser}
olostepFeature={featureCatalog.find((feature) => feature.name === "olostep")}
olostepInstalling={nanobotFeatureAction === "enable:olostep"}
capabilityError={nanobotFeaturesError}
/>
<div className="settings-stack">
{!embedded ? runtimeConfiguration("browser") : null}
<WebSettings
error={controller.capabilityErrors.web || controller.runtimeConfigState.errors.web}
embedded={embedded}
enabled={settings.runtime_config
? controller.runtimeConfigState.value("tools.web.enable") !== false
: settings.web.enable}
settings={settings}
form={webSearchForm}
keyVisible={webSearchKeyVisible}
keyEditing={webSearchKeyEditing}
saving={webSearchSaving}
onChangeForm={setWebSearchForm}
onChangeProvider={handleWebSearchProviderChange}
onToggleKey={() => setWebSearchKeyVisible((visible) => !visible)}
onToggleKeyEditing={() => {
setWebSearchKeyEditing((editing) => !editing);
setWebSearchKeyVisible(false);
setWebSearchForm((prev) => ({ ...prev, apiKey: "" }));
}}
onReset={resetWebSearchDraft}
onSave={saveWebSearch}
showBrandLogos={localPrefs.brandLogos}
onRestart={restartViaSettingsSurface}
isRestarting={restartInProgress}
requiresRestartPending={pendingRestartSections.browser}
olostepFeature={featureCatalog.find((feature) => feature.name === "olostep")}
olostepInstalling={nanobotFeatureAction === "enable:olostep"}
capabilityError={nanobotFeaturesError}
/>
</div>
);
case "channels":
return (
@@ -377,154 +478,166 @@ export function SettingsPage({
token={token}
nanobotFeatures={nanobotFeatures}
loading={nanobotFeaturesLoading}
query={channelsQuery}
actionKey={nanobotFeatureAction}
chatAppsDocsUrl={settings.docs?.chat_apps_url}
showBrandLogos={localPrefs.brandLogos}
error={nanobotFeaturesError}
requiresRestartPending={pendingRestartSections.runtime}
onQueryChange={setChannelsQuery}
onAction={handleNanobotFeatureAction}
onFeaturesUpdate={setNanobotFeatures}
onDismissStatus={() => {
setNanobotFeaturesError(null);
}}
onRestart={restartViaSettingsSurface}
isRestarting={isRestarting || hostEngineApplying}
isRestarting={restartInProgress}
/>
);
case "apps":
return (
<AppsCatalogSettings
cliApps={cliApps}
mcpPresets={mcpPresets}
cliAppsLoading={cliAppsLoading}
mcpPresetsLoading={mcpPresetsLoading}
query={appsQuery}
filter={appsKindFilter}
cliActionKey={cliAppsAction}
mcpActionKey={mcpPresetAction}
mcpOAuthFlow={mcpOAuthFlow}
mcpOAuthPopupBlocked={mcpOAuthPopupBlocked}
mcpOAuthCallbackUrl={mcpOAuthCallbackUrl}
mcpOAuthCompleting={mcpOAuthCompleting}
mcpOAuthCallbackError={mcpOAuthCallbackError}
cliMessage={cliAppsMessage}
cliError={cliAppsError}
cliFocusName={cliAppsFocusName}
mcpMessage={mcpMessage}
mcpError={mcpError}
mcpFieldValues={mcpFieldValues}
customMcpForm={customMcpForm}
mcpConfigImport={mcpConfigImport}
showBrandLogos={localPrefs.brandLogos}
requiresRestartPending={pendingRestartSections.runtime}
onQueryChange={setAppsQuery}
onFilterChange={setAppsKindFilter}
onCliAction={handleCliAppAction}
onMcpAction={handleMcpPresetAction}
onMcpOAuthConnect={handleMcpOAuthConnect}
onMcpOAuthCancel={() => void handleMcpOAuthCancel()}
onMcpOAuthOpen={handleMcpOAuthOpen}
onMcpOAuthCallbackUrlChange={(value) => {
setMcpOAuthCallbackUrl(value);
setMcpOAuthCallbackError(null);
}}
onMcpOAuthComplete={() => void handleMcpOAuthComplete()}
onDismissStatus={() => {
setCliAppsMessage(null);
setCliAppsError(null);
setMcpMessage(null);
setMcpError(null);
}}
onBackToChat={onBackToChat}
onMcpFieldChange={(presetName, fieldName, value) => {
setMcpFieldValues((prev) => ({
...prev,
[presetName]: {
...(prev[presetName] ?? {}),
[fieldName]: value,
},
}));
}}
onCustomMcpFormChange={setCustomMcpForm}
onMcpConfigImportChange={setMcpConfigImport}
onSaveCustomMcp={handleSaveCustomMcp}
onImportMcpConfig={handleImportMcpConfig}
onMcpToolsChange={handleMcpToolsChange}
onRestart={restartViaSettingsSurface}
isRestarting={isRestarting || hostEngineApplying}
/>
<div className="settings-stack">
<AppsCatalogSettings
cliApps={cliApps}
mcpPresets={mcpPresets}
cliAppsLoading={cliAppsLoading}
mcpPresetsLoading={mcpPresetsLoading}
query={appsQuery}
filter={appsKindFilter}
cliActionKey={cliAppsAction}
mcpActionKey={mcpPresetAction}
mcpOAuthFlow={mcpOAuthFlow}
mcpOAuthPopupBlocked={mcpOAuthPopupBlocked}
mcpOAuthCallbackUrl={mcpOAuthCallbackUrl}
mcpOAuthCompleting={mcpOAuthCompleting}
mcpOAuthCallbackError={mcpOAuthCallbackError}
cliMessage={cliAppsMessage}
cliError={cliAppsError}
cliFocusName={cliAppsFocusName}
mcpMessage={mcpMessage}
mcpError={mcpError}
mcpFieldValues={mcpFieldValues}
customMcpForm={customMcpForm}
mcpConfigImport={mcpConfigImport}
showBrandLogos={localPrefs.brandLogos}
requiresRestartPending={pendingRestartSections.runtime}
onQueryChange={setAppsQuery}
onFilterChange={setAppsKindFilter}
onCliAction={handleCliAppAction}
onMcpAction={handleMcpPresetAction}
onMcpOAuthConnect={handleMcpOAuthConnect}
onMcpOAuthCancel={() => void handleMcpOAuthCancel()}
onMcpOAuthOpen={handleMcpOAuthOpen}
onMcpOAuthCallbackUrlChange={(value) => {
setMcpOAuthCallbackUrl(value);
setMcpOAuthCallbackError(null);
}}
onMcpOAuthComplete={() => void handleMcpOAuthComplete()}
onDismissStatus={() => {
setCliAppsMessage(null);
setCliAppsError(null);
setMcpMessage(null);
setMcpError(null);
}}
onBackToChat={onBackToChat}
onMcpFieldChange={(presetName, fieldName, value) => {
setMcpFieldValues((prev) => ({
...prev,
[presetName]: {
...(prev[presetName] ?? {}),
[fieldName]: value,
},
}));
}}
onCustomMcpFormChange={setCustomMcpForm}
onMcpConfigImportChange={setMcpConfigImport}
onSaveCustomMcp={handleSaveCustomMcp}
onImportMcpConfig={handleImportMcpConfig}
onMcpToolsChange={handleMcpToolsChange}
onRestart={restartViaSettingsSurface}
isRestarting={restartInProgress}
/>
</div>
);
case "automations":
return (
<AutomationsSettings
payload={automations}
loading={automationsLoading}
query={automationsQuery}
filter={automationsFilter}
sort={automationsSort}
actionKey={automationAction}
error={automationsError}
onQueryChange={setAutomationsQuery}
onFilterChange={setAutomationsFilter}
onSortChange={setAutomationsSort}
onAction={handleAutomationAction}
onRequestEdit={setAutomationPendingEdit}
onRequestDelete={setAutomationPendingDelete}
onBackToChat={onBackToChat}
/>
<div className="settings-stack">
<AutomationsSettings
payload={automations}
loading={automationsLoading}
query={automationsQuery}
filter={automationsFilter}
sort={automationsSort}
actionKey={automationAction}
error={automationsError}
onQueryChange={setAutomationsQuery}
onFilterChange={setAutomationsFilter}
onSortChange={setAutomationsSort}
onAction={handleAutomationAction}
onRequestEdit={setAutomationPendingEdit}
onRequestDelete={setAutomationPendingDelete}
onBackToChat={onBackToChat}
/>
</div>
);
case "skills":
return <SkillsCatalogSettings skills={skills} />;
case "runtime":
return (
<RuntimeSettings
form={form}
settings={settings}
onRestart={restartViaSettingsSurface}
isRestarting={isRestarting || hostEngineApplying}
requiresRestartPending={pendingRestartSections.runtime}
apiService={apiService}
apiServiceLoading={apiServiceLoading}
apiServiceAction={apiServiceAction}
apiServiceError={apiServiceError}
langfuseFeature={featureCatalog.find((feature) => feature.name === "langfuse")}
capabilitiesLoading={nanobotFeaturesLoading}
capabilityAction={nanobotFeatureAction}
capabilityError={nanobotFeaturesError}
onApiServiceAction={handleApiServiceAction}
onInstallCapability={(name) => void installCapabilities([name])}
/>
<div className="settings-stack">
{runtimeConfiguration("runtime")}
<RuntimeSettings
form={form}
settings={settings}
onRestart={showSidebar ? undefined : restartViaSettingsSurface}
isRestarting={restartInProgress}
requiresRestartPending={pendingRestartSections.runtime}
apiService={apiService}
apiServiceLoading={apiServiceLoading}
apiServiceAction={apiServiceAction}
apiServiceError={apiServiceError}
langfuseFeature={featureCatalog.find((feature) => feature.name === "langfuse")}
capabilitiesLoading={nanobotFeaturesLoading}
capabilityAction={nanobotFeatureAction}
capabilityError={nanobotFeaturesError}
onApiServiceAction={handleApiServiceAction}
onInstallCapability={(name) => void installCapabilities([name])}
/>
</div>
);
case "memory":
return runtimeConfiguration("memory");
case "advanced":
return (
<AdvancedSettings
form={networkSafetyForm}
dirty={networkSafetyDirty}
saving={networkSafetySaving}
isNativeHostSurface={(settings.surface ?? settings.runtime_surface) === "native"}
onChangeForm={setNetworkSafetyForm}
onSave={saveNetworkSafetySettings}
onRestart={restartViaSettingsSurface}
isRestarting={isRestarting || hostEngineApplying}
requiresRestartPending={pendingRestartSections.runtime}
/>
);
return runtimeConfiguration("advanced");
default:
return null;
}
};
return (
<DialogLayoutContext.Provider value={dialogLayoutAnchor}>
<div className="flex min-h-0 flex-1 flex-col overflow-hidden bg-settings-canvas lg:flex-row">
<Dialog open={pendingExit !== null} onOpenChange={(open) => { if (!open) setPendingExit(null); }}>
<DialogContent showCloseButton={false}>
<DialogHeader>
<DialogTitle>{t("settings.exit.title")}</DialogTitle>
<DialogDescription>{t("settings.exit.description")}</DialogDescription>
</DialogHeader>
<DialogFooter>
<Button variant="outline" onClick={() => { const leave = pendingExit; setPendingExit(null); leave?.(); }}>{t("settings.exit.later")}</Button>
<Button onClick={() => { setPendingExit(null); void restartViaSettingsSurface(); }}>{t("app.system.restartAction")}</Button>
</DialogFooter>
</DialogContent>
</Dialog>
{showSidebar ? (
<SettingsSidebar
activeSection={activeSection}
onSelectSection={selectSection}
onBackToChat={onBackToChat}
onLogout={onLogout}
onBackToChat={backToChat}
onLogout={onLogout ? () => requestExit(onLogout) : undefined}
hostChromeInset={hostChromeInset}
onRestart={settings ? restartViaSettingsSurface : undefined}
isRestarting={restartInProgress}
restartPending={settings?.requires_restart}
isNativeHost={(settings?.surface ?? settings?.runtime_surface) === "native"}
/>
) : null}
@@ -596,18 +709,18 @@ export function SettingsPage({
<div
className={cn(
"min-w-0 flex-1 bg-settings-canvas [scrollbar-gutter:stable]",
activeSection === "channels" ? "overflow-y-auto xl:overflow-hidden" : "overflow-y-auto",
"overflow-y-auto",
)}
>
<div
key={activeSection}
data-testid="settings-section-transition"
ref={setDialogLayoutAnchor}
data-settings-section={activeSection}
className={cn(
"mx-auto w-full animate-in fade-in-0 slide-in-from-bottom-1 px-4 py-6 duration-200 ease-out",
"motion-reduce:animate-none sm:px-8 sm:py-8 lg:py-12",
activeSection === "channels" ? "max-w-[1240px] xl:px-10" : "max-w-[920px]",
activeSection === "channels" && "flex min-h-full flex-col xl:h-full xl:min-h-0",
"mx-auto w-full animate-in fade-in-0 slide-in-from-bottom-1 py-6 duration-200 ease-out",
"motion-reduce:animate-none sm:py-8 lg:py-12",
"settings-grid",
hostChromeInset && "pt-[4.25rem] sm:pt-[4.25rem] lg:pt-[4.75rem]",
)}
>
@@ -615,8 +728,8 @@ export function SettingsPage({
<div className="mb-7">
<button
type="button"
onClick={onBackToChat}
className="touch-target mb-4 inline-flex items-center gap-1.5 rounded-full px-2.5 py-1.5 text-[12px] font-medium text-muted-foreground transition-colors hover:bg-muted/70 hover:text-foreground lg:hidden"
onClick={backToChat}
className="touch-target mb-4 inline-flex items-center gap-1.5 rounded-full px-2.5 py-1.5 text-[12px] font-medium text-muted-foreground transition-colors settings-hover hover:text-foreground lg:hidden"
>
<ChevronLeft className="h-3.5 w-3.5" aria-hidden />
{t("settings.backToChat")}
@@ -643,7 +756,7 @@ export function SettingsPage({
) : settings ? (
<div
className={cn(
"space-y-5",
"settings-stack",
activeSection === "channels" &&
"flex min-h-0 flex-1 flex-col xl:overflow-hidden",
)}
@@ -653,11 +766,12 @@ export function SettingsPage({
{error}
</div>
) : null}
{renderSection()}
{renderSection(isCapabilitySection(activeSection) ? "capabilities" : activeSection)}
</div>
) : null}
</div>
</div>
</div>
</DialogLayoutContext.Provider>
);
}
@@ -1,14 +1,14 @@
import { useRef } from "react";
import {
Activity,
Info,
Check,
ChevronDown,
ChevronLeft,
Globe2,
ImageIcon,
LogOut,
MessageCircle,
Mic,
Loader2,
RotateCcw,
Blocks,
Palette,
Server,
ShieldCheck,
@@ -21,7 +21,7 @@ import {
SIDEBAR_SELECTION_ITEM_CLASS,
SidebarSelectionHighlight,
} from "@/components/SidebarSelectionHighlight";
import type { SettingsSectionKey } from "@/components/settings/contracts";
import { isCapabilitySection, type SettingsSectionKey } from "@/components/settings/contracts";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
@@ -35,18 +35,17 @@ const SETTINGS_NAV_ITEMS: Array<{ key: SettingsSectionKey; icon: LucideIcon; fal
{ key: "overview", icon: Activity, fallback: "Overview" },
{ key: "appearance", icon: Palette, fallback: "Appearance" },
{ key: "models", icon: SlidersHorizontal, fallback: "Models" },
{ key: "image", icon: ImageIcon, fallback: "Image" },
{ key: "voice", icon: Mic, fallback: "Voice" },
{ key: "browser", icon: Globe2, fallback: "Web" },
{ key: "channels", icon: MessageCircle, fallback: "Channels" },
{ key: "capabilities", icon: Blocks, fallback: "Capabilities" },
{ key: "runtime", icon: Server, fallback: "System" },
{ key: "advanced", icon: ShieldCheck, fallback: "Security" },
{ key: "advanced", icon: ShieldCheck, fallback: "Advanced" },
{ key: "about", icon: Info, fallback: "About" },
];
export function standaloneSectionTitle(section: SettingsSectionKey): string {
if (section === "apps") return "Apps";
if (section === "automations") return "Automations";
if (section === "skills") return "Skills";
if (section === "channels") return "Channels";
return SETTINGS_NAV_ITEMS.find((item) => item.key === section)?.fallback ?? "Settings";
}
@@ -56,16 +55,28 @@ export function SettingsSidebar({
onBackToChat,
onLogout,
hostChromeInset,
onRestart,
isRestarting,
restartPending,
isNativeHost,
}: {
activeSection: SettingsSectionKey;
onSelectSection: (section: SettingsSectionKey) => void;
onBackToChat: () => void;
onLogout?: () => void;
hostChromeInset?: boolean;
onRestart?: () => void;
isRestarting?: boolean;
restartPending?: boolean;
isNativeHost?: boolean;
}) {
const { t } = useTranslation();
const restartLabel = isRestarting
? t(isNativeHost ? "app.system.restartingEngine" : "app.system.restarting")
: t("app.system.restartAction");
const navSection = isCapabilitySection(activeSection) ? "capabilities" : activeSection;
const activeNavItemRef = useRef<HTMLButtonElement>(null);
const activeItem = SETTINGS_NAV_ITEMS.find((item) => item.key === activeSection)
const activeItem = SETTINGS_NAV_ITEMS.find((item) => item.key === navSection)
?? SETTINGS_NAV_ITEMS[0];
const ActiveIcon = activeItem.icon;
const activeLabel = t(`settings.nav.${activeItem.key}`, {
@@ -75,26 +86,21 @@ export function SettingsSidebar({
return (
<aside
className={cn(
"flex w-full shrink-0 flex-col bg-settings-surface px-3 pb-2 lg:w-[17rem] lg:px-3 lg:pb-4",
"flex w-full shrink-0 select-none flex-col bg-settings-surface px-3 pb-2 lg:w-48 lg:px-3 lg:pb-4",
hostChromeInset ? "pt-10 lg:pt-10" : "pt-4 lg:pt-4",
)}
>
<button
type="button"
onClick={onBackToChat}
aria-label={t("settings.backToChat")}
className={cn(
"touch-target mb-2 inline-flex w-fit items-center gap-1.5 rounded-full px-2.5 py-1.5 text-[12px] font-medium text-muted-foreground transition-colors hover:bg-muted/70 hover:text-foreground lg:mb-3",
"touch-target mb-2 inline-flex h-9 w-9 items-center justify-center rounded-full text-[13px] leading-5 font-normal text-sidebar-content transition-colors settings-hover hover:text-foreground lg:mb-3",
hostChromeInset && "-ml-1",
)}
>
<ChevronLeft className="h-3.5 w-3.5" aria-hidden />
{t("settings.backToChat")}
<ChevronLeft className="h-4 w-4" aria-hidden />
</button>
<div className="mb-3 px-1 lg:mb-4 lg:px-2">
<h1 className="text-[18px] font-normal tracking-normal text-foreground">
{t("settings.sidebar.title")}
</h1>
</div>
<nav
aria-label={t("settings.sidebar.ariaLabel")}
@@ -105,11 +111,11 @@ export function SettingsSidebar({
<button
type="button"
aria-label={`${t("settings.sidebar.title")}: ${activeLabel}`}
className="touch-target flex h-11 w-full items-center gap-2.5 rounded-control bg-sidebar-accent px-3 text-left text-[13px] font-medium text-foreground transition-colors hover:bg-sidebar-accent/80 lg:hidden"
className="touch-target flex h-11 w-full items-center gap-2.5 rounded-control bg-sidebar-accent px-3 text-left text-[13px] leading-5 font-normal text-foreground transition-colors settings-hover lg:hidden"
>
<ActiveIcon className="h-4 w-4 shrink-0" strokeWidth={2} aria-hidden />
<span className="min-w-0 flex-1 truncate">{activeLabel}</span>
<ChevronDown className="h-4 w-4 shrink-0 text-muted-foreground" aria-hidden />
<ChevronDown className="h-4 w-4 shrink-0 text-sidebar-content" aria-hidden />
</button>
</DropdownMenuTrigger>
<DropdownMenuContent
@@ -118,14 +124,14 @@ export function SettingsSidebar({
className="w-[var(--radix-dropdown-menu-trigger-width)] max-w-[calc(100vw-1.5rem)]"
>
{SETTINGS_NAV_ITEMS.map(({ key, icon: Icon, fallback }) => {
const active = key === activeSection;
const active = key === navSection;
return (
<DropdownMenuItem
key={key}
aria-current={active ? "page" : undefined}
onSelect={() => onSelectSection(key)}
className={cn(
"flex h-10 cursor-default items-center gap-2.5 px-2.5 text-[13px] font-medium",
"flex h-10 cursor-default items-center gap-2.5 px-2.5 text-[13px] leading-5 font-normal",
active && "bg-sidebar-accent text-foreground focus:bg-sidebar-accent",
)}
>
@@ -142,12 +148,12 @@ export function SettingsSidebar({
<SidebarSelectionHighlight
targetRef={activeNavItemRef}
activeId={activeSection}
activeId={navSection}
scope="settings"
className="relative hidden space-y-1 lg:block"
>
{SETTINGS_NAV_ITEMS.map(({ key, icon: Icon, fallback }) => {
const active = key === activeSection;
const active = key === navSection;
return (
<button
ref={active ? activeNavItemRef : undefined}
@@ -156,11 +162,11 @@ export function SettingsSidebar({
aria-current={active ? "page" : undefined}
onClick={() => onSelectSection(key)}
className={cn(
"touch-target flex h-9 w-full items-center gap-2 rounded-xl px-2.5 text-left text-[13px] font-medium",
"touch-target flex h-9 w-full items-center gap-2 rounded-xl px-2.5 text-left text-[13px] leading-5 font-normal",
SIDEBAR_SELECTION_ITEM_CLASS,
active
? "text-sidebar-accent-foreground"
: "text-muted-foreground/78 hover:bg-muted/45 hover:text-foreground",
: "text-sidebar-content settings-hover hover:text-foreground",
)}
>
<Icon className="h-4 w-4 shrink-0" strokeWidth={2} aria-hidden />
@@ -173,16 +179,40 @@ export function SettingsSidebar({
</SidebarSelectionHighlight>
</nav>
<div className="hidden lg:mt-auto lg:block lg:pt-4">
<div className="pt-2 lg:mt-auto lg:pt-4">
{onRestart ? (
<div>
{restartPending ? (
<p id="settings-restart-status" role="status" className="sr-only">
{t("settings.status.savedRestartApply")}
</p>
) : null}
<Button
type="button"
variant="ghost"
onClick={onRestart}
disabled={isRestarting}
aria-describedby={restartPending ? "settings-restart-status" : undefined}
className={cn("h-9 w-full justify-start gap-2 rounded-control px-2.5 text-[13px] leading-5 font-normal settings-hover",
restartPending && !isRestarting
? "settings-restart-pending text-orange-600 hover:text-orange-700 dark:text-orange-400 dark:hover:text-orange-300"
: "text-sidebar-content hover:text-foreground")}
>
{isRestarting ? <Loader2 className="h-4 w-4 animate-spin" aria-hidden />
: <RotateCcw className="h-4 w-4" aria-hidden />}
<span>{restartLabel}</span>
</Button>
</div>
) : null}
{onLogout && !hostChromeInset ? (
<Button
type="button"
variant="ghost"
onClick={onLogout}
className="h-9 w-full justify-start gap-2 rounded-control px-2.5 text-[13px] font-medium text-muted-foreground hover:bg-destructive/8 hover:text-destructive"
className="hidden h-9 w-full justify-start gap-2 rounded-control px-2.5 text-[13px] leading-5 font-normal text-sidebar-content hover:bg-destructive/8 hover:text-destructive lg:flex"
>
<LogOut className="h-4 w-4" aria-hidden />
{t("app.account.logout")}
<span>{t("app.account.logout")}</span>
</Button>
) : null}
</div>
@@ -1,11 +1,12 @@
import { SettingsPage } from "@/components/settings/SettingsPage";
import type { SettingsSectionKey } from "@/components/settings/contracts";
import type { SettingsExitGuard, SettingsSectionKey } from "@/components/settings/contracts";
import { useSettingsController } from "@/components/settings/useSettingsController";
import type { SettingsPayload, SkillSummary } from "@/lib/types";
export type { SettingsSectionKey } from "@/components/settings/contracts";
interface SettingsViewProps {
registerExitGuard?: (guard: SettingsExitGuard | null) => void;
theme: "light" | "dark";
initialSection?: SettingsSectionKey;
initialSettings?: SettingsPayload | null;
@@ -24,6 +25,7 @@ interface SettingsViewProps {
}
export function SettingsView({
registerExitGuard,
theme,
initialSection = "overview",
initialSettings = null,
@@ -52,6 +54,7 @@ export function SettingsView({
return (
<SettingsPage
registerExitGuard={registerExitGuard}
controller={controller}
theme={theme}
showSidebar={showSidebar}
@@ -77,7 +77,7 @@ export function SkillsCatalogSettings({ skills }: { skills: SkillSummary[] }) {
const disabledCount = skills.filter((skill) => skill.enabled === false).length;
return (
<div className="space-y-7">
<div className="settings-stack">
<SegmentedControl
value={view}
mode="tabs"
@@ -222,7 +222,7 @@ function SkillCatalogRow({
className={cn(
"group flex w-full min-w-0 items-center gap-3 rounded-control px-2 py-3 text-left",
"transition-colors duration-150",
"hover:bg-muted/70",
"settings-hover",
"focus-visible:bg-muted/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
!enabled && "opacity-60",
)}
@@ -368,7 +368,7 @@ function SkillDetailSheet({
side="right"
closeButtonClassName={cn(
"right-2 top-2 inline-flex h-10 w-10 items-center justify-center rounded-full opacity-100",
"text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
"text-muted-foreground transition-colors settings-hover hover:text-foreground",
"sm:right-3 sm:top-3",
)}
className={cn(
@@ -570,7 +570,7 @@ function RawInstructionsBlock({ markdown }: { markdown: string }) {
const content =
markdown ||
t("settings.skills.rawInstructionsEmpty", {
defaultValue: "No raw instructions.",
defaultValue: "No skill file content available.",
});
return (
@@ -661,7 +661,7 @@ function RequirementsSection({
})}
title={option.label}
onClick={() => void copyCommand(option.command)}
className="flex h-9 w-9 shrink-0 items-center justify-center rounded-control text-muted-foreground transition-colors hover:bg-muted hover:text-foreground sm:h-7 sm:w-7"
className="flex h-9 w-9 shrink-0 items-center justify-center rounded-control text-muted-foreground transition-colors settings-hover hover:text-foreground sm:h-7 sm:w-7"
>
{copiedCommand === option.command ? (
<Check className="h-3.5 w-3.5 text-emerald-600" aria-hidden />
@@ -675,14 +675,14 @@ function RequirementsSection({
{!installOptions.length && missing_bins.length ? (
<SetupRequirement
icon={<Terminal className="h-3.5 w-3.5" aria-hidden />}
label={t("settings.skills.missingCommands", { defaultValue: "Missing CLI" })}
label={t("settings.skills.missingCommands", { defaultValue: "Missing command-line tools" })}
items={missing_bins}
/>
) : null}
{missing_env.length ? (
<SetupRequirement
icon={<KeyRound className="h-3.5 w-3.5" aria-hidden />}
label={t("settings.skills.missingEnvironment", { defaultValue: "Missing ENV" })}
label={t("settings.skills.missingEnvironment", { defaultValue: "Missing environment variables" })}
items={missing_env}
/>
) : null}
@@ -208,7 +208,7 @@ export function SkillsMarketplace({
aria-label={t("settings.skills.marketplaceSearchLabel", {
defaultValue: "Search skills",
})}
className="h-11 rounded-control bg-settings-surface pl-9"
className="h-11 rounded-full bg-settings-surface pl-9"
/>
{loading ? (
<span
@@ -519,7 +519,7 @@ function MarketplaceSkillRow({
provider: providerLabel(skill.provider),
defaultValue: "Open {{name}} on {{provider}}",
})}
className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors settings-hover hover:text-foreground"
>
<ExternalLink className="h-3.5 w-3.5" aria-hidden />
</a>
@@ -1,3 +1,4 @@
import type { ComponentProps } from "react";
import { cn } from "@/lib/utils";
export function ToggleButton({
@@ -6,15 +7,17 @@ export function ToggleButton({
onChange,
ariaLabel,
label,
...accessibility
}: {
checked: boolean;
disabled?: boolean;
onChange: (checked: boolean) => void;
ariaLabel?: string;
label: string;
}) {
} & Pick<ComponentProps<"button">, "id" | "aria-describedby" | "aria-invalid">) {
return (
<button
{...accessibility}
type="button"
role="switch"
aria-checked={checked}
@@ -0,0 +1,182 @@
import { useTranslation } from "react-i18next";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import type { SettingsPayload } from "@/lib/types";
import { cn } from "@/lib/utils";
import { TokenUsageDetails } from "@/components/settings/TokenUsageDetails";
import { SettingsHint } from "@/components/settings/shared/SettingsHint";
type Usage = NonNullable<SettingsPayload["usage"]>;
const SOURCE_KEYS = ["user", "api", "cron", "dream", "system"] as const;
const SEGMENT_CLASSES = [
"bg-orange-100 text-orange-500 dark:bg-orange-400/15 dark:text-orange-400",
"bg-neutral-300 dark:bg-neutral-500",
"bg-neutral-200 dark:bg-neutral-700",
"bg-orange-500 dark:bg-orange-400",
"bg-neutral-500 dark:bg-neutral-300",
];
const CACHE_PATTERN = { backgroundImage: "repeating-linear-gradient(135deg, transparent, transparent 3px, currentColor 3px, currentColor 4px)" };
function tokenSegments(day?: Usage["days"][number]): number[] {
if (!day) return [0, 0, 0, 0, 0];
const observed = day.cache_read_observed_input_tokens;
return [day.cache_read_tokens, observed - day.cache_read_tokens,
day.input_tokens - observed,
day.output_tokens, Math.max(0, day.total_tokens - day.input_tokens - day.output_tokens)];
}
function todayInTimeZone(timeZone?: string): string {
const now = new Date();
if (timeZone) {
try {
const parts = new Intl.DateTimeFormat("en", {
calendar: "gregory", numberingSystem: "latn", timeZone,
year: "numeric", month: "2-digit", day: "2-digit",
}).formatToParts(now);
const values = Object.fromEntries(parts.map(({ type, value }) => [type, value]));
return `${values.year}-${values.month}-${values.day}`;
} catch {
// Unrecognized configured timezones fall back to UTC.
}
}
return now.toISOString().slice(0, 10);
}
export function TokenUsageCard({ usage, timeZone }: { usage?: Usage; timeZone?: string }) {
const { t, i18n } = useTranslation();
const today = todayInTimeZone(timeZone);
const byDate = new Map(usage?.days.map(day => [day.date, day]));
const days = Array.from({ length: 30 }, (_, index) => {
const date = new Date(`${today}T00:00:00Z`);
date.setUTCDate(date.getUTCDate() - 29 + index);
const key = date.toISOString().slice(0, 10);
return { date: key, usage: byDate.get(key) };
});
const total = days.reduce((sum, day) => sum + (day.usage?.total_tokens ?? 0), 0);
const peak = Math.max(0, ...days.map(day => day.usage?.total_tokens ?? 0));
const compact = new Intl.NumberFormat(i18n.language, { notation: "compact", maximumFractionDigits: 1 });
const exact = new Intl.NumberFormat(i18n.language);
const percent = new Intl.NumberFormat(i18n.language, { style: "percent", maximumFractionDigits: 1 });
const dateFormat = new Intl.DateTimeFormat(i18n.language, { month: "short", day: "numeric", timeZone: "UTC" });
const formatDate = (date: string) => dateFormat.format(new Date(`${date}T00:00:00Z`));
const segmentLabels = [
t("settings.usage.cachedInput", { defaultValue: "Cached input" }),
t("settings.usage.cacheMiss", { defaultValue: "Cache miss" }),
t("settings.usage.cacheUnknown", { defaultValue: "Cache status unknown" }),
t("settings.usage.outputTokens", { defaultValue: "Output" }),
t("settings.usage.otherTokens", { defaultValue: "Other tokens" }),
];
const hasOtherTokens = days.some(day => tokenSegments(day.usage)[4] > 0);
const sourceLabels: Record<string, string> = {
user: t("settings.usage.sources.user", { defaultValue: "Chat" }),
api: t("settings.usage.sources.api", { defaultValue: "API" }),
cron: t("settings.usage.sources.cron", { defaultValue: "Automations" }),
dream: t("settings.usage.sources.dream", { defaultValue: "Memory" }),
system: t("settings.usage.sources.system", { defaultValue: "Auxiliary calls" }),
other: t("settings.usage.unclassified", { defaultValue: "Unclassified" }),
};
const sources = new Map<string, number>();
for (const day of days) {
let classified = 0;
for (const [source, value] of Object.entries(day.usage?.sources ?? {})) {
const key = SOURCE_KEYS.some(known => known === source) ? source : "other";
sources.set(key, (sources.get(key) ?? 0) + value.total_tokens);
classified += value.total_tokens;
}
const remainder = Math.max(0, (day.usage?.total_tokens ?? 0) - classified);
sources.set("other", (sources.get("other") ?? 0) + remainder);
}
const breakdown = [...sources].filter(([, tokens]) => tokens > 0).sort((a, b) => b[1] - a[1]);
return (
<div className="min-w-0 space-y-5">
<div className="flex items-start justify-between gap-4">
<div>
<h3 className="text-sm font-medium">{t("settings.usage.shortTitle", { defaultValue: "Token usage" })}</h3>
<p className="mt-2 text-3xl font-semibold tracking-tight tabular-nums" aria-label={usage ? `${exact.format(total)} tokens` : undefined}>
{usage ? compact.format(total) : "—"}
</p>
</div>
{usage && <TokenUsageDetails days={days} models={usage.providers_30d} modelDays={usage.model_days_30d} />}
</div>
{!usage || total === 0 ? (
<p className="pb-2 text-sm text-muted-foreground" role="status">
{!usage
? t("settings.usage.unavailable", { defaultValue: "Usage data is unavailable." })
: t("settings.usage.noActivity", { defaultValue: "No token usage in the last 30 days." })}
</p>
) : (
<>
<div>
<div className="mb-2 text-right text-[11px] tabular-nums text-muted-foreground" aria-hidden>{compact.format(peak)}</div>
<div className="relative">
<div className="pointer-events-none absolute inset-0 flex flex-col justify-between" aria-hidden>
{[0, 1, 2].map(line => <div key={line} className="border-t border-border/40" />)}
</div>
<div className="relative grid h-28 grid-cols-[repeat(30,minmax(0,1fr))] gap-1" role="group" aria-label={t("settings.usage.dailyTrend", { defaultValue: "Daily token usage" })}>
<TooltipProvider>
{days.map(day => {
const tokens = day.usage?.total_tokens ?? 0;
const segments = tokenSegments(day.usage);
const label = t("settings.usage.cellTitle", {
defaultValue: "{{date}}: {{tokens}} tokens, {{requests}} requests",
date: day.date, tokens: exact.format(tokens), requests: day.usage?.requests ?? 0,
});
if (tokens === 0) return <span key={day.date} role="img" aria-label={label} />;
return (
<Tooltip key={day.date}>
<TooltipTrigger asChild>
<span tabIndex={0} role="img" aria-label={`${label}; ${segments.map((value, index) => `${segmentLabels[index]}: ${exact.format(value)}`).join(", ")}`} className="group flex h-full min-w-0 items-end rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-orange-600 dark:focus-visible:outline-orange-400">
<span className="flex w-full flex-col-reverse overflow-hidden rounded-t-sm group-hover:brightness-95" style={{ height: `${tokens / peak * 100}%` }}>
{segments.map((value, index) => value > 0 && <span key={index} className={cn("w-full shrink-0", SEGMENT_CLASSES[index])} style={{ height: `${value / tokens * 100}%`, ...(index === 0 ? CACHE_PATTERN : {}) }} />)}
</span>
</span>
</TooltipTrigger>
<TooltipContent className="min-w-56 p-3">
<div className="mb-2 flex justify-between gap-6 font-medium tabular-nums"><span>{day.date}</span><span>{exact.format(tokens)}</span></div>
<dl className="space-y-1.5">
{segments.map((value, index) => (index < 4 || value > 0) && <div key={index} className="flex items-center justify-between gap-6">
<dt className="flex items-center text-muted-foreground"><span aria-hidden className={cn("size-2.5 rounded-sm", SEGMENT_CLASSES[index])} style={index === 0 ? CACHE_PATTERN : undefined} /><span className="sr-only">{segmentLabels[index]}</span></dt>
<dd className="tabular-nums">{exact.format(value)}</dd>
</div>)}
<div className="flex justify-between gap-6 border-t border-border/50 pt-2">
<dt className="text-muted-foreground">{t("settings.usage.cacheHitRate", { defaultValue: "Cache hit rate" })}</dt>
<dd className="tabular-nums">{day.usage?.cache_read_observed_input_tokens ? percent.format(day.usage.cache_read_tokens / day.usage.cache_read_observed_input_tokens) : "—"}</dd>
</div>
</dl>
</TooltipContent>
</Tooltip>
);
})}
</TooltipProvider>
</div>
</div>
<div className="mt-2 flex justify-between text-[11px] text-muted-foreground" aria-hidden>
<span>{formatDate(days[0].date)}</span>
<span>{formatDate(days[14].date)}</span>
<span>{formatDate(today)}</span>
</div>
<div className="mt-3 flex flex-wrap gap-x-4 gap-y-2 text-[11px] text-muted-foreground">
{segmentLabels.map((label, index) => (index < 4 || hasOtherTokens) && <span key={label} className="flex items-center gap-1.5"><span aria-hidden className={cn("size-2.5 rounded-sm", SEGMENT_CLASSES[index])} style={index === 0 ? CACHE_PATTERN : undefined} />{label}</span>)}
</div>
</div>
<dl className="grid grid-cols-1 gap-x-6 gap-y-2 text-xs sm:grid-cols-3" aria-label={t("settings.usage.bySource", { defaultValue: "Usage by source" })}>
{breakdown.map(([source, tokens]) => (
<div key={source} className="flex min-w-0 items-center justify-between gap-2">
<dt className="min-w-0 break-words text-muted-foreground">
{source === "system" ? (
<SettingsHint description={t("settings.usage.systemHelp", {
defaultValue: "Auxiliary calls include chat title generation, other internal tasks, and calls without a recorded source.",
})}>{sourceLabels[source]}</SettingsHint>
) : sourceLabels[source]}
</dt>
<dd className="shrink-0 tabular-nums" title={`${exact.format(tokens)} tokens`}>{new Intl.NumberFormat(i18n.language, { style: "percent", maximumFractionDigits: 1 }).format(tokens / total)}</dd>
</div>
))}
</dl>
</>
)}
</div>
);
}
@@ -0,0 +1,47 @@
import { ChevronRight } from "lucide-react";
import { useTranslation } from "react-i18next";
import { Dialog, DialogContent, DialogLayoutContext, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
import type { SettingsPayload } from "@/lib/types";
import { TokenUsageModelTrend } from "@/components/settings/TokenUsageModelTrend";
type Usage = NonNullable<SettingsPayload["usage"]>;
export function TokenUsageDetails({ days, models, modelDays }: {
days: { date: string; usage?: Usage["days"][number] }[];
models?: Usage["providers_30d"];
modelDays?: Usage["model_days_30d"];
}) {
const { t, i18n } = useTranslation();
const number = new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 0 });
const percent = new Intl.NumberFormat(i18n.language, { style: "percent", maximumFractionDigits: 1 });
const sum = (key: "total_tokens" | "requests" | "cache_read_tokens" | "cache_read_observed_input_tokens") =>
days.reduce((total, day) => total + (day.usage?.[key] ?? 0), 0);
const total = sum("total_tokens");
const observed = sum("cache_read_observed_input_tokens");
const metrics = [
[t("settings.usage.totalTokens"), number.format(total)],
[t("settings.usage.requests"), number.format(sum("requests"))],
[t("settings.usage.cacheHitRate"), observed ? percent.format(sum("cache_read_tokens") / observed) : "—"],
];
return (
<DialogLayoutContext.Provider value={null}>
<Dialog>
<DialogTrigger asChild>
<button type="button" className="settings-hover flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-xs text-muted-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring">
{t("settings.usage.viewDetails")}<ChevronRight className="size-3.5" aria-hidden />
</button>
</DialogTrigger>
<DialogContent className="w-[min(1100px,calc(100vw-32px))] max-w-none gap-5 p-5 pt-10 sm:p-7 sm:pt-10" aria-describedby={undefined}>
<DialogTitle className="sr-only">{t("settings.usage.shortTitle")}</DialogTitle>
<dl className="grid grid-cols-3 gap-3">
{metrics.map(([label, value], index) => <div key={label} title={index === 2 ? t("settings.usage.cacheRateHelp") : undefined}>
<dt className="text-xs text-muted-foreground">{label}</dt>
<dd className="mt-1 text-lg font-medium tabular-nums sm:text-2xl">{value}</dd>
</div>)}
</dl>
{modelDays?.length ? <TokenUsageModelTrend days={days} modelDays={modelDays} models={models} /> : <p className="text-sm text-muted-foreground">{t("settings.usage.modelsUnavailable")}</p>}
</DialogContent>
</Dialog>
</DialogLayoutContext.Provider>
);
}
@@ -1,250 +0,0 @@
import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { cn } from "@/lib/utils";
import type { SettingsPayload } from "@/lib/types";
type TokenUsagePayload = NonNullable<SettingsPayload["usage"]>;
type TokenUsageDay = TokenUsagePayload["days"][number];
type TokenUsageCell = {
date: string;
total: number;
estimated: number;
requests: number;
sources: NonNullable<TokenUsageDay["sources"]>;
future: boolean;
};
type TokenUsageMonthLabel = {
label: string;
column: number;
};
const TOKEN_HEATMAP_CELLS = 371;
const TOKEN_HEATMAP_COLUMNS = Math.ceil(TOKEN_HEATMAP_CELLS / 7);
const TOKEN_USAGE_SOURCE_ORDER = ["user", "api", "cron", "dream", "system"] as const;
function addUtcDays(date: Date, days: number): Date {
const next = new Date(date);
next.setUTCDate(next.getUTCDate() + days);
return next;
}
function isoDay(date: Date): string {
return date.toISOString().slice(0, 10);
}
function utcDateFromIsoDay(day: string): Date {
const [year, month, date] = day.split("-").map(Number);
return new Date(Date.UTC(year, month - 1, date));
}
function isoDayInTimeZone(date: Date, timeZone: string | undefined): string {
if (!timeZone) return isoDay(date);
try {
const parts = new Intl.DateTimeFormat("en", {
calendar: "gregory",
numberingSystem: "latn",
timeZone,
year: "numeric",
month: "2-digit",
day: "2-digit",
}).formatToParts(date);
const values = Object.fromEntries(parts.map((part) => [part.type, part.value]));
if (values.year && values.month && values.day) {
return [
values.year.padStart(4, "0"),
values.month.padStart(2, "0"),
values.day.padStart(2, "0"),
].join("-");
}
} catch {
// Fall through to UTC when the browser cannot resolve the configured timezone.
}
return isoDay(date);
}
function buildTokenUsageCalendar(
days: TokenUsageDay[] | undefined,
monthFormatter: Intl.DateTimeFormat,
timeZone: string | undefined,
): { cells: TokenUsageCell[]; monthLabels: TokenUsageMonthLabel[] } {
const byDate = new Map((days ?? []).map((day) => [day.date, day]));
const today = utcDateFromIsoDay(isoDayInTimeZone(new Date(), timeZone));
const end = addUtcDays(today, 6 - today.getUTCDay());
const start = addUtcDays(end, -(TOKEN_HEATMAP_CELLS - 1));
const monthLabels: TokenUsageMonthLabel[] = [];
const cells = Array.from({ length: TOKEN_HEATMAP_CELLS }, (_, index) => {
const date = addUtcDays(start, index);
const key = isoDay(date);
const row = byDate.get(key);
if (date.getUTCDate() === 1) {
monthLabels.push({
label: monthFormatter.format(date),
column: Math.floor(index / 7) + 1,
});
}
return {
date: key,
total: row?.total_tokens ?? 0,
estimated: row?.estimated_tokens ?? 0,
requests: row?.requests ?? 0,
sources: row?.sources ?? {},
future: date > today,
};
});
return { cells, monthLabels };
}
function tokenUsageSourceLabel(
source: string,
tx: (key: string, fallback: string, values?: Record<string, unknown>) => string,
): string {
if (source === "user") return tx("settings.usage.sources.user", "Chat");
if (source === "api") return tx("settings.usage.sources.api", "API");
if (source === "cron") return tx("settings.usage.sources.cron", "Automations");
if (source === "dream") return tx("settings.usage.sources.dream", "Memory");
return tx("settings.usage.sources.system", "System");
}
function tokenUsageSourceBreakdown(
cell: TokenUsageCell,
tx: (key: string, fallback: string, values?: Record<string, unknown>) => string,
): string {
const known = TOKEN_USAGE_SOURCE_ORDER.filter((source) => cell.sources[source]?.total_tokens > 0);
const extra = Object.keys(cell.sources)
.filter((source) => !TOKEN_USAGE_SOURCE_ORDER.includes(source as typeof TOKEN_USAGE_SOURCE_ORDER[number]))
.filter((source) => cell.sources[source]?.total_tokens > 0)
.sort();
return [...known, ...extra]
.map((source) => {
const label = tokenUsageSourceLabel(source, tx);
const tokens = formatCompactTokens(cell.sources[source]?.total_tokens ?? 0);
return `${label} ${tokens}`;
})
.join(" · ");
}
function formatCompactTokens(tokens: number): string {
if (tokens >= 1_000_000) return `${(tokens / 1_000_000).toFixed(tokens >= 10_000_000 ? 0 : 1)}M`;
if (tokens >= 1_000) return `${(tokens / 1_000).toFixed(tokens >= 10_000 ? 0 : 1)}K`;
return String(tokens);
}
function tokenUsageLevel(tokens: number, max: number): number {
if (tokens <= 0 || max <= 0) return 0;
const ratio = tokens / max;
if (ratio >= 0.75) return 4;
if (ratio >= 0.45) return 3;
if (ratio >= 0.2) return 2;
return 1;
}
function tokenUsageCellClass(level: number, future: boolean): string {
if (future) return "bg-transparent ring-1 ring-neutral-200/70 dark:ring-white/[0.045]";
if (level === 4) return "bg-sky-300 dark:bg-sky-300";
if (level === 3) return "bg-sky-400/85 dark:bg-sky-500/80";
if (level === 2) return "bg-sky-500/60 dark:bg-sky-700/85";
if (level === 1) return "bg-sky-500/30 dark:bg-sky-900/80";
return "bg-neutral-200/70 ring-1 ring-black/[0.025] dark:bg-white/[0.08] dark:ring-white/[0.035]";
}
export function TokenUsageHeatmap({
usage,
timeZone,
}: {
usage?: TokenUsagePayload;
timeZone?: string;
}) {
const { t, i18n } = useTranslation();
const tx = (key: string, fallback: string, values?: Record<string, unknown>) =>
t(key, { defaultValue: fallback, ...(values ?? {}) });
const monthFormatter = useMemo(
() => new Intl.DateTimeFormat(i18n.language, { month: "short", timeZone: "UTC" }),
[i18n.language],
);
const { cells, monthLabels } = useMemo(
() => buildTokenUsageCalendar(usage?.days, monthFormatter, timeZone),
[monthFormatter, timeZone, usage?.days],
);
const maxTokens = Math.max(0, ...cells.map((cell) => cell.total));
return (
<div className="overflow-x-auto pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
<div className="mx-auto w-full min-w-0 max-w-[1054px] px-0.5 sm:min-w-[760px]">
<div className="mb-2 flex justify-end">
<span className="text-[11px] font-normal leading-none text-muted-foreground/64">
{tx("settings.usage.shortTitle", "Token Usage")}
</span>
</div>
<div className="relative mb-2 h-4 text-[10px] font-normal leading-4 text-muted-foreground/62" aria-hidden>
{monthLabels.map((month) => (
<span
key={`${month.label}-${month.column}`}
className="absolute top-0 whitespace-nowrap"
style={{ left: `${((month.column - 1) / TOKEN_HEATMAP_COLUMNS) * 100}%` }}
>
{month.label}
</span>
))}
</div>
<div
className="grid grid-flow-col grid-rows-7 gap-[3px] sm:gap-1.5"
style={{ gridTemplateColumns: `repeat(${TOKEN_HEATMAP_COLUMNS}, minmax(0, 1fr))` }}
aria-label={tx("settings.usage.title", "Token activity")}
>
<TooltipProvider delayDuration={120} skipDelayDuration={80}>
{cells.map((cell) => {
const level = tokenUsageLevel(cell.total, maxTokens);
const baseLabel = cell.future
? cell.date
: tx("settings.usage.cellTitle", "{{date}}: {{tokens}} tokens, {{requests}} requests", {
date: cell.date,
tokens: formatCompactTokens(cell.total),
requests: cell.requests,
});
const label = cell.future || cell.estimated <= 0
? baseLabel
: `${baseLabel} · ${
cell.estimated >= cell.total
? tx("settings.usage.estimated", "estimated")
: tx("settings.usage.includesEstimates", "includes estimates")
}`;
const breakdown = cell.future ? "" : tokenUsageSourceBreakdown(cell, tx);
const ariaLabel = breakdown ? `${label} · ${breakdown}` : label;
return (
<Tooltip key={cell.date}>
<TooltipTrigger asChild>
<span
aria-label={ariaLabel}
className={cn(
"aspect-square w-full rounded-mark transition-transform hover:scale-110",
tokenUsageCellClass(level, cell.future),
)}
/>
</TooltipTrigger>
<TooltipContent
side="top"
align="center"
className="px-2.5 py-1.5 text-[11px] font-normal"
>
<span className="block">{label}</span>
{breakdown ? (
<span className="mt-1 block text-muted-foreground">{breakdown}</span>
) : null}
</TooltipContent>
</Tooltip>
);
})}
</TooltipProvider>
</div>
</div>
</div>
);
}
@@ -0,0 +1,106 @@
import { useTranslation } from "react-i18next";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import type { SettingsPayload } from "@/lib/types";
import { cn } from "@/lib/utils";
type Usage = NonNullable<SettingsPayload["usage"]>;
const COLORS = ["bg-orange-500", "bg-amber-500", "bg-stone-500", "bg-orange-300", "bg-zinc-400", "bg-neutral-200 dark:bg-neutral-600"];
export function TokenUsageModelTrend({ days, modelDays, models }: {
days: { date: string; usage?: Usage["days"][number] }[];
modelDays: NonNullable<Usage["model_days_30d"]>;
models?: Usage["providers_30d"];
}) {
const { t, i18n } = useTranslation();
const number = new Intl.NumberFormat(i18n.language);
const percent = new Intl.NumberFormat(i18n.language, { style: "percent", maximumFractionDigits: 1 });
const total = days.reduce((sum, day) => sum + (day.usage?.total_tokens ?? 0), 0);
const modelUsage = new Map((models ?? []).map(model => [JSON.stringify([model.provider, model.model]), model]));
const compact = new Intl.NumberFormat(i18n.language, { notation: "compact", maximumFractionDigits: 1 });
const dates = new Set(days.map(day => day.date));
const totals = new Map<string, { label: string; total: number }>();
const daily = new Map<string, Map<string, number>>();
for (const row of modelDays) {
if (!dates.has(row.date) || row.total_tokens <= 0) continue;
const key = JSON.stringify([row.provider, row.model]);
const item = totals.get(key) ?? { label: row.model, total: 0 };
item.total += row.total_tokens;
totals.set(key, item);
const bucket = daily.get(row.date) ?? new Map<string, number>();
bucket.set(key, (bucket.get(key) ?? 0) + row.total_tokens);
daily.set(row.date, bucket);
}
const series = [...totals].sort((a, b) => b[1].total - a[1].total).slice(0, 5);
const otherLabel = t("settings.usage.otherModels", { defaultValue: "Other / unattributed" });
const columns = days.map(day => {
const bucket = daily.get(day.date);
const values = series.map(([key]) => bucket?.get(key) ?? 0);
const total = day.usage?.total_tokens ?? 0;
return { date: day.date, total, requests: day.usage?.requests ?? 0, values: [...values, Math.max(0, total - values.reduce((a, b) => a + b, 0))] };
});
const peak = Math.max(0, ...columns.map(column => column.total));
if (!peak || !series.length) return null;
const labels = [...series.map(([, item]) => item.label), otherLabel];
const color = (index: number) => index === series.length ? COLORS[5] : COLORS[index];
const hasOther = columns.some(column => column.values[series.length] > 0);
const title = t("settings.usage.modelTrend", { defaultValue: "Model usage over time" });
return <section className="mt-2">
<h3 className="mb-4 text-sm font-medium">{title}</h3>
<div className="relative pl-9">
<div className="pointer-events-none absolute inset-y-0 left-0 right-0 flex flex-col justify-between pb-6" aria-hidden>
{[peak, peak / 2, 0].map((value, index) => <div key={index} className="flex items-center gap-2"><span className="w-7 shrink-0 text-right text-[10px] tabular-nums text-muted-foreground">{compact.format(value)}</span><span className="flex-1 border-t border-border/40" /></div>)}
</div>
<div role="group" aria-label={title} className="relative grid h-[clamp(144px,30vh,280px)] grid-cols-[repeat(30,minmax(0,1fr))] gap-px">
<TooltipProvider>
{columns.map(column => column.total === 0 ? (
<span key={column.date} role="img" aria-label={`${column.date}: ${number.format(0)} tokens`} />
) : <Tooltip key={column.date}>
<TooltipTrigger asChild>
<span role="img" tabIndex={0} aria-label={`${column.date}: ${number.format(column.total)} tokens; ${column.values.map((value, index) => `${labels[index]}: ${number.format(value)}`).join(", ")}`} className="flex min-w-0 items-end focus-visible:outline focus-visible:outline-2 focus-visible:outline-orange-500">
<span className="flex w-full flex-col-reverse" style={{ height: `${column.total / peak * 100}%` }}>
{column.values.map((value, index) => value > 0 && <span key={index} className={cn("w-full shrink-0", color(index))} style={{ height: `${value / column.total * 100}%` }} />)}
</span>
</span>
</TooltipTrigger>
<TooltipContent className="w-72 max-w-[85vw] p-3">
<p className="mb-2 text-xs font-medium">{column.date}</p>
<dl className="space-y-2">
{column.values.map((value, index) => ({ value, index })).filter(item => item.value > 0).sort((a, b) => b.value - a.value).map(({ value, index }) => <div key={index} className="flex items-start justify-between gap-3 text-xs">
<dt className="flex min-w-0 items-start gap-2"><span aria-hidden className={cn("mt-0.5 h-3 w-1 shrink-0 rounded-full", color(index))} /><span className="break-words">{labels[index]}</span></dt><dd className="shrink-0 tabular-nums">{number.format(value)}</dd>
</div>)}
<div className="flex justify-between border-t border-border/50 pt-2 text-xs font-medium"><dt>{t("settings.usage.totalTokens", { defaultValue: "Total tokens" })}</dt><dd className="tabular-nums">{number.format(column.total)}</dd></div>
<div className="flex justify-between text-xs text-muted-foreground"><dt>{t("settings.usage.requests")}</dt><dd className="tabular-nums">{number.format(column.requests)}</dd></div>
</dl>
</TooltipContent>
</Tooltip>)}
</TooltipProvider>
</div>
<div className="relative mt-2 flex justify-between text-[10px] tabular-nums text-muted-foreground"><span>{days[0].date.slice(5)}</span><span>{days[14].date.slice(5)}</span><span>{days[days.length - 1].date.slice(5)}</span></div>
</div>
<TooltipProvider>
<div className="mt-4 grid grid-cols-2 gap-x-4 gap-y-2 text-[11px] text-muted-foreground sm:grid-cols-3">
{labels.map((label, index) => {
if (index === series.length && !hasOther) return null;
const model = index < series.length ? modelUsage.get(series[index][0]) : undefined;
const tokens = columns.reduce((sum, column) => sum + column.values[index], 0);
const rate = model?.cache_read_observed_input_tokens ? percent.format(model.cache_read_tokens / model.cache_read_observed_input_tokens) : "—";
const parts = [
[t("settings.usage.totalTokens"), `${number.format(tokens)} · ${percent.format(tokens / total)}`],
[t("settings.usage.cacheHitRate"), rate],
];
return <Tooltip key={index}>
<TooltipTrigger asChild>
<span tabIndex={0} aria-label={`${label}: ${parts.map(([name, value]) => `${name}: ${value}`).join(", ")}`} className="flex min-w-0 items-center gap-1.5 rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-orange-500">
<span aria-hidden className={cn("size-2 shrink-0 rounded-sm", color(index))} /><span className="truncate">{label}</span>
</span>
</TooltipTrigger>
<TooltipContent className="max-w-[85vw] p-3">
<p className="mb-2 break-all text-xs font-medium">{label}</p>
<dl className="space-y-2">{parts.map(([name, value]) => <div key={name} className="flex justify-between gap-6 text-xs"><dt className="text-muted-foreground">{name}</dt><dd className="tabular-nums">{value}</dd></div>)}</dl>
</TooltipContent>
</Tooltip>;
})}
</div>
</TooltipProvider>
</section>;
}
@@ -1,4 +1,6 @@
import type { Dispatch, SetStateAction } from "react";
import { useAutoSave } from "@/components/settings/shared/useAutoSave";
import type { Dispatch, SetStateAction, ReactNode } from "react";
import { SettingsAdvancedOptions } from "@/components/settings/shared/SettingsFeature";
import { useTranslation } from "react-i18next";
import { ModelIdPicker, ProviderPicker, optionRowsWithCurrent } from "@/components/settings/shared/ModelControls";
@@ -39,6 +41,9 @@ export function imageGenerationFormFromPayload(payload: SettingsPayload): ImageG
}
export function ImageGenerationSettings({
embedded = false,
error,
children,
token,
settings,
form,
@@ -52,6 +57,9 @@ export function ImageGenerationSettings({
isRestarting,
requiresRestartPending,
}: {
embedded?: boolean;
error?: string;
children?: ReactNode;
token: string;
settings: SettingsPayload;
form: ImageGenerationSettingsUpdate;
@@ -72,6 +80,7 @@ export function ImageGenerationSettings({
settings.image_generation.providers[0];
const providerConfigured = !!selectedProvider?.configured;
const missingCredential = form.enabled && !providerConfigured;
useAutoSave(form, dirty, saving, onSave, !embedded && !missingCredential);
const aspectOptions = optionRowsWithCurrent(
IMAGE_ASPECT_RATIO_OPTIONS.map((value) => ({ name: value, label: value })),
form.defaultAspectRatio,
@@ -90,10 +99,11 @@ export function ImageGenerationSettings({
};
return (
<div className="space-y-7">
<div className="settings-stack">
<section>
<SettingsSectionTitle>{tx("settings.sections.imageGeneration", "Image generation")}</SettingsSectionTitle>
{!embedded ? <SettingsSectionTitle>{tx("settings.sections.imageGeneration", "Image generation")}</SettingsSectionTitle> : null}
<SettingsGroup>
{!embedded ? (
<SettingsRow title={tx("settings.rows.imageGeneration", "Image generation")}>
<ToggleButton
checked={form.enabled}
@@ -102,6 +112,8 @@ export function ImageGenerationSettings({
label={form.enabled ? tx("settings.values.on", "On") : tx("settings.values.off", "Off")}
/>
</SettingsRow>
) : null}
{embedded || form.enabled ? <>
<SettingsRow title={tx("settings.rows.imageProvider", "Image provider")}>
<ProviderPicker
providers={settings.image_generation.providers}
@@ -128,17 +140,11 @@ export function ImageGenerationSettings({
) : null}
</div>
</SettingsRow>
<SettingsRow title={tx("settings.rows.imageProviderBase", "Provider base")}>
<SettingsRow title={tx("settings.rows.imageProviderBase", "Provider URL")}>
<span className="max-w-[320px] truncate text-right text-[13px] text-muted-foreground">
{selectedProvider?.api_base || selectedProvider?.default_api_base || selectedProvider?.name || tx("settings.values.notAvailable", "Not available")}
</span>
</SettingsRow>
</SettingsGroup>
</section>
<section>
<SettingsSectionTitle>{tx("settings.sections.imageDefaults", "Defaults")}</SettingsSectionTitle>
<SettingsGroup>
<SettingsRow title={tx("settings.rows.imageModel", "Image model")}>
<ModelIdPicker
token={token}
@@ -159,7 +165,7 @@ export function ImageGenerationSettings({
onChange={(model) => onChangeForm((prev) => ({ ...prev, model }))}
/>
</SettingsRow>
<SettingsRow title={tx("settings.rows.defaultAspectRatio", "Default aspect")}>
<SettingsRow title={tx("settings.rows.defaultAspectRatio", "Default aspect ratio")}>
<ProviderPicker
providers={aspectOptions}
value={form.defaultAspectRatio}
@@ -179,7 +185,8 @@ export function ImageGenerationSettings({
}
/>
</SettingsRow>
<SettingsRow title={tx("settings.rows.maxImagesPerTurn", "Max images per turn")}>
<SettingsAdvancedOptions>
<SettingsRow title={tx("settings.rows.maxImagesPerTurn", "Max images per request")}>
<NumberInput
value={form.maxImagesPerTurn}
min={1}
@@ -189,19 +196,26 @@ export function ImageGenerationSettings({
}
/>
</SettingsRow>
<ReadOnlyRow title={tx("settings.rows.imageSaveDir", "Save directory")} value={settings.image_generation.save_dir} />
{!settings.runtime_config ? (
<ReadOnlyRow title={tx("settings.rows.imageSaveDir", "Save directory")} value={settings.image_generation.save_dir} />
) : null}
{children}
</SettingsAdvancedOptions>
</> : null}
<RestartSettingsFooter
error={missingCredential || Boolean(error)}
autoSave
dirty={dirty}
saving={saving}
pendingRestart={requiresRestartPending}
pendingRestart={!embedded && requiresRestartPending}
disabled={missingCredential}
message={
missingCredential
? tx("settings.image.missingCredential", "Configure this provider before enabling image generation.")
: undefined
: error
}
dirtyMessage={tx("settings.status.restartAfterSaving", "Save changes, then restart when ready.")}
pendingMessage={tx("settings.status.savedRestartApply", "Saved. Restart when ready.")}
dirtyMessage={tx("settings.status.restartAfterSaving", "Save changes, then restart nanobot to apply them.")}
pendingMessage={tx("settings.status.savedRestartApply", "Saved. Restart to apply changes.")}
onSave={onSave}
onRestart={onRestart}
isRestarting={isRestarting}
@@ -1,3 +1,4 @@
import { useAutoSave } from "@/components/settings/shared/useAutoSave";
import type { Dispatch, SetStateAction } from "react";
import { useTranslation } from "react-i18next";
@@ -37,6 +38,7 @@ export function visibleWebuiDefaultAccessMode(mode: string | null | undefined):
}
export function AdvancedSettings({
error,
form,
dirty,
saving,
@@ -47,6 +49,7 @@ export function AdvancedSettings({
onRestart,
isRestarting,
}: {
error?: string;
form: NetworkSafetySettingsUpdate;
dirty: boolean;
saving: boolean;
@@ -58,9 +61,10 @@ export function AdvancedSettings({
isRestarting?: boolean;
}) {
const { t } = useTranslation();
useAutoSave(form, dirty, saving, onSave);
const tx = (key: string, fallback: string) => t(key, { defaultValue: fallback });
return (
<div className="space-y-7">
<div className="settings-stack">
<section>
<SettingsSectionTitle>
{isNativeHostSurface
@@ -110,6 +114,9 @@ export function AdvancedSettings({
/>
</SettingsRow>
<RestartSettingsFooter
autoSave
error={Boolean(error)}
message={error}
dirty={dirty}
saving={saving}
pendingRestart={requiresRestartPending}
@@ -120,12 +127,6 @@ export function AdvancedSettings({
</SettingsGroup>
</section>
<p className="max-w-3xl px-1 text-sm leading-6 text-muted-foreground">
{tx(
"settings.help.securityManagedControls",
"Web fetches always protect local, private, and metadata services. Core channel safety stays in config.json.",
)}
</p>
</div>
);
}
@@ -1,3 +1,5 @@
import { useAutoSave } from "@/components/settings/shared/useAutoSave";
import { SettingsAdvancedOptions } from "@/components/settings/shared/SettingsFeature";
import type { Dispatch, SetStateAction } from "react";
import { useTranslation } from "react-i18next";
@@ -48,6 +50,8 @@ export function transcriptionFormFromPayload(payload: SettingsPayload): Transcri
}
export function TranscriptionSettings({
embedded = false,
error,
settings,
form,
dirty,
@@ -60,6 +64,8 @@ export function TranscriptionSettings({
isRestarting,
requiresRestartPending,
}: {
embedded?: boolean;
error?: string;
settings: SettingsPayload;
form: TranscriptionSettingsUpdate;
dirty: boolean;
@@ -73,6 +79,7 @@ export function TranscriptionSettings({
requiresRestartPending: boolean;
}) {
const { t } = useTranslation();
useAutoSave(form, dirty, saving, onSave, !embedded);
const tx = (key: string, fallback: string) => t(key, { defaultValue: fallback });
const transcription = settings.transcription ?? DEFAULT_TRANSCRIPTION_SETTINGS;
const selectedProvider =
@@ -82,8 +89,9 @@ export function TranscriptionSettings({
return (
<section>
<SettingsSectionTitle>{tx("settings.sections.voiceInput", "Voice input")}</SettingsSectionTitle>
{!embedded ? <SettingsSectionTitle>{tx("settings.sections.voiceInput", "Voice input")}</SettingsSectionTitle> : null}
<SettingsGroup>
{!embedded ? (
<SettingsRow
title={tx("settings.rows.transcription", "Transcription")}
description={tx("settings.help.transcription", "Transcribe microphone input before sending it. Chat channel voice messages use the same settings.")}
@@ -95,6 +103,8 @@ export function TranscriptionSettings({
label={form.enabled ? tx("settings.values.on", "On") : tx("settings.values.off", "Off")}
/>
</SettingsRow>
) : null}
{embedded || form.enabled ? <>
<SettingsRow title={tx("settings.rows.transcriptionProvider", "Provider")}>
<ProviderPicker
providers={transcription.providers}
@@ -123,27 +133,28 @@ export function TranscriptionSettings({
</SettingsRow>
<SettingsRow
title={tx("settings.rows.transcriptionModel", "Model")}
description={tx("settings.help.transcriptionModel", "Leave as the resolved default unless your provider needs a custom model id.")}
description={tx("settings.help.transcriptionModel", "Keep the default model unless your provider requires a specific model ID.")}
>
<Input
value={form.model}
onChange={(event) => onChangeForm((prev) => ({ ...prev, model: event.target.value }))}
className="h-8 w-[min(300px,70vw)] rounded-full text-[13px]"
className="h-9 w-full rounded-full text-end text-[13px]"
/>
</SettingsRow>
<SettingsRow
title={tx("settings.rows.transcriptionLanguage", "Language")}
description={tx("settings.help.transcriptionLanguage", "Optional ISO-639 hint such as en, zh, ja, or ko.")}
description={tx("settings.help.transcriptionLanguage", "Optional language code, such as en for English, zh for Chinese, ja for Japanese, or ko for Korean.")}
>
<Input
value={form.language}
onChange={(event) => onChangeForm((prev) => ({ ...prev, language: event.target.value }))}
placeholder={tx("settings.voice.languageAuto", "Auto")}
className="h-8 w-[min(180px,60vw)] rounded-full text-[13px]"
className="h-9 w-full rounded-full text-end text-[13px]"
/>
</SettingsRow>
<SettingsAdvancedOptions>
<SettingsRow title={tx("settings.rows.voiceLimits", "Limits")}>
<div className="flex flex-wrap justify-end gap-2">
<div className="grid w-full gap-2">
<NumberInput
value={form.maxDurationSec}
min={1}
@@ -160,12 +171,17 @@ export function TranscriptionSettings({
/>
</div>
</SettingsRow>
</SettingsAdvancedOptions>
</> : null}
<RestartSettingsFooter
error={Boolean(error)}
message={error}
autoSave
dirty={dirty}
saving={saving}
pendingRestart={requiresRestartPending}
dirtyMessage={tx("settings.status.restartAfterSaving", "Save changes, then restart when ready.")}
pendingMessage={tx("settings.status.savedRestartApply", "Saved. Restart when ready.")}
pendingRestart={!embedded && requiresRestartPending}
dirtyMessage={tx("settings.status.restartAfterSaving", "Save changes, then restart nanobot to apply them.")}
pendingMessage={tx("settings.status.savedRestartApply", "Saved. Restart to apply changes.")}
onSave={onSave}
onRestart={onRestart}
isRestarting={isRestarting}
@@ -1,3 +1,5 @@
import { useAutoSave } from "@/components/settings/shared/useAutoSave";
import { SettingsAdvancedOptions } from "@/components/settings/shared/SettingsFeature";
import type { Dispatch, SetStateAction } from "react";
import { Eye, EyeOff, Pencil } from "lucide-react";
import { useTranslation } from "react-i18next";
@@ -54,7 +56,28 @@ export function webSearchProviderRequiresApiKey(provider?: WebSearchProviderOpti
return provider?.credential === "api_key";
}
export function webSearchDraftState(settings: SettingsPayload, form: WebSearchSettingsUpdate) {
const provider = settings.web_search.providers.find((row) => row.name === form.provider);
const apiKey = form.apiKey?.trim() ?? "";
const baseUrl = form.baseUrl?.trim() ?? "";
const hasExistingSecret = webSearchProviderAcceptsApiKey(provider) &&
form.provider === settings.web_search.provider && Boolean(settings.web_search.api_key_hint);
const jinaReaderDirty = (form.useJinaReader ?? settings.web.fetch.use_jina_reader) !== settings.web.fetch.use_jina_reader;
return {
hasExistingSecret,
jinaReaderDirty,
dirty: form.provider !== settings.web_search.provider || apiKey.length > 0 ||
baseUrl !== (settings.web_search.base_url ?? "") || form.maxResults !== settings.web_search.max_results ||
form.timeout !== settings.web_search.timeout || jinaReaderDirty,
missingCredential: webSearchProviderRequiresApiKey(provider) ? !apiKey && !hasExistingSecret
: provider?.credential === "base_url" ? !baseUrl : false,
};
}
export function WebSettings({
embedded = false,
error,
enabled = true,
settings,
form,
keyVisible,
@@ -74,6 +97,9 @@ export function WebSettings({
olostepInstalling,
capabilityError,
}: {
embedded?: boolean;
error?: string;
enabled?: boolean;
settings: SettingsPayload;
form: WebSearchSettingsUpdate;
keyVisible: boolean;
@@ -98,40 +124,24 @@ export function WebSettings({
const selectedProvider =
settings.web_search.providers.find((provider) => provider.name === form.provider) ??
settings.web_search.providers[0];
const hasExistingSecret =
webSearchProviderAcceptsApiKey(selectedProvider) &&
form.provider === settings.web_search.provider &&
!!settings.web_search.api_key_hint;
const showKeyInput = webSearchProviderAcceptsApiKey(selectedProvider) && (!hasExistingSecret || keyEditing);
const apiKey = form.apiKey?.trim() ?? "";
const baseUrl = form.baseUrl?.trim() ?? "";
const { hasExistingSecret, dirty, jinaReaderDirty, missingCredential } = webSearchDraftState(settings, form);
const effectiveJinaReader = form.useJinaReader ?? settings.web.fetch.use_jina_reader;
const dirty =
form.provider !== settings.web_search.provider ||
apiKey.length > 0 ||
baseUrl !== (settings.web_search.base_url ?? "") ||
form.maxResults !== settings.web_search.max_results ||
form.timeout !== settings.web_search.timeout ||
effectiveJinaReader !== settings.web.fetch.use_jina_reader;
const jinaReaderDirty = effectiveJinaReader !== settings.web.fetch.use_jina_reader;
const missingCredential =
webSearchProviderRequiresApiKey(selectedProvider)
? !apiKey && !hasExistingSecret
: selectedProvider?.credential === "base_url"
? !baseUrl
: false;
const showKeyInput = webSearchProviderAcceptsApiKey(selectedProvider) && (!hasExistingSecret || keyEditing);
useAutoSave(form, dirty, saving, onSave, !embedded && !missingCredential && (form.provider !== "olostep" || olostepFeature?.installed === true));
return (
<div className="space-y-7">
<div className="settings-stack">
<section>
<SettingsSectionTitle>{tx("settings.sections.webSearch", "Web search")}</SettingsSectionTitle>
{enabled && !embedded ? <SettingsSectionTitle>{tx("settings.sections.webSearch", "Web search")}</SettingsSectionTitle> : null}
<div hidden={!embedded && !enabled}>
{form.provider === "olostep" && olostepFeature && !olostepFeature.installed ? (
<div className="mb-3">
<CapabilityInstallNotice
title={tx("settings.capabilities.searchSupport", "Search provider support")}
title={tx("settings.capabilities.searchSupport", "Search dependencies")}
description={tx(
"settings.capabilities.searchInstallOnSave",
"Olostep support will be installed automatically when you save.",
"Required Olostep packages will be installed automatically when you save.",
)}
installing={olostepInstalling}
/>
@@ -140,7 +150,9 @@ export function WebSettings({
{capabilityError ? (
<p className="mb-3 text-[12px] text-destructive">{capabilityError}</p>
) : null}
</div>
<SettingsGroup>
<div hidden={!embedded && !enabled} className="space-y-1">
<SettingsRow title={t("settings.byok.webSearch.provider")}>
<ProviderPicker
providers={settings.web_search.providers}
@@ -162,7 +174,7 @@ export function WebSettings({
title={t("settings.byok.apiKey")}
description={t("settings.byok.webSearch.apiKeyHelp")}
>
<div className="relative w-[280px] max-w-full">
<div className="relative w-full">
{showKeyInput ? (
<>
<Input
@@ -186,7 +198,7 @@ export function WebSettings({
aria-label={
keyVisible ? t("settings.byok.hideApiKey") : t("settings.byok.showApiKey")
}
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground hover:bg-muted hover:text-foreground"
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground settings-hover hover:text-foreground"
>
{keyVisible ? (
<EyeOff className="h-3.5 w-3.5" aria-hidden />
@@ -206,7 +218,7 @@ export function WebSettings({
size="icon"
onClick={onToggleKeyEditing}
aria-label={t("settings.actions.edit")}
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground hover:bg-muted hover:text-foreground"
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground settings-hover hover:text-foreground"
>
<Pencil className="h-3.5 w-3.5" aria-hidden />
</Button>
@@ -227,16 +239,11 @@ export function WebSettings({
onChangeForm((prev) => ({ ...prev, baseUrl: event.target.value }))
}
placeholder={t("settings.byok.webSearch.baseUrlPlaceholder")}
className="h-9 w-[280px] rounded-full text-[13px]"
className="h-9 w-full rounded-full text-[13px]"
/>
</SettingsRow>
) : null}
</SettingsGroup>
</section>
<section>
<SettingsSectionTitle>{tx("settings.sections.webBehavior", "Behavior")}</SettingsSectionTitle>
<SettingsGroup>
<SettingsAdvancedOptions>
<SettingsRow title={tx("settings.rows.maxResults", "Max results")}>
<NumberInput
value={form.maxResults ?? settings.web_search.max_results}
@@ -256,7 +263,7 @@ export function WebSettings({
</SettingsRow>
<SettingsRow
title={tx("settings.rows.jinaReader", "Jina reader")}
description={tx("settings.help.jinaReader", "Use Jina Reader for web_fetch when available.")}
description={tx("settings.help.jinaReader", "Use Jina Reader to read web pages when available.")}
>
<ToggleButton
checked={effectiveJinaReader}
@@ -265,21 +272,26 @@ export function WebSettings({
label={effectiveJinaReader ? tx("settings.values.on", "On") : tx("settings.values.off", "Off")}
/>
</SettingsRow>
</SettingsAdvancedOptions>
</div>
<RestartSettingsFooter
error={missingCredential || Boolean(error)}
autoSave={form.provider !== "olostep" || olostepFeature?.installed === true}
saveLabel={t("settings.nanobotFeatures.installConfirmAction")}
dirty={dirty}
saving={saving}
pendingRestart={requiresRestartPending}
pendingRestart={!embedded && requiresRestartPending}
disabled={missingCredential}
message={
missingCredential
? t("settings.byok.webSearch.missingCredential")
: requiresRestartPending && !dirty
? tx("settings.status.savedRestartApply", "Saved. Restart when ready.")
: error || (!embedded && requiresRestartPending && !dirty
? tx("settings.status.savedRestartApply", "Saved. Restart to apply changes.")
: jinaReaderDirty
? tx("settings.status.restartAfterSaving", "Save changes, then restart when ready.")
? tx("settings.status.restartAfterSaving", "Save changes, then restart nanobot to apply them.")
: dirty
? t("settings.byok.webSearch.saveHint")
: undefined
: undefined)
}
onSave={onSave}
onRestart={onRestart}
@@ -19,6 +19,9 @@ import {
} from "@/lib/api";
import type { NanobotClient } from "@/lib/nanobot-client";
import type { SettingsPayload, WebSearchSettingsUpdate } from "@/lib/types";
import { imageGenerationFormFromPayload } from "@/components/settings/capabilities/ImageGenerationSettings";
import { transcriptionFormFromPayload } from "@/components/settings/capabilities/TranscriptionSettings";
import { networkSafetyFormFromPayload } from "@/components/settings/capabilities/SecuritySettings";
interface CapabilitySettingsActionsOptions {
state: CapabilitySettingsState;
@@ -28,7 +31,6 @@ interface CapabilitySettingsActionsOptions {
applyPayload: ApplySettingsPayload;
maybeRestartHostEngine: MaybeRestartHostEngine;
setPendingRestartSections: Dispatch<SetStateAction<PendingRestartSections>>;
setError: Dispatch<SetStateAction<string | null>>;
installCapabilities: (names: string[]) => Promise<boolean>;
imageGenerationDirty: boolean;
transcriptionDirty: boolean;
@@ -43,7 +45,6 @@ export function useCapabilitySettingsActions({
applyPayload,
maybeRestartHostEngine,
setPendingRestartSections,
setError,
installCapabilities,
imageGenerationDirty,
transcriptionDirty,
@@ -67,20 +68,29 @@ export function useCapabilitySettingsActions({
webSearchKeyEditing,
webSearchSaving,
} = state;
const setError = (section: "image" | "voice" | "web" | "safety", message?: string) =>
state.setCapabilityErrors((prev) => ({ ...prev, [section]: message }));
const saveImageGenerationSettings = async () => {
if (!settings || !imageGenerationDirty || imageGenerationSaving) return;
if (imageGenerationForm.enabled && !settings.image_generation.providers.find(
(provider) => provider.name === imageGenerationForm.provider,
)?.configured) return;
setError("image");
setImageGenerationSaving(true);
try {
const payload = await updateImageGenerationSettings(client, imageGenerationForm);
applyPayload(payload);
if (payload.requires_restart) {
applyPayload(payload, { preserveCapabilityForms: true });
state.setImageGenerationForm(imageGenerationFormFromPayload(payload));
if (!payload.restart_required_sections && payload.requires_restart) {
setPendingRestartSections((prev) => ({ ...prev, image: true }));
}
await maybeRestartHostEngine(payload);
setError(null);
setError("image");
} catch (err) {
setError((err as Error).message);
const message = (err as Error).message;
setError("image", message === "image generation provider is not configured"
? t("settings.image.missingCredential") : message);
} finally {
setImageGenerationSaving(false);
}
@@ -88,17 +98,19 @@ export function useCapabilitySettingsActions({
const saveTranscriptionSettings = async () => {
if (!settings || !transcriptionDirty || transcriptionSaving) return;
setError("voice");
setTranscriptionSaving(true);
try {
const payload = await updateTranscriptionSettings(client, transcriptionForm);
applyPayload(payload);
if (payload.requires_restart) {
applyPayload(payload, { preserveCapabilityForms: true });
state.setTranscriptionForm(transcriptionFormFromPayload(payload));
if (!payload.restart_required_sections && payload.requires_restart) {
setPendingRestartSections((prev) => ({ ...prev, browser: true }));
}
await maybeRestartHostEngine(payload);
setError(null);
setError("voice");
} catch (err) {
setError((err as Error).message);
setError("voice", (err as Error).message);
} finally {
setTranscriptionSaving(false);
}
@@ -106,17 +118,19 @@ export function useCapabilitySettingsActions({
const saveNetworkSafetySettings = async () => {
if (!settings || !networkSafetyDirty || networkSafetySaving) return;
setError("safety");
setNetworkSafetySaving(true);
try {
const payload = await updateNetworkSafetySettings(client, networkSafetyForm);
applyPayload(payload);
if (payload.requires_restart) {
applyPayload(payload, { preserveCapabilityForms: true });
state.setNetworkSafetyForm(networkSafetyFormFromPayload(payload));
if (!payload.restart_required_sections && payload.requires_restart) {
setPendingRestartSections((prev) => ({ ...prev, runtime: true }));
}
await maybeRestartHostEngine(payload);
setError(null);
setError("safety");
} catch (err) {
setError((err as Error).message);
setError("safety", (err as Error).message);
} finally {
setNetworkSafetySaving(false);
}
@@ -134,14 +148,13 @@ export function useCapabilitySettingsActions({
!!settings.web_search.api_key_hint;
if (webSearchProviderRequiresApiKey(provider) && !apiKey && !hasExistingSecret) {
setError(t("settings.byok.webSearch.apiKeyRequired"));
return;
}
if (provider.credential === "base_url" && !baseUrl) {
setError(t("settings.byok.webSearch.baseUrlRequired"));
return;
}
setError("web");
setWebSearchSaving(true);
try {
if (provider.name === "olostep" && !(await installCapabilities(["olostep"]))) return;
@@ -162,8 +175,8 @@ export function useCapabilitySettingsActions({
}
if (provider.credential === "base_url") update.baseUrl = baseUrl;
const payload = await updateWebSearchSettings(client, update);
applyPayload(payload);
if (payload.requires_restart || webFetchRestartRequired) {
applyPayload(payload, { preserveCapabilityForms: true });
if (!payload.restart_required_sections && (payload.requires_restart || webFetchRestartRequired)) {
setPendingRestartSections((prev) => ({ ...prev, browser: true }));
}
await maybeRestartHostEngine(payload);
@@ -177,9 +190,9 @@ export function useCapabilitySettingsActions({
}));
setWebSearchKeyVisible(false);
setWebSearchKeyEditing(false);
setError(null);
setError("web");
} catch (err) {
setError((err as Error).message);
setError("web", (err as Error).message);
} finally {
setWebSearchSaving(false);
}
@@ -25,6 +25,7 @@ import type {
} from "@/lib/types";
export function useCapabilitySettingsState(initialSettings: SettingsPayload | null) {
const [capabilityErrors, setCapabilityErrors] = useState<Partial<Record<"image" | "voice" | "web" | "safety", string>>>({});
const [webSearchSaving, setWebSearchSaving] = useState(false);
const [imageGenerationSaving, setImageGenerationSaving] = useState(false);
const [transcriptionSaving, setTranscriptionSaving] = useState(false);
@@ -47,6 +48,8 @@ export function useCapabilitySettingsState(initialSettings: SettingsPayload | nu
const [webSearchKeyEditing, setWebSearchKeyEditing] = useState(false);
return {
capabilityErrors,
setCapabilityErrors,
imageGenerationForm,
imageGenerationSaving,
networkSafetyForm,
@@ -133,6 +133,14 @@ export function ChannelLogo({
const logoUrls = useMemo(() => logoFallbackUrls(presentation?.logoUrl), [presentation?.logoUrl]);
const { logoUrl, onLogoError, onLogoLoad } = useLogoFallback(logoUrls);
if (feature.name === "websocket") {
return (
<span className="grid h-10 w-10 shrink-0 place-items-center rounded-control bg-background">
<img src="/brand/nanobot_mark.svg" alt="" className="h-6 w-6 object-contain" draggable={false} />
</span>
);
}
if (showBrandLogos && logoUrl) {
return (
<span
@@ -135,7 +135,7 @@ export function ChannelInstancesPanel({
if (payload.nanobot_features) {
onFeaturesUpdate(payload.nanobot_features);
}
setNotice(tx("settings.channels.savedSettings", "Saved settings."));
setNotice(tx("settings.channels.savedSettings", "Settings saved."));
} catch (err) {
setNotice((err as Error).message);
} finally {
@@ -180,7 +180,7 @@ export function ChannelInstancesPanel({
"overflow-hidden rounded-floating transition-colors",
expanded
? "bg-background"
: "bg-background/70 hover:bg-muted",
: "bg-background/70 settings-hover",
)}
>
<div className="flex items-center gap-3 px-3 py-3">
@@ -291,7 +291,7 @@ export function ChannelInstancesPanel({
type="submit"
size="sm"
variant="secondary"
className="h-8 rounded-full bg-muted/70 px-3 text-[12px] font-semibold hover:bg-muted"
className="h-8 rounded-full bg-muted/70 px-3 text-[12px] font-semibold settings-hover"
disabled={savingFields}
>
{savingFields ? (
@@ -316,7 +316,7 @@ export function ChannelQrConnectFlow({
type="button"
size="sm"
variant="outline"
className="h-8 rounded-full border-border/65 bg-background/80 px-3 text-[12px] font-semibold hover:bg-muted/70"
className="h-8 rounded-full border-border/65 bg-background/80 px-3 text-[12px] font-semibold settings-hover"
onClick={() => void start(forceOnRepeat && succeeded)}
disabled={!canStart}
>
@@ -8,7 +8,6 @@ import {
import {
Check,
ChevronDown,
ChevronRight,
Clipboard,
Loader2,
Plus,
@@ -31,7 +30,6 @@ import {
ChannelLogo,
ChannelRuntimeError,
ChannelStatusBadge,
channelDescription,
channelRequirements,
channelSetup,
channelStatusLabel,
@@ -64,31 +62,36 @@ import { useClient } from "@/providers/ClientProvider";
export function ChannelCatalogRow({
feature,
selected,
showBrandLogos,
onSelect,
actionKey,
onAction,
}: {
feature: NanobotFeatureInfo;
selected: boolean;
showBrandLogos: boolean;
onSelect: () => void;
onSelect: (connect?: boolean) => void;
actionKey: string | null;
onAction: (action: "enable" | "disable", name: string) => void;
}) {
const { t } = useTranslation();
const tx = (key: string, fallback: string) => t(key, { defaultValue: fallback });
const displayName = localizedChannelDisplayName(feature, t);
const alwaysEnabled = feature.capabilities?.includes("always_enabled") ?? false;
const checked = alwaysEnabled || channelToggleChecked(feature);
const busy = actionKey === `enable:${feature.name}` || actionKey === `disable:${feature.name}`;
return (
<div className="settings-list-row flex items-center gap-3 py-2.5 transition-colors settings-hover">
<button
type="button"
aria-label={t("settings.channels.selectChannel", {
name: displayName,
defaultValue: "View {{name}} settings",
})}
aria-pressed={selected}
onClick={onSelect}
aria-haspopup="dialog"
onClick={() => onSelect()}
className={cn(
"group flex w-full min-w-0 items-center gap-3 rounded-control px-3 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border/80",
selected ? "bg-background" : "hover:bg-muted",
"group flex min-w-0 flex-1 select-none items-center gap-3 rounded-control text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border/80",
)}
>
<ChannelLogo feature={feature} showBrandLogos={showBrandLogos} />
@@ -96,23 +99,24 @@ export function ChannelCatalogRow({
<h3 className="truncate text-[14px] font-semibold leading-5 text-foreground">
{displayName}
</h3>
<p className="mt-0.5 truncate text-[12.5px] leading-5 text-muted-foreground">
{channelDescription(feature, t)}
</p>
</div>
</button>
<div className="flex shrink-0 items-center gap-2">
{feature.runtime_status === "failed" ? (
<ChannelStatusBadge status={feature.runtime_status}>
{channelStatusLabel(feature, tx)}
</ChannelStatusBadge>
<ChevronRight
className={cn(
"h-4 w-4 shrink-0 text-muted-foreground transition-transform",
selected && "translate-x-0.5 text-foreground",
)}
aria-hidden
/>
) : null}
<ToggleButton checked={checked}
label={checked ? tx("settings.values.on", "On") : tx("settings.values.off", "Off")}
disabled={alwaysEnabled || busy || (!feature.install_supported && !feature.installed && !feature.enabled)}
ariaLabel={t("settings.channels.toggleChannel", { name: displayName, defaultValue: "{{name}} channel" })}
onChange={(enabled) => {
if (enabled && feature.configured === false) onSelect(true);
else onAction(enabled ? "enable" : "disable", feature.name);
}} />
</div>
</button>
</div>
);
}
@@ -124,6 +128,7 @@ export function ChannelSetupPanel({
showBrandLogos,
onAction,
onFeaturesUpdate,
connectRequestId = 0,
}: {
token: string;
feature: NanobotFeatureInfo;
@@ -132,17 +137,18 @@ export function ChannelSetupPanel({
showBrandLogos: boolean;
onAction: (action: "enable" | "disable", name: string) => void;
onFeaturesUpdate: (payload: NanobotFeaturesPayload) => void;
connectRequestId?: number;
}) {
const { t, i18n } = useTranslation();
const tx = (key: string, fallback: string) => t(key, { defaultValue: fallback });
const displayName = localizedChannelDisplayName(feature, t);
const [connectRequestId, setConnectRequestId] = useState(0);
const uiContribution = channelUiContribution(feature.name, feature.webui);
const PluginPanel = uiContribution?.Panel;
if (PluginPanel) {
return (
<Suspense fallback={<ChannelPluginLoading />}>
<PluginPanel
connectRequestId={connectRequestId}
token={token}
feature={feature}
actionKey={actionKey}
@@ -165,39 +171,19 @@ export function ChannelSetupPanel({
);
}
const enableBusy = actionKey === `enable:${feature.name}`;
const disableBusy = actionKey === `disable:${feature.name}`;
const missingSupport = feature.enabled && !feature.installed;
const alwaysEnabled = feature.capabilities?.includes("always_enabled") ?? false;
const channelChecked = alwaysEnabled || channelToggleChecked(feature);
const channelBusy = enableBusy || disableBusy;
const setup = channelSetup(feature, i18n.resolvedLanguage ?? i18n.language);
const needsSetupBeforeEnable =
!channelChecked
&& feature.configured === false
&& !(uiContribution?.canConnectBeforeConfigured && setup.mode === "connect");
const channelToggleDisabled =
alwaysEnabled
|| channelBusy
|| needsSetupBeforeEnable
|| (!feature.install_supported && !feature.installed && !feature.enabled);
const installSupportLabel = tx("settings.nanobotFeatures.installSupport", "Install support");
const toggleAriaLabel = t("settings.channels.toggleChannel", {
name: displayName,
defaultValue: "{{name}} channel",
});
return (
<aside className="min-h-full rounded-panel bg-settings-surface p-5">
<div className="flex items-start justify-between gap-4">
<aside className="settings-editor rounded-panel bg-settings-surface">
<div className="flex items-start justify-between gap-4 pr-8">
<div className="flex min-w-0 items-start gap-3">
<ChannelLogo feature={feature} showBrandLogos={showBrandLogos} />
<div className="min-w-0 flex-1">
<h3 className="truncate text-[18px] font-semibold leading-6 text-foreground">
<h3 className="truncate select-none text-[14px] font-semibold leading-5 text-foreground">
{displayName}
</h3>
<p className="mt-1 text-[13px] leading-5 text-muted-foreground">
{channelDescription(feature, t)}
</p>
{missingSupport && feature.install_supported ? (
<Button
type="button"
@@ -217,32 +203,6 @@ export function ChannelSetupPanel({
) : null}
</div>
</div>
<div className="flex shrink-0 items-center gap-2 pt-1">
<ChannelStatusBadge status={feature.runtime_status}>
{channelStatusLabel(feature, tx)}
</ChannelStatusBadge>
{channelBusy ? (
<Loader2 className="h-3.5 w-3.5 animate-spin text-muted-foreground" aria-hidden />
) : null}
<ToggleButton
checked={channelChecked}
disabled={channelToggleDisabled}
ariaLabel={toggleAriaLabel}
label={channelChecked ? tx("settings.values.on", "On") : tx("settings.values.off", "Off")}
onChange={(checked) => {
if (
uiContribution?.canConnectBeforeConfigured
&& checked
&& !channelChecked
&& feature.configured === false
) {
setConnectRequestId((current) => current + 1);
return;
}
onAction(checked ? "enable" : "disable", feature.name);
}}
/>
</div>
</div>
<ChannelRuntimeError message={feature.runtime_error} className="mt-4" />
@@ -456,12 +416,12 @@ function ChannelSetupSurface({
type="button"
size="sm"
variant="secondary"
className="h-8 rounded-full bg-background/80 px-3 text-[12px] font-semibold hover:bg-background"
className="h-8 rounded-full bg-background/80 px-3 text-[12px] font-semibold settings-hover"
onClick={() =>
setNotice(
tx(
"settings.channels.connectPreview",
"The in-browser connect flow is next. For now, run the command below.",
"Run the command below in your terminal to connect.",
),
)
}
@@ -510,7 +470,7 @@ function ChannelSetupSurface({
type="submit"
size="sm"
variant="secondary"
className="h-8 rounded-full bg-background/80 px-3 text-[12px] font-semibold hover:bg-background"
className="h-8 rounded-full bg-background/80 px-3 text-[12px] font-semibold settings-hover"
disabled={saving}
>
{saving || validating ? (
@@ -57,7 +57,7 @@ export function ChannelGuideLink({
target="_blank"
rel="noreferrer"
className={cn(
"inline-flex max-w-full items-center gap-2 bg-background/80 font-semibold text-foreground transition-colors hover:bg-background",
"inline-flex max-w-full items-center gap-2 bg-background/80 font-semibold text-foreground transition-colors settings-hover",
compact
? "shrink-0 rounded-full py-1 pl-1 pr-2.5 text-[11.5px]"
: "mt-3 rounded-control py-1.5 pl-1.5 pr-3 text-[12px]",
@@ -135,7 +135,7 @@ function ChannelOfficialLink({
href={setup.officialUrl}
target="_blank"
rel="noreferrer"
className="inline-flex max-w-full shrink-0 items-center gap-2 rounded-full bg-background/80 py-1 pl-1 pr-2.5 text-[11.5px] font-semibold text-foreground transition-colors hover:bg-background"
className="inline-flex max-w-full shrink-0 items-center gap-2 rounded-full bg-background/80 py-1 pl-1 pr-2.5 text-[11.5px] font-semibold text-foreground transition-colors settings-hover"
>
<span
className="grid h-5 w-5 shrink-0 place-items-center overflow-hidden rounded-full bg-muted/70"
@@ -183,7 +183,7 @@ export function ChannelSetupActions({
type="button"
size="sm"
variant="secondary"
className="h-8 rounded-full bg-background/80 px-3 text-[12px] font-semibold hover:bg-background"
className="h-8 rounded-full bg-background/80 px-3 text-[12px] font-semibold settings-hover"
onClick={() => {
if (action.copyText) {
void copyTextToClipboard(action.copyText).then((ok) =>
@@ -200,7 +200,7 @@ export function CredentialForm({
value={values[field.key] ?? ""}
onChange={(event) => onChange(field.key, event.target.value)}
className={cn(
"h-9 rounded-control border-border/60 bg-muted/35 text-[13px]",
"h-9 rounded-full border-border/60 bg-muted/35 text-[13px]",
showSecretToggle && "pr-9",
)}
/>
@@ -213,7 +213,7 @@ export function CredentialForm({
: tx("settings.channels.showSecret", "Show secret")
}
onClick={() => onToggleSecret(field.key)}
className="absolute right-2 top-1/2 grid h-6 w-6 -translate-y-1/2 place-items-center rounded-full text-muted-foreground hover:bg-background hover:text-foreground"
className="absolute right-2 top-1/2 grid h-6 w-6 -translate-y-1/2 place-items-center rounded-full text-muted-foreground settings-hover hover:text-foreground"
>
{visible ? (
<EyeOff className="h-3.5 w-3.5" aria-hidden />
+10 -1
View File
@@ -1,19 +1,28 @@
import type { SettingsPayload } from "@/lib/types";
export type SettingsExitGuard = (leave: () => void) => void;
export type SettingsSectionKey =
| "overview"
| "about"
| "appearance"
| "models"
| "capabilities"
| "image"
| "voice"
| "browser"
| "channels"
| "apps"
| "automations"
| "memory"
| "skills"
| "runtime"
| "advanced";
export function isCapabilitySection(section: SettingsSectionKey): boolean {
return ["capabilities", "image", "voice", "browser", "memory"].includes(section);
}
type PendingRestartSection = "runtime" | "browser" | "image";
export type PendingRestartSections = Record<PendingRestartSection, boolean>;
@@ -26,7 +35,7 @@ export type RestartAwarePayload = {
export type ApplySettingsPayload = (
payload: SettingsPayload,
options?: { preserveAgentForm?: boolean },
options?: { preserveAgentForm?: boolean; preserveCapabilityForms?: boolean },
) => void;
export type MaybeRestartHostEngine = (payload: RestartAwarePayload) => Promise<void>;
@@ -1,7 +1,8 @@
import { ProviderIcon } from "@/components/settings/models/ProviderSettings";
import { useAutoSave } from "@/components/settings/shared/useAutoSave";
import { useEffect, useRef, useState, type Dispatch, type SetStateAction } from "react";
import {
ChevronDown,
ChevronRight,
GripVertical,
ListOrdered,
Loader2,
@@ -142,7 +143,7 @@ export function ModelPresetDeleteDialog({
<DialogDescription className="leading-5">
{tx(
"settings.models.deletePresetHelp",
"This removes the preset “{{name}}”. Provider credentials are not affected.",
"Delete “{{name}}” and remove it from the fallback list. Provider credentials will be kept.",
{ name: preset?.name ?? "" },
)}
</DialogDescription>
@@ -227,15 +228,22 @@ export function ModelsSettings({
onDeleteConfiguration: (preset: SettingsPayload["model_presets"][number]) => void;
}) {
const { t } = useTranslation();
useAutoSave(form, dirty, saving, onSave, !creating && !!form.model.trim());
const tx = (key: string, fallback: string, values?: Record<string, unknown>) =>
t(key, { defaultValue: fallback, ...(values ?? {}) });
const [editorOpen, setEditorOpen] = useState(false);
const editorTriggerRef = useRef<HTMLElement | null>(null);
const presetNameInputRef = useRef<HTMLInputElement>(null);
const suggestedPresetNameRef = useRef<string | null>(null);
const [editorRowKey, setEditorRowKey] = useState<string | null>(null);
const [advancedOpen, setAdvancedOpen] = useState(false);
const [draggedCallOrderIndex, setDraggedCallOrderIndex] = useState<number | null>(null);
const [dragOverCallOrderIndex, setDragOverCallOrderIndex] = useState<number | null>(null);
const [draggedRowHeight, setDraggedRowHeight] = useState(0);
const dragStartY = useRef(0);
const pendingDrag = useRef<number | null>(null);
const suppressDragClick = useRef(false);
const [draggedOffset, setDraggedOffset] = useState(0);
useEffect(() => {
if (presetNameError) presetNameInputRef.current?.focus();
@@ -303,13 +311,14 @@ export function ModelsSettings({
form.temperature < 0 ||
form.temperature > 2;
const selectedPresetReferenced = Boolean(
selectedPreset && callOrder.includes(selectedPreset.name),
selectedPreset && callOrder[0] === selectedPreset.name,
);
const callOrderBusy = orderSaving || saving;
const selectPreset = (
preset: SettingsPayload["model_presets"][number],
rowKey: string,
) => {
editorTriggerRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
const toggleCurrentPreset =
!creating && selectedPreset?.name === preset.name && activeEditorRowKey === rowKey;
onSelectConfiguration(preset.name);
@@ -372,18 +381,8 @@ export function ModelsSettings({
<div
id="model-preset-editor"
data-testid="model-preset-editor"
className={cn(
"mx-3 mb-3 divide-y divide-border/45 overflow-hidden rounded-floating border border-border/45 bg-background/80 shadow-sm motion-reduce:animate-none animate-in fade-in-0 slide-in-from-top-1 duration-200 sm:mx-5 lg:mx-auto lg:w-[calc(100%-2.5rem)] lg:max-w-6xl",
creating && "mt-3",
)}
className="space-y-1 pb-4"
>
{creating ? (
<div className="flex min-h-[52px] items-center px-4 py-3 sm:px-5">
<span className="text-[13px] font-semibold text-foreground/85">
{tx("settings.models.newPreset", "New model preset")}
</span>
</div>
) : null}
<SettingsRow
title={tx("settings.models.presetName", "Preset name")}
description={tx(
@@ -393,7 +392,7 @@ export function ModelsSettings({
>
<div
className={cn(
"w-[min(280px,70vw)] motion-reduce:animate-none",
"w-full motion-reduce:animate-none",
presetNameError && "animate-[preset-name-shake_180ms_ease-in-out]",
)}
>
@@ -411,7 +410,7 @@ export function ModelsSettings({
setForm((prev) => ({ ...prev, modelPreset: event.target.value }));
}}
className={cn(
"h-8 rounded-full text-[13px]",
"h-9 rounded-full text-[13px]",
presetNameError &&
"border-destructive/70 focus-visible:border-destructive focus-visible:ring-destructive/25",
)}
@@ -501,7 +500,7 @@ export function ModelsSettings({
type="button"
aria-expanded={advancedOpen}
onClick={() => setAdvancedOpen((value) => !value)}
className="flex min-h-[62px] w-full items-center justify-between gap-4 px-4 py-3.5 text-left transition-colors hover:bg-muted/30 sm:px-5"
className="flex min-h-[62px] w-full items-center justify-between gap-4 px-4 py-3.5 text-left transition-colors settings-hover sm:px-5"
>
<span>
<span className="block text-[14px] font-medium text-foreground">
@@ -573,7 +572,7 @@ export function ModelsSettings({
>
{tx(
"settings.models.removeBeforeDelete",
"Remove this preset from the call order before deleting it.",
"Choose another primary preset before deleting this one.",
)}
</span>
) : null}
@@ -603,7 +602,7 @@ export function ModelsSettings({
);
return (
<div className="space-y-7">
<div className="settings-stack">
<section>
<SettingsSectionTitle>
{tx("settings.models.presets", "Model presets")}
@@ -645,7 +644,7 @@ export function ModelsSettings({
</div>
) : (
<>
<div role="list" className="divide-y divide-border/45">
<div role="list">
{presetRows.map(({ key, name, orderIndex, preset }) => {
const ordered = orderIndex >= 0;
const provider = preset
@@ -658,14 +657,13 @@ export function ModelsSettings({
preset.resolved_provider,
)
: true;
const isDropTarget =
ordered &&
dragOverCallOrderIndex === orderIndex &&
draggedCallOrderIndex !== orderIndex;
const dropAfterTarget =
isDropTarget &&
draggedCallOrderIndex !== null &&
draggedCallOrderIndex < orderIndex;
let dragOffset = 0;
const isDragging = ordered && draggedCallOrderIndex === orderIndex;
if (ordered && draggedCallOrderIndex !== null && dragOverCallOrderIndex !== null) {
if (isDragging) dragOffset = draggedOffset;
if (orderIndex > draggedCallOrderIndex && orderIndex <= dragOverCallOrderIndex) dragOffset = -draggedRowHeight;
if (orderIndex < draggedCallOrderIndex && orderIndex >= dragOverCallOrderIndex) dragOffset = draggedRowHeight;
}
const isSelected =
editorOpen &&
!creating &&
@@ -674,7 +672,7 @@ export function ModelsSettings({
const presetRow = (
<div
tabIndex={ordered ? 0 : -1}
draggable={ordered && !callOrderBusy}
onDragStart={(event) => event.preventDefault()}
aria-label={
ordered
? `${name}. ${tx(
@@ -684,36 +682,43 @@ export function ModelsSettings({
: name
}
data-testid={`model-call-order-row-${name}`}
onDragStart={(event) => {
if (!ordered || callOrderBusy) {
event.preventDefault();
return;
}
event.dataTransfer.effectAllowed = "move";
event.dataTransfer.setData("text/plain", name);
setDraggedCallOrderIndex(orderIndex);
setDragOverCallOrderIndex(orderIndex);
onPointerDown={(event) => {
if (!ordered || callOrderBusy || event.button !== 0 || (event.target as HTMLElement).closest('[role="switch"]')) return;
pendingDrag.current = orderIndex;
suppressDragClick.current = false;
dragStartY.current = event.clientY;
setDraggedOffset(0);
const wrapper = event.currentTarget.parentElement;
setDraggedRowHeight(wrapper?.getBoundingClientRect().height || 60);
}}
onDragEnd={() => {
onPointerMove={(event) => {
if (!event.buttons) { pendingDrag.current = null; return; }
if (pendingDrag.current !== orderIndex || callOrderBusy) return;
const offset = event.clientY - dragStartY.current;
if (draggedCallOrderIndex === null && Math.abs(offset) < 5) return;
event.currentTarget.setPointerCapture(event.pointerId);
suppressDragClick.current = true;
setDraggedCallOrderIndex(orderIndex);
const target = Math.max(0, Math.min(callOrder.length - 1, orderIndex + Math.round(offset / draggedRowHeight)));
setDragOverCallOrderIndex(target);
setDraggedOffset(Math.max(-orderIndex * draggedRowHeight, Math.min((callOrder.length - orderIndex - 1) * draggedRowHeight, offset)));
}}
onPointerUp={() => {
pendingDrag.current = null;
if (draggedCallOrderIndex !== null) dropCallOrderItem(dragOverCallOrderIndex ?? orderIndex);
}}
onPointerCancel={() => {
pendingDrag.current = null;
setDraggedCallOrderIndex(null);
setDragOverCallOrderIndex(null);
}}
onDragEnter={(event) => {
if (ordered && draggedCallOrderIndex !== null) {
onClickCapture={(event) => {
if (suppressDragClick.current) {
event.preventDefault();
setDragOverCallOrderIndex(orderIndex);
event.stopPropagation();
suppressDragClick.current = false;
}
}}
onDragOver={(event) => {
if (!ordered || draggedCallOrderIndex === null) return;
event.preventDefault();
event.dataTransfer.dropEffect = "move";
}}
onDrop={(event) => {
if (!ordered) return;
event.preventDefault();
dropCallOrderItem(orderIndex);
}}
onKeyDown={(event) => {
if (event.currentTarget !== event.target) return;
if (ordered && event.key === "ArrowUp") {
@@ -728,52 +733,32 @@ export function ModelsSettings({
}
}}
className={cn(
"group relative flex min-h-[76px] select-none items-center gap-3 px-4 py-3 outline-none transition-[background-color,opacity] duration-150 sm:px-5",
"settings-list-row group relative flex select-none items-center gap-3 py-2 outline-none transition-colors duration-150",
ordered &&
(callOrderBusy
? "cursor-wait"
: "cursor-grab active:cursor-grabbing"),
"hover:bg-muted/25",
isDropTarget &&
!dropAfterTarget &&
"before:absolute before:inset-x-4 before:top-0 before:z-10 before:h-0.5 before:rounded-full before:bg-foreground sm:before:inset-x-5",
isDropTarget &&
dropAfterTarget &&
"after:absolute after:inset-x-4 after:bottom-0 after:z-10 after:h-0.5 after:rounded-full after:bg-foreground sm:after:inset-x-5",
ordered && draggedCallOrderIndex === orderIndex && "opacity-35",
isSelected && "bg-muted/45 hover:bg-muted/45",
!isDragging && "settings-hover",
isDragging && "bg-settings-surface shadow-md",
isSelected && "bg-muted/45 settings-hover",
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
)}
>
{ordered ? (
<GripVertical
className="pointer-events-none h-4 w-4 shrink-0 text-muted-foreground/40 transition-colors group-hover:text-muted-foreground"
aria-hidden
/>
) : (
<span className="h-4 w-4 shrink-0" aria-hidden />
)}
<button
type="button"
aria-pressed={selectedPreset?.name === name}
aria-expanded={isSelected}
aria-controls={isSelected ? "model-preset-editor" : undefined}
aria-haspopup="dialog"
disabled={!preset}
onClick={() => preset && selectPreset(preset, key)}
className="flex min-w-0 flex-1 items-center gap-3 rounded-control text-left outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
{ordered ? (
<span className="grid h-7 w-7 shrink-0 place-items-center rounded-full bg-muted font-mono text-[11px] font-semibold tabular-nums text-muted-foreground">
{orderIndex + 1}
</span>
{presetConfigured ? (
<ProviderIcon provider={provider} showBrandLogos={showBrandLogos} />
) : (
<span className="h-7 w-7 shrink-0" aria-hidden />
<span className="grid h-8 w-8 shrink-0 place-items-center">
<ProviderPickerIcon provider={provider} showBrandLogos={showBrandLogos} unconfigured />
</span>
)}
<ProviderPickerIcon
provider={provider}
showBrandLogos={showBrandLogos}
unconfigured={!presetConfigured}
/>
<span className="min-w-0 flex-1">
<span className="flex min-w-0 flex-wrap items-center gap-2">
<span className="truncate text-[14px] font-medium text-foreground">
@@ -783,10 +768,6 @@ export function ModelsSettings({
<StatusPill tone="success">
{tx("settings.models.primary", "Primary")}
</StatusPill>
) : !ordered ? (
<StatusPill tone="neutral">
{tx("settings.models.disabled", "Disabled")}
</StatusPill>
) : null}
{!presetConfigured ? (
<span className="text-[11px] font-medium text-amber-700 dark:text-amber-300">
@@ -797,18 +778,19 @@ export function ModelsSettings({
</span>
) : null}
</span>
<span className="mt-0.5 block truncate text-[12px] text-muted-foreground">
{preset?.model ?? name}
</span>
</span>
<ChevronRight
className={cn(
"h-4 w-4 shrink-0 text-muted-foreground transition-transform",
isSelected && "rotate-90",
)}
<span className="shrink-0 px-2 py-1 text-[13px] font-normal leading-5 text-muted-foreground">
{t("settings.configure")}
</span>
</button>
{ordered ? (
<GripVertical
className="h-4 w-4 shrink-0 touch-none text-muted-foreground/40 transition-colors group-hover:text-muted-foreground"
aria-hidden
/>
</button>
) : (
<span className="h-4 w-4 shrink-0" aria-hidden />
)}
<button
type="button"
role="switch"
@@ -842,9 +824,11 @@ export function ModelsSettings({
</div>
);
return (
<div key={key} role="listitem">
{presetRow}
{isSelected ? renderPresetEditor() : null}
<div key={key} role="listitem" data-call-order-index={orderIndex}>
<div className={cn("relative", isDragging ? "z-10" : "transition-transform duration-150 ease-out motion-reduce:transition-none")}
style={{ transform: `translateY(${dragOffset}px)` }}>
{presetRow}
</div>
</div>
);
})}
@@ -852,16 +836,17 @@ export function ModelsSettings({
{!creating ? (
<button
type="button"
className="flex min-h-[58px] w-full items-center justify-between gap-3 px-4 py-3 text-left outline-none transition-colors hover:bg-muted/30 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 sm:px-5"
className="flex min-h-[58px] w-full items-center justify-between gap-3 settings-list-inset py-3 text-left outline-none transition-colors settings-hover focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
disabled={callOrderBusy}
onClick={() => {
onClick={(event) => {
editorTriggerRef.current = event.currentTarget;
setEditorRowKey(null);
setEditorOpen(true);
onBeginCreate();
}}
>
<span className="inline-flex items-center text-[13px] font-medium">
<Plus className="mr-1.5 h-3.5 w-3.5" aria-hidden />
<span className="inline-flex items-center gap-3 text-[14px] font-medium">
<span className="grid w-10 shrink-0 place-items-center"><Plus className="h-5 w-5" aria-hidden /></span>
{tx("settings.models.newPreset", "New model preset")}
</span>
{orderSaving ? (
@@ -874,11 +859,26 @@ export function ModelsSettings({
) : null}
</button>
) : null}
{creating && editorOpen ? renderPresetEditor() : null}
</>
)}
</SettingsGroup>
</section>
<Dialog open={editorOpen && (creating || selectedPreset !== null)} onOpenChange={(open) => {
setEditorOpen(open);
if (!open && creating) onCancelCreate();
}}>
<DialogContent aria-describedby={undefined}
className="relative max-h-[85dvh] w-[min(calc(100vw-2rem),40rem)] max-w-none gap-0 overflow-y-auto p-0"
onCloseAutoFocus={(event) => {
event.preventDefault();
editorTriggerRef.current?.focus();
}}>
<DialogHeader className="px-6 pb-2 pt-5 pr-12">
<DialogTitle>{creating ? tx("settings.models.newPreset", "New model preset") : selectedPreset?.name}</DialogTitle>
</DialogHeader>
<div className="settings-grid !px-0">{renderPresetEditor()}</div>
</DialogContent>
</Dialog>
</div>
);
}
@@ -10,7 +10,6 @@ import {
Loader2,
Pencil,
Plus,
RotateCcw,
Zap,
} from "lucide-react";
import { useTranslation } from "react-i18next";
@@ -30,6 +29,7 @@ import {
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
DropdownMenu,
@@ -40,6 +40,7 @@ import {
} from "@/components/ui/dropdown-menu";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { SettingsTextEditor } from "@/components/settings/shared/SettingsTextEditor";
import { useLogoFallback } from "@/hooks/useLogoFallback";
import { providerBrand } from "@/lib/provider-brand";
import { cn } from "@/lib/utils";
@@ -381,17 +382,14 @@ function ProviderRequestOptions({
return (
<div className="overflow-hidden rounded-floating border border-border/45 bg-background/75">
{options.map((option, index) => {
{options.map((option) => {
const title = tx(option.titleKey, option.title);
const Icon = option.kind === "priority" ? Zap : Globe2;
const checked = providerRequestOptionEnabled(option, extraBody);
return (
<div
key={option.titleKey}
className={cn(
"flex items-center justify-between gap-4 px-4 py-3",
index > 0 && "border-t border-border/45",
)}
className="flex items-center justify-between gap-4 rounded-xl px-4 py-3 transition-colors settings-hover focus-within:bg-sidebar-accent/60"
>
<div className="flex min-w-0 items-start gap-3">
<span className="mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted/70 text-muted-foreground">
@@ -444,7 +442,7 @@ function ProviderAdvancedOptions({
];
return (
<div className="border-y border-border/45">
<div className="space-y-1">
<button
type="button"
aria-expanded={open}
@@ -463,7 +461,7 @@ function ProviderAdvancedOptions({
/>
</button>
{open ? (
<div className="border-t border-border/45 py-3">
<div className="py-3">
<div className="grid gap-3 md:grid-cols-2">
{enabled.has("api_type") ? (
<label className="block space-y-1.5">
@@ -504,7 +502,7 @@ function ProviderAdvancedOptions({
{enabled.has("thinking_style") ? (
<label className="block space-y-1.5">
<span className="text-[12px] font-medium text-muted-foreground">
{tx("settings.providers.thinkingStyle", "Thinking style")}
{tx("settings.providers.thinkingStyle", "Reasoning parameter format")}
</span>
<DropdownMenu>
<DropdownMenuTrigger asChild>
@@ -575,7 +573,7 @@ function ProviderAdvancedOptions({
{enabled.has("profile") ? (
<label className="block space-y-1.5">
<span className="text-[12px] font-medium text-muted-foreground">
{tx("settings.providers.profile", "Profile")}
{tx("settings.providers.profile", "AWS profile")}
</span>
<Input
value={form.profile}
@@ -594,40 +592,31 @@ function ProviderAdvancedOptions({
<span className="text-[12px] font-medium text-muted-foreground">
{tx("settings.providers.extraHeaders", "Extra headers")}
</span>
<Textarea
value={form.extraHeaders}
onChange={(event) => onChange({ extraHeaders: event.target.value })}
<SettingsTextEditor title={tx("settings.providers.extraHeaders", "Extra headers")}
value={form.extraHeaders} onSave={(value) => onChange({ extraHeaders: value })}
placeholder={'{"X-Header":"value"}'}
spellCheck={false}
className="min-h-[88px] resize-y bg-background font-mono text-[12px]"
/>
</label>
) : null}
{enabled.has("extra_query") ? (
<label className="block min-w-0 space-y-1.5">
<span className="text-[12px] font-medium text-muted-foreground">
{tx("settings.providers.extraQuery", "Extra query")}
{tx("settings.providers.extraQuery", "Additional query parameters")}
</span>
<Textarea
value={form.extraQuery}
onChange={(event) => onChange({ extraQuery: event.target.value })}
<SettingsTextEditor title={tx("settings.providers.extraQuery", "Additional query parameters")}
value={form.extraQuery} onSave={(value) => onChange({ extraQuery: value })}
placeholder={'{"api-version":"2024-02-01"}'}
spellCheck={false}
className="min-h-[88px] resize-y bg-background font-mono text-[12px]"
/>
</label>
) : null}
{enabled.has("extra_body") ? (
<label className="block min-w-0 space-y-1.5 md:col-span-2">
<span className="text-[12px] font-medium text-muted-foreground">
{tx("settings.providers.extraBody", "Extra body")}
{tx("settings.providers.extraBody", "Additional body parameters")}
</span>
<Textarea
value={form.extraBody}
onChange={(event) => onChange({ extraBody: event.target.value })}
<SettingsTextEditor title={tx("settings.providers.extraBody", "Additional body parameters")}
value={form.extraBody} onSave={(value) => onChange({ extraBody: value })}
placeholder={'{"service_tier":"priority"}'}
spellCheck={false}
className="min-h-[96px] resize-y bg-background font-mono text-[12px]"
/>
</label>
) : null}
@@ -635,7 +624,7 @@ function ProviderAdvancedOptions({
</div>
) : null}
{footer ? (
<div className="flex items-center justify-end gap-2 border-t border-border/45 py-3">
<div className="flex items-center justify-end gap-2 py-3">
{footer}
</div>
) : null}
@@ -663,9 +652,6 @@ export function ProvidersSettings({
onCreateCustomProvider,
onProviderOAuthLogin,
onProviderOAuthLogout,
imageProviderRestartPending,
onRestart,
isRestarting,
}: {
settings: SettingsPayload;
nanobotFeatures: NanobotFeaturesPayload | null;
@@ -686,9 +672,6 @@ export function ProvidersSettings({
onCreateCustomProvider: (draft: CustomProviderDraft) => Promise<boolean>;
onProviderOAuthLogin: (provider: string) => void;
onProviderOAuthLogout: (provider: string) => void;
imageProviderRestartPending: boolean;
onRestart?: () => void;
isRestarting?: boolean;
}) {
const { t } = useTranslation();
const tx = (key: string, fallback: string) => t(key, { defaultValue: fallback });
@@ -776,12 +759,14 @@ export function ProvidersSettings({
? (nanobotFeatures?.features ?? []).find((feature) => feature.name === supportName)
: null;
return (
<div key={provider.name} className="divide-y divide-border/45">
<Dialog key={provider.name} open={expanded} onOpenChange={(open) => {
if (open !== expanded) toggleProvider(provider.name);
}}>
<DialogTrigger asChild>
<button
type="button"
aria-expanded={expanded}
onClick={() => toggleProvider(provider.name)}
className="flex min-h-[70px] w-full items-center justify-between gap-4 px-4 py-3 text-left transition-colors hover:bg-muted/35 sm:px-5"
aria-label={provider.label}
className="settings-list-row flex w-full items-center justify-between gap-4 py-2.5 text-left transition-colors settings-hover"
>
<span className="flex min-w-0 items-center gap-3">
<ProviderIcon
@@ -789,33 +774,26 @@ export function ProvidersSettings({
showBrandLogos={showBrandLogos}
/>
<span className="min-w-0">
<span className="block truncate text-[15px] font-semibold leading-5 text-foreground">
<span className="block truncate text-[14px] font-medium leading-5 text-foreground">
{provider.label}
</span>
{provider.api_base ? (
<span className="block truncate text-[12px] text-muted-foreground">
{provider.api_base}
</span>
) : null}
</span>
</span>
<ChevronDown
className={cn(
"h-4 w-4 shrink-0 text-muted-foreground transition-transform",
expanded && "rotate-180",
)}
aria-hidden
/>
<span className="shrink-0 px-2 py-1 text-[13px] font-normal leading-5 text-muted-foreground">
{t("settings.configure")}
</span>
</button>
</DialogTrigger>
{expanded ? (
<div className="space-y-3 bg-muted/18 px-4 py-4 sm:px-5">
<DialogContent aria-describedby={undefined} className="max-h-[85dvh] w-[min(calc(100vw-2rem),40rem)] max-w-none overflow-y-auto">
<DialogHeader><DialogTitle>{provider.label}</DialogTitle></DialogHeader>
{supportFeature && !supportFeature.installed ? (
<CapabilityInstallNotice
title={tx("settings.capabilities.providerSupport", "Provider support")}
title={tx("settings.capabilities.providerSupport", "Provider dependencies")}
description={tx(
"settings.capabilities.providerInstallOnSave",
"Required support will be installed automatically when you save this provider.",
"Required packages will be installed automatically when you save this provider.",
)}
installing={featureAction === `enable:${supportName}`}
/>
@@ -976,7 +954,7 @@ export function ProvidersSettings({
? t("settings.byok.hideApiKey")
: t("settings.byok.showApiKey")
}
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground hover:bg-muted hover:text-foreground"
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground settings-hover hover:text-foreground"
>
{keyVisible ? (
<EyeOff className="h-3.5 w-3.5" aria-hidden />
@@ -996,7 +974,7 @@ export function ProvidersSettings({
size="icon"
onClick={() => onToggleProviderKeyEditing(provider.name)}
aria-label={t("settings.actions.edit")}
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground hover:bg-muted hover:text-foreground"
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground settings-hover hover:text-foreground"
>
<Pencil className="h-3.5 w-3.5" aria-hidden />
</Button>
@@ -1055,31 +1033,16 @@ export function ProvidersSettings({
</div>
</>
)}
</div>
</DialogContent>
) : null}
</div>
</Dialog>
);
};
const customProviderForm = creatingCustomProvider ? (
<div className="divide-y divide-border/45">
<button
type="button"
aria-expanded
onClick={cancelCustomProviderCreation}
className="flex min-h-[70px] w-full items-center justify-between gap-4 px-4 py-3 text-left transition-colors hover:bg-muted/35 sm:px-5"
>
<span className="flex min-w-0 items-center gap-3">
<ProviderIcon provider="custom" showBrandLogos={showBrandLogos} />
<span className="truncate text-[15px] font-semibold text-foreground">
{tx("settings.providers.customProvider", "Custom provider")}
</span>
</span>
<ChevronDown
className="h-4 w-4 shrink-0 rotate-180 text-muted-foreground"
aria-hidden
/>
</button>
<div className="space-y-3 bg-muted/18 px-4 py-4 sm:px-5">
<Dialog open onOpenChange={(open) => { if (!open) cancelCustomProviderCreation(); }}>
<DialogContent aria-describedby={undefined} className="max-h-[85dvh] w-[min(calc(100vw-2rem),40rem)] max-w-none overflow-y-auto">
<DialogHeader><DialogTitle>{tx("settings.providers.customProvider", "Custom provider")}</DialogTitle></DialogHeader>
<div className="space-y-3">
<label className="block space-y-1.5">
<span className="text-[12px] font-medium text-muted-foreground">
{tx("settings.providers.customProviderName", "Provider name")}
@@ -1151,7 +1114,7 @@ export function ProvidersSettings({
? t("settings.byok.hideApiKey")
: t("settings.byok.showApiKey")
}
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground hover:bg-muted hover:text-foreground"
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full text-muted-foreground settings-hover hover:text-foreground"
>
{customProviderKeyVisible ? (
<EyeOff className="h-3.5 w-3.5" aria-hidden />
@@ -1195,33 +1158,11 @@ export function ProvidersSettings({
</Button>
</div>
</div>
</div>
</DialogContent>
</Dialog>
) : null;
return (
<div className="space-y-6">
{imageProviderRestartPending && onRestart ? (
<div className="flex min-h-[48px] items-center justify-between gap-3 border-y border-border/55 py-3">
<p className="text-[13px] leading-5 text-muted-foreground">
{tx("settings.status.imageProviderRestart", "Provider support changed. Restart when ready.")}
</p>
<div className="shrink-0">
<Button
size="sm"
variant="ghost"
onClick={onRestart}
disabled={isRestarting}
className="rounded-full"
>
{isRestarting ? (
<Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden />
) : (
<RotateCcw className="mr-1.5 h-3.5 w-3.5" aria-hidden />
)}
{isRestarting ? t("app.system.restarting") : t("app.system.restart")}
</Button>
</div>
</div>
) : null}
<section>
<SettingsSectionTitle>
{tx("settings.providers.title", "Model providers")}
@@ -1237,13 +1178,13 @@ export function ProvidersSettings({
<DropdownMenuTrigger asChild>
<button
type="button"
className="group flex min-h-[70px] w-full items-center justify-between gap-4 px-4 py-3 text-left transition-colors hover:bg-muted/35 sm:px-5"
className="group settings-list-row flex w-full items-center justify-between gap-4 py-2.5 text-left transition-colors settings-hover"
>
<span className="flex min-w-0 items-center gap-3">
<span className="grid h-10 w-10 shrink-0 place-items-center rounded-control bg-muted text-muted-foreground">
<Plus className="h-5 w-5" aria-hidden />
</span>
<span className="truncate text-[15px] font-semibold text-foreground">
<span className="truncate text-[14px] font-medium text-foreground">
{tx(
"settings.providers.addOwnProvider",
"Add your own model provider",
@@ -1319,7 +1260,7 @@ function providerVisibilityRank(provider: SettingsPayload["providers"][number]):
return 200;
}
function ProviderIcon({
export function ProviderIcon({
provider,
showBrandLogos,
}: {
@@ -1334,7 +1275,7 @@ function ProviderIcon({
return (
<span
data-testid={`provider-logo-${provider}`}
className="grid h-10 w-10 shrink-0 place-items-center overflow-hidden rounded-control border border-border/45 bg-background"
className="grid h-8 w-8 shrink-0 place-items-center overflow-hidden rounded-control border border-border/45 bg-background"
>
<img
src={logoUrl}
@@ -1352,7 +1293,7 @@ function ProviderIcon({
return (
<span
data-testid={`provider-logo-fallback-${provider}`}
className="grid h-10 w-10 shrink-0 place-items-center rounded-control text-[11px] font-semibold text-white"
className="grid h-8 w-8 shrink-0 place-items-center rounded-control text-[11px] font-semibold text-white"
style={{ backgroundColor: brand.color }}
aria-hidden
>
@@ -1361,7 +1302,7 @@ function ProviderIcon({
);
}
return (
<span className="grid h-10 w-10 shrink-0 place-items-center rounded-2xl bg-muted text-foreground/82 dark:bg-muted/70">
<span className="grid h-8 w-8 shrink-0 place-items-center rounded-control bg-muted text-foreground/82 dark:bg-muted/70">
<Icon className="h-5 w-5" strokeWidth={2} aria-hidden />
</span>
);
@@ -2,15 +2,16 @@ import { useState, type Dispatch, type SetStateAction } from "react";
import {
ArrowUpCircle,
Bot,
BookOpen,
Github,
MessageCircle,
Check,
ChevronRight,
ExternalLink,
Globe2,
HardDrive,
ImageIcon,
Loader2,
Mic,
Server,
type LucideIcon,
} from "lucide-react";
import { useTranslation } from "react-i18next";
@@ -24,7 +25,7 @@ import {
SettingsRow,
SettingsSectionTitle,
} from "@/components/settings/shared/SettingsControls";
import { TokenUsageHeatmap } from "@/components/settings/TokenUsageHeatmap";
import { TokenUsageCard } from "@/components/settings/TokenUsageCard";
import { ToggleButton } from "@/components/settings/ToggleButton";
import { Button } from "@/components/ui/button";
import { SegmentedControl } from "@/components/ui/segmented-control";
@@ -33,23 +34,19 @@ import { checkVersion } from "@/lib/api";
import type {
FileEditDisplayMode,
LocalActivityMode,
LocalDensity,
LocalPreferences,
} from "@/lib/local-preferences";
import { providerBrand, providerDisplayLabel } from "@/lib/provider-brand";
import type { SettingsPayload } from "@/lib/types";
import { cn } from "@/lib/utils";
import { shortWorkspacePath } from "@/lib/workspace";
import { useClient } from "@/providers/ClientProvider";
export function OverviewSettings({
settings,
requiresRestart,
onSelectSection,
showBrandLogos,
}: {
settings: SettingsPayload;
requiresRestart: boolean;
onSelectSection: (section: SettingsSectionKey) => void;
showBrandLogos: boolean;
}) {
@@ -75,62 +72,17 @@ export function OverviewSettings({
const webStatus = settings.web.enable
? tx("settings.values.enabled", "Enabled")
: tx("settings.values.disabled", "Disabled");
const webSearchProvider =
settings.web_search.providers.find((provider) => provider.name === settings.web_search.provider) ??
settings.web_search.providers[0];
const webSearchProviderLabel = providerDisplayLabel(
settings.web_search.providers,
settings.web_search.provider,
);
const webSearchCredentialStatus =
webSearchProvider?.credential === "none"
? tx("settings.byok.webSearch.noCredentialRequired", "No key required")
: webSearchProvider?.credential === "optional_api_key"
? settings.web_search.api_key_hint
? tx("settings.values.configured", "Configured")
: tx("settings.byok.webSearch.noCredentialRequired", "No key required")
: webSearchProvider?.credential === "base_url"
? settings.web_search.base_url
? tx("settings.values.configured", "Configured")
: tx("settings.values.notConfigured", "Not configured")
: settings.web_search.api_key_hint
? tx("settings.values.configured", "Configured")
: tx("settings.values.notConfigured", "Not configured");
const webCaption = `${webSearchProviderLabel} · ${webSearchCredentialStatus}`;
const imageStatus = settings.image_generation.enabled
? tx("settings.values.enabled", "Enabled")
: tx("settings.values.disabled", "Disabled");
const imageCaption = `${providerDisplayLabel(settings.image_generation.providers, settings.image_generation.provider)} · ${
settings.image_generation.provider_configured
? tx("settings.values.configured", "Configured")
: tx("settings.values.notConfigured", "Not configured")
}`;
const transcription = settings.transcription ?? DEFAULT_TRANSCRIPTION_SETTINGS;
const voiceStatus = transcription.enabled
? tx("settings.values.enabled", "Enabled")
: tx("settings.values.disabled", "Disabled");
const voiceCaption = `${providerDisplayLabel(transcription.providers, transcription.provider)} · ${
transcription.provider_configured
? tx("settings.values.configured", "Configured")
: tx("settings.values.notConfigured", "Not configured")
}`;
const isNativeHost = (settings.surface ?? settings.runtime_surface) === "native";
const workspaceCaption = shortWorkspacePath(settings.runtime.workspace_path);
const runtimeTitle = isNativeHost
? tx("settings.rows.engine", "Engine")
: tx("settings.rows.gateway", "Gateway");
const runtimeValue = isNativeHost
? tx("settings.values.privateEngine", "Private engine")
: `${settings.runtime.gateway_host}:${settings.runtime.gateway_port}`;
const runtimeCaption = isNativeHost
? tx("settings.values.unixSocket", "Unix socket")
: requiresRestart
? tx("settings.values.restartPending", "Restart pending")
: tx("settings.values.ready", "Ready");
return (
<div className="space-y-7">
<section className="rounded-panel bg-settings-surface px-4 py-4 sm:px-5">
<TokenUsageHeatmap usage={settings.usage} timeZone={settings.agent.timezone} />
<div className="settings-stack">
<section className="rounded-panel bg-settings-surface p-6">
<TokenUsageCard usage={settings.usage} timeZone={settings.agent.timezone} />
</section>
<section>
@@ -156,7 +108,6 @@ export function OverviewSettings({
valueLogoProvider={settings.web_search.provider}
title={tx("settings.overview.webSearch", "Web search")}
value={webStatus}
caption={webCaption}
showBrandLogos={showBrandLogos}
onClick={() => onSelectSection("browser")}
/>
@@ -165,7 +116,6 @@ export function OverviewSettings({
valueLogoProvider={settings.image_generation.provider}
title={tx("settings.overview.imageGeneration", "Image generation")}
value={imageStatus}
caption={imageCaption}
showBrandLogos={showBrandLogos}
onClick={() => onSelectSection("image")}
/>
@@ -174,39 +124,40 @@ export function OverviewSettings({
valueLogoProvider={transcription.provider}
title={tx("settings.overview.voiceInput", "Voice input")}
value={voiceStatus}
caption={voiceCaption}
showBrandLogos={showBrandLogos}
onClick={() => onSelectSection("voice")}
/>
</SettingsGroup>
</section>
<section>
<SettingsSectionTitle>{tx("settings.sections.system", "System")}</SettingsSectionTitle>
<SettingsGroup>
<OverviewListRow
icon={Server}
title={runtimeTitle}
value={runtimeValue}
caption={runtimeCaption}
onClick={() => onSelectSection("runtime")}
/>
<OverviewListRow
icon={HardDrive}
title={tx("settings.overview.workspace", "Workspace")}
value={tx("settings.values.defaultWorkspace", "Default workspace")}
caption={workspaceCaption}
onClick={() => onSelectSection("runtime")}
/>
</SettingsGroup>
</section>
</div>
);
}
<section>
<SettingsSectionTitle>{tx("settings.sections.about", "About")}</SettingsSectionTitle>
<SettingsGroup>
<VersionCheckRow currentVersion={settings.version?.current} />
</SettingsGroup>
</section>
export function AboutSettings({ currentVersion }: { currentVersion?: string }) {
const { t } = useTranslation();
const links = [
{ key: "documentation", icon: BookOpen, href: "https://nanobot.wiki/" },
{ key: "sourceCode", icon: Github, href: "https://github.com/HKUDS/nanobot" },
{ key: "reportIssue", icon: MessageCircle, href: "https://github.com/HKUDS/nanobot/issues" },
];
return (
<div className="settings-stack">
<div className="flex flex-col items-center gap-4 py-6 text-center">
<img src="/brand/nanobot_mark.svg" alt="" className="h-16 w-16 select-none" draggable={false} />
<h1><img src="/brand/nanobot_wordmark.svg" alt="nanobot" className="h-auto w-40 select-none dark:brightness-150" draggable={false} /></h1>
<VersionCheckRow currentVersion={currentVersion} />
</div>
<SettingsGroup>
{links.map(({ key, icon: Icon, href }) => (
<a key={key} href={href} target="_blank" rel="noopener noreferrer"
className="settings-list-row flex select-none items-center gap-3 text-[14px] settings-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
<Icon className="h-4 w-4 text-muted-foreground" aria-hidden />
<span className="flex-1">{t(`settings.about.${key}`)}</span>
<ExternalLink className="h-3.5 w-3.5 text-muted-foreground" aria-hidden />
</a>
))}
</SettingsGroup>
</div>
);
}
@@ -245,16 +196,16 @@ function VersionCheckRow({ currentVersion }: { currentVersion?: string }) {
};
return (
<div className="flex min-h-[62px] flex-col gap-3 px-4 py-3.5 sm:flex-row sm:items-center sm:justify-between sm:px-5">
<div className="flex flex-col items-center gap-4">
<div className="min-w-0">
<div className="text-[14px] font-medium leading-5 text-foreground">
<div className="sr-only">
{tx("settings.about.version", "Version")}
</div>
<div className="mt-0.5 text-[12px] leading-5 text-muted-foreground">
{currentVersion ? `v${currentVersion}` : "nanobot"}
</div>
</div>
<div className="flex shrink-0 flex-col items-end gap-2">
<div className="flex shrink-0 flex-col items-center gap-2">
<Button
size="sm"
variant="outline"
@@ -319,7 +270,7 @@ export function AppearanceSettings({
const { t } = useTranslation();
const tx = (key: string, fallback: string) => t(key, { defaultValue: fallback });
return (
<div className="space-y-7">
<div className="settings-stack">
<section>
<SettingsSectionTitle>{t("settings.sections.interface")}</SettingsSectionTitle>
<SettingsGroup>
@@ -359,18 +310,6 @@ export function AppearanceSettings({
<section>
<SettingsSectionTitle>{tx("settings.sections.localPreferences", "Local preferences")}</SettingsSectionTitle>
<SettingsGroup>
<SettingsRow title={tx("settings.rows.density", "Density")}>
<SegmentedControl
value={localPrefs.density}
options={[
{ value: "comfortable", label: tx("settings.values.comfortable", "Comfortable") },
{ value: "compact", label: tx("settings.values.compact", "Compact") },
]}
onChange={(density) =>
onChangeLocalPrefs((prev) => ({ ...prev, density: density as LocalDensity }))
}
/>
</SettingsRow>
<SettingsRow title={tx("settings.rows.activityMode", "Activity detail")}>
<SegmentedControl
value={localPrefs.activityMode}
@@ -527,7 +466,7 @@ function OverviewListRow({
valueLogoProvider?: string | null;
title: string;
value: string;
caption: string;
caption?: string;
showBrandLogos?: boolean;
onClick: () => void;
}) {
@@ -535,12 +474,12 @@ function OverviewListRow({
<button
type="button"
onClick={onClick}
className="group flex min-h-[68px] w-full items-center gap-3 px-4 py-3.5 text-left transition-colors hover:bg-muted/30 sm:px-5"
className="group flex min-h-[68px] w-full select-none items-center gap-3 px-4 py-3.5 text-left transition-colors settings-hover sm:px-5"
>
<OverviewRowIcon icon={Icon} />
<span className="min-w-0 flex-1">
<span className="block text-[14px] font-medium leading-5 text-foreground">{title}</span>
<span className="mt-0.5 block truncate text-[12px] leading-5 text-muted-foreground">{caption}</span>
{caption ? <span className="sr-only">{caption}</span> : null}
</span>
<span className="ml-auto flex min-w-0 max-w-[48%] items-center gap-2">
<OverviewValueLogo provider={valueLogoProvider} showBrandLogos={showBrandLogos} />
@@ -1,4 +1,4 @@
import { useEffect, useMemo, useRef, useState } from "react";
import { useEffect, useMemo, useRef, useState, type ComponentProps } from "react";
import {
Bot,
Brain,
@@ -27,12 +27,7 @@ import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import { ComboboxOption, useComboboxNavigation } from "@/components/ui/combobox";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { Input } from "@/components/ui/input";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import { useLogoFallback } from "@/hooks/useLogoFallback";
@@ -93,33 +88,35 @@ export function settingsProviderConfigured(
export function ProviderPicker({
providers,
value,
triggerProps,
emptyLabel,
showProviderLogos = false,
onChange,
}: {
providers: Array<{ name: string; label: string }>;
value: string;
triggerProps?: Pick<ComponentProps<typeof Button>, "id" | "aria-label" | "aria-describedby" | "aria-invalid" | "disabled">;
emptyLabel: string;
showProviderLogos?: boolean;
onChange: (provider: string) => void;
}) {
const selectedProvider = providers.find((provider) => provider.name === value) ?? null;
const disabled = providers.length === 0;
const disabled = !!triggerProps?.disabled || providers.length === 0;
return (
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild disabled={disabled}>
<Button
<Select value={value} onValueChange={onChange} disabled={disabled}>
<SelectTrigger
{...triggerProps}
aria-label={triggerProps?.["aria-label"] ?? selectedProvider?.label ?? emptyLabel}
type="button"
variant="outline"
disabled={disabled}
className={cn(
"h-8 w-[210px] justify-between rounded-full border-input bg-background px-3 text-[13px] font-normal shadow-none",
"hover:bg-accent/55 focus-visible:ring-2 focus-visible:ring-ring",
"h-9 w-full justify-between rounded-full border-input bg-background px-3 text-[13px] font-normal shadow-none",
"settings-hover focus-visible:ring-2 focus-visible:ring-ring",
disabled && "text-muted-foreground",
)}
>
<span className="flex min-w-0 items-center gap-2">
<SelectValue placeholder={emptyLabel}><span className="flex min-w-0 items-center gap-2">
{selectedProvider && showProviderLogos ? (
<ProviderPickerIcon
provider={selectedProvider.name}
@@ -127,24 +124,14 @@ export function ProviderPicker({
/>
) : null}
<span className="truncate">{selectedProvider?.label ?? emptyLabel}</span>
</span>
<ChevronDown className="ml-2 h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent
align="end"
className="max-h-[18rem] w-[240px] overflow-y-auto scrollbar-thin scrollbar-track-transparent"
>
</span></SelectValue>
</SelectTrigger>
<SelectContent>
{providers.map((provider) => {
const selected = provider.name === value;
return (
<DropdownMenuItem
<SelectItem
key={provider.name}
onSelect={() => onChange(provider.name)}
className={cn(
"flex cursor-default items-center justify-between gap-2 text-[13px]",
selected && "bg-muted/80 text-foreground focus:bg-muted",
)}
value={provider.name}
>
<span className="flex min-w-0 items-center gap-2">
{showProviderLogos ? (
@@ -155,12 +142,11 @@ export function ProviderPicker({
) : null}
<span className="truncate">{provider.label}</span>
</span>
{selected ? <Check className="h-3.5 w-3.5 shrink-0" aria-hidden /> : null}
</DropdownMenuItem>
</SelectItem>
);
})}
</DropdownMenuContent>
</DropdownMenu>
</SelectContent>
</Select>
);
}
@@ -349,8 +335,8 @@ export function ModelIdPicker({
type="button"
variant="outline"
className={cn(
"h-9 w-[min(360px,70vw)] justify-between rounded-full border-input bg-background px-3 text-[12px] font-normal shadow-none",
"hover:bg-accent/55 focus-visible:ring-2 focus-visible:ring-ring",
"h-9 w-full justify-between rounded-full border-input bg-background px-3 text-[13px] font-normal shadow-none",
"settings-hover focus-visible:ring-2 focus-visible:ring-ring",
)}
>
<span className="flex min-w-0 items-center gap-2">
@@ -373,7 +359,7 @@ export function ModelIdPicker({
</PopoverTrigger>
<PopoverContent
align="end"
className="w-[360px] max-w-[calc(100vw-2rem)] p-1.5"
className="w-[var(--radix-popover-trigger-width)] max-w-[calc(100vw-2rem)] p-1.5"
>
<div className="p-1 pb-1.5">
<div className="relative">
@@ -410,11 +396,11 @@ export function ModelIdPicker({
</div>
) : !canFetchModels ? (
<div className="px-2 py-1.5 text-[11px] leading-4 text-muted-foreground">
{tx("settings.models.autoProviderCustomOnly", "Auto provider mode uses custom model IDs.")}
{tx("settings.models.autoProviderCustomOnly", "Enter a model ID manually when using automatic provider selection.")}
</div>
) : waitingForModelSearch ? (
<div className="px-2 py-1.5 text-[11px] leading-4 text-muted-foreground">
{tx("settings.models.searchCatalog", "Search provider catalog to choose a model.")}
{tx("settings.models.searchCatalog", "Search this provider’s model catalog.")}
</div>
) : loading ? (
<div className="flex items-center gap-2 px-2 py-1.5 text-[11px] text-muted-foreground">
@@ -435,8 +421,11 @@ export function ModelIdPicker({
</div>
) : isCatalog && !normalizedQuery ? (
<div className="px-2 py-1.5 text-[11px] leading-4 text-muted-foreground">
{tx("settings.models.searchCatalog", "Search provider catalog to choose a model.")}
{providerModelCount ? ` ${providerModelCount} ${tx("settings.models.modelsAvailable", "available")}.` : ""}
{tx("settings.models.searchCatalog", "Search this provider’s model catalog.")}
{providerModelCount ? <> {t("settings.models.availableCount", {
defaultValue: "Models available: {{count}}",
count: providerModelCount,
})}</> : null}
</div>
) : null}
@@ -12,6 +12,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { SettingsHint } from "@/components/settings/shared/SettingsHint";
import { isNativeRuntime } from "@/lib/runtime";
import type { NanobotFeatureInfo } from "@/lib/types";
import { cn } from "@/lib/utils";
@@ -84,7 +85,7 @@ export function NanobotFeatureInstallDialog({
variant="ghost"
onClick={() => onOpenChange(false)}
disabled={installing}
className="h-11 w-full min-w-0 bg-muted/70 px-5 text-[15px] font-semibold text-foreground shadow-none hover:bg-muted"
className="h-11 w-full min-w-0 bg-muted/70 px-5 text-[15px] font-semibold text-foreground shadow-none settings-hover"
>
{tx("settings.automations.cancel", "Cancel")}
</Button>
@@ -133,7 +134,7 @@ export function DismissibleStatusMessage({
"flex h-8 w-8 shrink-0 items-center justify-center rounded-full transition-colors",
isError
? "text-destructive/70 hover:bg-destructive/10 hover:text-destructive"
: "text-muted-foreground/70 hover:bg-muted hover:text-foreground",
: "text-muted-foreground/70 settings-hover hover:text-foreground",
)}
>
<X className="h-3.5 w-3.5" aria-hidden />
@@ -153,16 +154,16 @@ export function RestartRequiredNotice({
}) {
const { t } = useTranslation();
return (
<div className="flex flex-col gap-3 rounded-control border border-amber-500/20 bg-amber-500/8 px-4 py-3 text-[12.5px] text-amber-800 dark:text-amber-200 sm:flex-row sm:items-center sm:justify-between">
<span>{message}</span>
<div className="flex flex-wrap items-center gap-x-3 gap-y-1 text-[12px] text-muted-foreground">
<span role="status">{message}</span>
{onRestart ? (
<Button
type="button"
size="sm"
variant="outline"
variant="ghost"
onClick={onRestart}
disabled={isRestarting}
className="h-8 rounded-full bg-background/80 px-3 text-[12px] font-semibold"
className="h-8 rounded-full px-2 text-[12px] font-medium text-muted-foreground hover:text-foreground"
>
{isRestarting ? (
<Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden />
@@ -178,7 +179,7 @@ export function RestartRequiredNotice({
export function SettingsSectionTitle({ children }: { children: ReactNode }) {
return (
<h2 className="mb-2 px-1 text-[13px] font-semibold tracking-[-0.01em] text-foreground/85">
<h2 className="settings-section-title select-none text-[13px] font-semibold tracking-[-0.01em] text-foreground/85">
{children}
</h2>
);
@@ -187,7 +188,7 @@ export function SettingsSectionTitle({ children }: { children: ReactNode }) {
export function SettingsGroup({ children }: { children: ReactNode }) {
return (
<div className="overflow-hidden rounded-panel bg-settings-surface">
<div className="divide-y divide-border/45">{children}</div>
{children}
</div>
);
}
@@ -197,21 +198,18 @@ export function SettingsRow({
description,
children,
}: {
title: string;
title: ReactNode;
description?: string;
children?: ReactNode;
}) {
return (
<div className="flex min-h-[62px] flex-col gap-3 px-4 py-3.5 sm:flex-row sm:items-center sm:justify-between sm:px-5">
<div className="settings-row rounded-xl transition-colors settings-hover focus-within:bg-sidebar-accent/60">
<div className="min-w-0">
<div className="text-[14px] font-medium leading-5 text-foreground">{title}</div>
{description ? (
<div className="mt-0.5 max-w-[28rem] text-[12px] leading-5 text-muted-foreground">
{description}
</div>
) : null}
<div className="select-none text-[14px] font-medium leading-5 text-foreground">
{description ? <SettingsHint description={description}>{title}</SettingsHint> : title}
</div>
</div>
{children ? <div className="min-w-0 sm:ml-6 sm:shrink-0">{children}</div> : null}
{children ? <div className="settings-control">{children}</div> : null}
</div>
);
}
@@ -235,6 +233,9 @@ export function ReadOnlyRow({
}
export function RestartSettingsFooter({
saveLabel,
error = false,
autoSave = false,
dirty,
saving,
pendingRestart,
@@ -247,6 +248,9 @@ export function RestartSettingsFooter({
onReset,
isRestarting,
}: {
saveLabel?: string;
error?: boolean;
autoSave?: boolean;
dirty: boolean;
saving: boolean;
pendingRestart: boolean;
@@ -269,22 +273,27 @@ export function RestartSettingsFooter({
? tx("app.system.restartingEngine", "Restarting engine...")
: t("app.system.restarting");
const statusMessage =
message ??
(saving ? t("settings.actions.saving") : undefined) ?? message ??
(pendingRestart && !dirty
? pendingMessage ?? tx("settings.status.savedRestartApply", "Saved. Restart when ready.")
? pendingMessage ?? tx("settings.status.savedRestartApply", "Saved. Restart to apply changes.")
: dirty
? dirtyMessage ?? t("settings.status.unsaved")
? autoSave
? error ? undefined : t("settings.actions.saving")
: dirtyMessage ?? t("settings.status.unsaved")
: undefined);
const statusTone = disabled ? "danger" : dirty || pendingRestart ? "accent" : undefined;
const statusTone = error || disabled ? "danger" : dirty || pendingRestart ? "accent" : undefined;
if (autoSave && !statusMessage && !pendingRestart) return null;
return (
<div className="flex min-h-[58px] flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5">
<div className="min-w-0 text-[13px] leading-5 text-muted-foreground">
<div className={cn("settings-footer", autoSave && "settings-footer-auto")}>
<div role={error ? "alert" : "status"} className="min-w-0 text-[13px] leading-5 text-muted-foreground">
<SettingsStatusMessage tone={statusTone}>{statusMessage}</SettingsStatusMessage>
</div>
<div className="flex w-full shrink-0 flex-wrap justify-end gap-2 sm:w-auto">
{pendingRestart && !dirty && onRestart ? (
<Button
type="button"
size="sm"
variant="ghost"
onClick={onRestart}
@@ -299,8 +308,9 @@ export function RestartSettingsFooter({
{isRestarting ? restartingLabel : restartLabel}
</Button>
) : null}
{onReset ? (
{onReset && !autoSave ? (
<Button
type="button"
size="sm"
variant="ghost"
onClick={onReset}
@@ -310,15 +320,16 @@ export function RestartSettingsFooter({
{t("settings.actions.cancel")}
</Button>
) : null}
<Button
{!autoSave ? <Button
type="button"
size="sm"
variant="outline"
onClick={onSave}
disabled={!dirty || disabled || saving}
className="rounded-full"
>
{saving ? t("settings.actions.saving") : t("settings.actions.save")}
</Button>
{saving ? t("settings.actions.saving") : saveLabel ?? t("settings.actions.save")}
</Button> : null}
</div>
</div>
);
@@ -366,7 +377,7 @@ export function StatusPill({
return (
<span
className={cn(
"inline-flex max-w-[260px] items-center rounded-full px-2.5 py-1 text-[12px] font-medium",
"inline-flex max-w-[260px] select-none items-center rounded-full px-2.5 py-1 text-[12px] font-medium",
tone === "success" && "bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",
tone === "warning" && "bg-amber-500/10 text-amber-700 dark:text-amber-300",
tone === "neutral" && "bg-muted text-muted-foreground",
@@ -391,7 +402,7 @@ export function NumberInput({
suffix?: string;
}) {
return (
<div className="flex items-center gap-2">
<div className="relative w-full">
<Input
type="number"
min={min}
@@ -401,9 +412,9 @@ export function NumberInput({
const parsed = Number(event.target.value);
if (Number.isFinite(parsed)) onChange(parsed);
}}
className="h-8 w-24 max-w-full rounded-full text-[13px]"
className={cn("h-9 w-full rounded-full text-[13px]", suffix && "pr-12")}
/>
{suffix ? <span className="text-[12px] text-muted-foreground">{suffix}</span> : null}
{suffix ? <span className="pointer-events-none absolute inset-y-0 right-3 flex select-none items-center text-[12px] text-muted-foreground">{suffix}</span> : null}
</div>
);
}
@@ -0,0 +1,71 @@
import { useEffect, useRef, useState, type ReactNode } from "react";
import { ChevronDown } from "lucide-react";
import { useTranslation } from "react-i18next";
import { ToggleButton } from "@/components/settings/ToggleButton";
import { SettingsGroup, SettingsRow } from "@/components/settings/shared/SettingsControls";
import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
export function SettingsAdvancedOptions({ children }: { children: ReactNode }) {
const { t } = useTranslation();
return (
<details className="group/advanced [&>summary]:select-none">
<summary className="settings-list-inset flex min-h-12 cursor-pointer list-none items-center justify-between gap-4 rounded-xl text-[13px] leading-5 text-muted-foreground settings-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden">
{t("settings.runtimeConfig.advancedOptions")}
<ChevronDown aria-hidden className="h-3.5 w-3.5 shrink-0 group-open/advanced:rotate-180" />
</summary>
<div className="space-y-1">{children}</div>
</details>
);
}
export function SettingsFeature({
title, enabled, onChange, disabled, initialOpen = false, error, children,
}: {
title: string;
enabled: boolean;
onChange: (enabled: boolean) => void;
disabled?: boolean;
initialOpen?: boolean;
error?: string;
children?: ReactNode;
}) {
const { t } = useTranslation();
const [open, setOpen] = useState(initialOpen && enabled);
const section = useRef<HTMLElement>(null);
useEffect(() => {
if (initialOpen && enabled) {
setOpen(true);
section.current?.scrollIntoView?.({ block: "nearest" });
}
}, [initialOpen, enabled]);
return (
<section ref={section} aria-label={title}>
<Dialog open={Boolean(children) && open} onOpenChange={setOpen}>
<SettingsGroup>
<SettingsRow title={children ? (
<DialogTrigger asChild>
<button type="button"
className="flex min-h-9 w-full items-center rounded-lg text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
{title}
</button>
</DialogTrigger>
) : title}>
{children ? <DialogTrigger asChild>
<button type="button"
className="mr-3 shrink-0 rounded-lg px-2 py-1 text-[13px] leading-5 text-muted-foreground settings-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
{t("settings.configure")}
</button>
</DialogTrigger> : null}
<ToggleButton checked={enabled} disabled={disabled} ariaLabel={title} label={title}
onChange={(next) => { setOpen(next); onChange(next); }} />
</SettingsRow>
</SettingsGroup>
{children ? <DialogContent aria-describedby={undefined} className="settings-grid max-h-[85dvh] w-[min(calc(100vw-2rem),40rem)] max-w-none overflow-y-auto p-0 [--settings-surface:var(--background)]">
<DialogTitle className="sr-only">{title}</DialogTitle>
<div className="pb-4 pt-8">{children}</div>
</DialogContent> : null}
</Dialog>
{error && !open ? <p role="alert" className="settings-list-inset pt-2 text-[13px] leading-5 text-destructive">{error}</p> : null}
</section>
);
}
@@ -0,0 +1,25 @@
import { useState, type ReactNode } from "react";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
export function SettingsHint({ children, description }: { children: ReactNode; description: string }) {
const [open, setOpen] = useState(false);
return (
<TooltipProvider>
<Tooltip open={open} onOpenChange={setOpen}>
<TooltipTrigger asChild>
<button
type="button"
onClick={(event) => { event.preventDefault(); setOpen(true); }}
className="max-w-full cursor-help rounded-sm text-left outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
{children}
</button>
</TooltipTrigger>
<TooltipContent side="top" className="max-w-[min(22rem,calc(100vw-2rem))] whitespace-normal text-pretty leading-5">
{description}
</TooltipContent>
</Tooltip>
</TooltipProvider>
);
}
@@ -0,0 +1,70 @@
import { useRef, useState } from "react";
import { SquarePen } from "lucide-react";
import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import { Textarea } from "@/components/ui/textarea";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
export function SettingsTextEditor({ id, title, description, value, placeholder, disabled, onSave }: {
id?: string;
title: string;
description?: string;
value: string;
placeholder?: string;
disabled?: boolean;
onSave: (value: string) => void | Promise<void>;
}) {
const { t } = useTranslation();
const [open, setOpen] = useState(false);
const [draft, setDraft] = useState(value);
const [saving, setSaving] = useState(false);
const [error, setError] = useState("");
const editor = useRef<HTMLTextAreaElement>(null);
const save = async () => {
setSaving(true);
setError("");
try {
await onSave(draft);
setOpen(false);
} catch (cause) {
setError(cause instanceof Error ? cause.message : String(cause));
editor.current?.focus();
} finally {
setSaving(false);
}
};
return <Dialog open={open} onOpenChange={(next) => {
if (saving) return;
if (next) { setDraft(value); setError(""); }
setOpen(next);
}}>
<TooltipProvider><Tooltip>
<TooltipTrigger asChild><DialogTrigger asChild>
<Button id={id} type="button" variant="ghost" disabled={disabled} aria-label={title}
className="ml-auto flex h-9 w-9 shrink-0 rounded-full p-0 text-muted-foreground">
<SquarePen className="h-4 w-4" aria-hidden />
</Button>
</DialogTrigger></TooltipTrigger>
<TooltipContent>{t("settings.actions.edit")}</TooltipContent>
</Tooltip></TooltipProvider>
<DialogContent className="max-w-xl" showCloseButton={!saving}
onOpenAutoFocus={(event) => { event.preventDefault(); editor.current?.focus(); }}
onEscapeKeyDown={(event) => { if (saving) event.preventDefault(); }}
onPointerDownOutside={(event) => { if (saving) event.preventDefault(); }}>
<DialogHeader>
<DialogTitle className="pr-6 text-base">{title}</DialogTitle>
<DialogDescription>{description || title}</DialogDescription>
</DialogHeader>
<Textarea ref={editor} aria-label={title} value={draft} placeholder={placeholder} disabled={saving}
aria-invalid={Boolean(error)} spellCheck={false}
onChange={(event) => { setDraft(event.target.value); setError(""); }}
className="h-[min(40vh,280px)] min-h-24 resize-none rounded-xl font-mono text-[13px] leading-6" />
{error && <p role="alert" className="break-words text-[13px] text-destructive">{error}</p>}
<DialogFooter>
<Button type="button" variant="outline" disabled={saving} onClick={() => setOpen(false)}>{t("settings.actions.cancel")}</Button>
<Button type="button" disabled={saving} onClick={() => void save()}>{t(saving ? "settings.actions.saving" : "settings.actions.save")}</Button>
</DialogFooter>
</DialogContent>
</Dialog>;
}
@@ -0,0 +1,66 @@
import { useMemo, useState, type ComponentProps } from "react";
import { ChevronDown } from "lucide-react";
import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import { ComboboxOption, useComboboxNavigation } from "@/components/ui/combobox";
import { Input } from "@/components/ui/input";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
export function TimezonePicker({ value, onChange, ...triggerProps }: {
value: string;
onChange: (value: string) => void;
} & Pick<ComponentProps<typeof Button>, "id" | "aria-label" | "aria-describedby" | "aria-invalid" | "disabled">) {
const { t, i18n } = useTranslation();
const [open, setOpen] = useState(false);
const [query, setQuery] = useState("");
const options = useMemo(() => {
const now = new Date();
return [...new Set(["UTC", ...Intl.supportedValuesOf("timeZone"), value].filter(Boolean))]
.sort().map((zone) => {
try {
const name = new Intl.DateTimeFormat(i18n.language, { timeZone: zone, timeZoneName: "longGeneric" })
.formatToParts(now).find((part) => part.type === "timeZoneName")?.value ?? zone;
const offset = new Intl.DateTimeFormat("en", { timeZone: zone, timeZoneName: "longOffset" })
.formatToParts(now).find((part) => part.type === "timeZoneName")?.value ?? "";
return { zone, detail: `${name} · ${offset.replace("GMT", "UTC")}` };
} catch {
// Keep a server-supported timezone visible even if this browser cannot format it.
return { zone, detail: zone };
}
});
}, [i18n.language, value]);
const filtered = options.filter(({ zone, detail }) =>
`${zone.replaceAll("_", " ")} ${zone} ${detail}`.toLocaleLowerCase(i18n.language)
.includes(query.trim().toLocaleLowerCase(i18n.language)));
const select = (zone: string) => { onChange(zone); setOpen(false); };
const navigation = useComboboxNavigation({
open, values: filtered.map(({ zone }) => zone), selectedValue: value,
onSelect: select, onClose: () => setOpen(false),
});
return (
<Popover open={open} onOpenChange={(next) => { setOpen(next); setQuery(""); }}>
<PopoverTrigger asChild>
<Button {...triggerProps} type="button" variant="outline"
className="h-9 w-full justify-between rounded-full border-input bg-background px-3 text-[13px] font-normal shadow-none">
<span className="truncate">{value}</span>
<ChevronDown className="ml-2 h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden />
</Button>
</PopoverTrigger>
<PopoverContent align="end" className="w-80 max-w-[calc(100vw-2rem)] p-1.5">
<Input {...navigation.inputProps} value={query} onChange={(event) => setQuery(event.target.value)}
aria-label={t("sidebar.searchAria")} placeholder={t("sidebar.searchPlaceholder")}
className="mb-1.5 h-9 rounded-full" />
<div {...navigation.listProps} aria-label={triggerProps["aria-label"]} className="max-h-64 overflow-y-auto">
{filtered.map(({ zone, detail }) => (
<ComboboxOption key={zone} {...navigation.getOptionProps(zone)} className="block">
<span className="block">{zone}</span>
<span className="block text-xs text-muted-foreground">{detail}</span>
</ComboboxOption>
))}
</div>
{!filtered.length ? <p role="status" className="p-2 text-xs text-muted-foreground">{t("settings.timezoneNoMatches")}</p> : null}
</PopoverContent>
</Popover>
);
}
@@ -0,0 +1,18 @@
import { useEffect, useRef } from "react";
/** Save a valid draft once per edit; failures wait for another edit or explicit retry. */
export function useAutoSave(value: unknown, dirty: boolean, saving: boolean, onSave: () => void, enabled = true) {
const latest = useRef(onSave);
latest.current = onSave;
const attempted = useRef<string | null>(null);
const signature = JSON.stringify(value);
useEffect(() => {
if (!dirty) { attempted.current = null; return; }
if (!enabled || saving || attempted.current === signature) return;
const timer = window.setTimeout(() => {
attempted.current = signature;
latest.current();
}, 600);
return () => window.clearTimeout(timer);
}, [signature, dirty, saving, enabled]);
}
@@ -48,6 +48,7 @@ import {
import { Input } from "@/components/ui/input";
import { SegmentedControl } from "@/components/ui/segmented-control";
import { Textarea } from "@/components/ui/textarea";
import { SettingsTextEditor } from "@/components/settings/shared/SettingsTextEditor";
import { useLogoFallback } from "@/hooks/useLogoFallback";
import { isGenericRepositoryLogoUrl, logoFallbackUrls } from "@/lib/provider-brand";
import type {
@@ -245,7 +246,7 @@ export function AppsCatalogSettings({
)
: "";
return (
<div className="space-y-7">
<div className="settings-stack">
<div role="status" className="sr-only">{oauthStatusAnnouncement}</div>
<section className="space-y-4">
<div className="flex flex-col gap-3 lg:flex-row lg:items-center">
@@ -303,7 +304,7 @@ export function AppsCatalogSettings({
{loading ? (
<div className="flex h-36 items-center justify-center text-sm text-muted-foreground">
<Loader2 className="mr-2 h-4 w-4 animate-spin" aria-hidden />
{tx("settings.apps.loading", "Loading Apps...")}
{tx("settings.apps.loading", "Loading apps…")}
</div>
) : items.length ? (
<div className="grid grid-cols-1 gap-x-10 gap-y-1 py-3 xl:grid-cols-2">
@@ -412,7 +413,7 @@ function CliAppsCatalogRow({
const description = app.description || app.requires || app.entry_point || app.name;
return (
<article className="apps-catalog-row group flex min-w-0 items-center gap-3 rounded-control px-3 py-3 transition-colors hover:bg-muted/45">
<article className="apps-catalog-row group flex min-w-0 items-center gap-3 rounded-control px-3 py-3 transition-colors settings-hover">
<CliAppLogo app={app} showBrandLogos={showBrandLogos} />
<div className="min-w-0 flex-1">
<div className="flex min-w-0 items-baseline gap-2">
@@ -583,7 +584,7 @@ function McpAppsCatalogRow({
};
return (
<article className="min-w-0 rounded-control transition-colors hover:bg-muted/45">
<article className="min-w-0 rounded-control transition-colors settings-hover">
<div className="group flex min-w-0 flex-wrap items-center gap-x-3 gap-y-2 px-3 py-3">
<McpPresetLogo preset={preset} showBrandLogos={showBrandLogos} />
<div className="min-w-[8rem] flex-[1_1_8rem]">
@@ -918,9 +919,9 @@ export const AppsActionButton = forwardRef<HTMLButtonElement, AppsActionButtonPr
visibleLabel
? "h-8 w-auto gap-1.5 px-3 text-[12px] font-semibold"
: "h-9 w-9",
tone === "installed" && "bg-transparent hover:bg-muted/70 hover:text-foreground",
tone === "installed" && "bg-transparent settings-hover hover:text-foreground",
tone === "danger" && "bg-transparent hover:bg-destructive/10 hover:text-destructive",
tone === "default" && "bg-muted/70 hover:bg-muted hover:text-foreground",
tone === "default" && "bg-muted/70 settings-hover hover:text-foreground",
className,
)}
>
@@ -1146,16 +1147,12 @@ function McpCustomServerPanel({
htmlFor={headersInputId}
className="mb-1 block text-[11.5px] font-medium text-muted-foreground"
>
{tx("settings.mcp.headers", "Headers JSON")}
{tx("settings.mcp.headers", "Headers (JSON)")}
</label>
<Textarea
id={headersInputId}
aria-describedby={headersHelpId}
value={form.headers}
onChange={(event) => update("headers", event.target.value)}
placeholder={'{"Authorization":"Bearer ..."}'}
className="min-h-[68px] resize-y bg-background/80 font-mono text-[12px]"
/>
<SettingsTextEditor id={headersInputId} title={tx("settings.mcp.headers", "Headers (JSON)")}
value={form.headers} onSave={(value) => update("headers", value)}
placeholder={'{"Authorization":"Bearer ..."}'}
/>
<p
id={headersHelpId}
className="mt-1 text-[11.5px] leading-5 text-muted-foreground"
@@ -1180,7 +1177,7 @@ function McpCustomServerPanel({
aria-hidden
/>
{advancedOpen
? tx("settings.mcp.hideAdvanced", "Hide advanced")
? tx("settings.mcp.hideAdvanced", "Hide advanced options")
: tx("settings.mcp.advancedOptions", "Advanced options")}
</Button>
@@ -1196,30 +1193,26 @@ function McpCustomServerPanel({
{!remote ? (
<label className="min-w-0">
<span className="mb-1 block text-[11.5px] font-medium text-muted-foreground">
{tx("settings.mcp.args", "Args JSON")}
{tx("settings.mcp.args", "Arguments (JSON)")}
</span>
<Textarea
value={form.args}
onChange={(event) => update("args", event.target.value)}
placeholder={'["-y", "docs-mcp"]'}
className="min-h-[68px] resize-y bg-background/80 font-mono text-[12px]"
/>
<SettingsTextEditor title={tx("settings.mcp.args", "Arguments (JSON)")}
value={form.args} onSave={(value) => update("args", value)}
placeholder={'["-y", "docs-mcp"]'}
/>
</label>
) : null}
<label className="min-w-0">
<span className="mb-1 block text-[11.5px] font-medium text-muted-foreground">
{tx("settings.mcp.env", "Env JSON")}
{tx("settings.mcp.env", "Environment variables (JSON)")}
</span>
<Textarea
value={form.env}
onChange={(event) => update("env", event.target.value)}
<SettingsTextEditor title={tx("settings.mcp.env", "Environment variables (JSON)")}
value={form.env} onSave={(value) => update("env", value)}
placeholder={'{"API_KEY":"..."}'}
className="min-h-[68px] resize-y bg-background/80 font-mono text-[12px]"
/>
</label>
<label className="min-w-0">
<span className="mb-1 block text-[11.5px] font-medium text-muted-foreground">
{tx("settings.mcp.timeout", "Tool timeout")}
{tx("settings.mcp.timeout", "Tool timeout (seconds)")}
</span>
<Input
value={form.toolTimeout}
@@ -1240,7 +1233,7 @@ function McpCustomServerPanel({
className="h-9 w-full rounded-full px-4 text-[12.5px] font-semibold sm:w-auto"
>
{customBusy ? <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden /> : <Check className="mr-1.5 h-3.5 w-3.5" aria-hidden />}
{tx("settings.mcp.saveCustom", "Save MCP")}
{tx("settings.mcp.saveCustom", "Save MCP server")}
</Button>
</div>
</div>
@@ -1253,11 +1246,9 @@ function McpCustomServerPanel({
<span className="mb-1.5 block text-[11.5px] font-medium text-muted-foreground">
{tx("settings.mcp.configImport", "Import mcp.json")}
</span>
<Textarea
value={configImport}
onChange={(event) => onConfigImportChange(event.target.value)}
<SettingsTextEditor title={tx("settings.mcp.configImport", "Import mcp.json")}
value={configImport} onSave={onConfigImportChange}
placeholder={'{"mcpServers":{"docs":{"command":"npx","args":["-y","docs-mcp"]}}}'}
className="min-h-[84px] resize-y bg-background/80 font-mono text-[12px]"
/>
</label>
<Button
@@ -1295,7 +1286,7 @@ function mcpOAuthStatusText(
}
return popupBlocked
? tx("settings.mcp.openSignInToContinue", "Open the sign-in page to continue.")
: tx("settings.mcp.finishSignInInBrowser", "Finish signing in in the browser window.");
: tx("settings.mcp.finishSignInInBrowser", "Complete sign-in in the browser window.");
case "connecting":
return tx("settings.mcp.finishingConnection", "Finishing connection...");
case "authorized":
@@ -1433,7 +1424,7 @@ function CliAppReadyPanel({
size="sm"
variant="ghost"
onClick={copyPrompt}
className="h-8 rounded-full px-3 text-[12px] font-medium text-muted-foreground hover:bg-muted/65 hover:text-foreground"
className="h-8 rounded-full px-3 text-[12px] font-medium text-muted-foreground settings-hover hover:text-foreground"
>
{copied ? <Check className="mr-1.5 h-3.5 w-3.5" aria-hidden /> : null}
{copied
@@ -166,7 +166,7 @@ export function AutomationsSettings({
"Search task, message, linked chat, or schedule",
)}
className={cn(
"h-9 w-full rounded-control pl-9 text-[13px]",
"h-9 w-full rounded-full pl-9 text-[13px]",
SETTINGS_SEARCH_INPUT_CLASS,
)}
/>
@@ -175,7 +175,7 @@ export function AutomationsSettings({
<DropdownMenuTrigger asChild>
<button
type="button"
className="inline-flex h-9 min-w-[8.5rem] items-center justify-center gap-1.5 whitespace-nowrap rounded-control border border-border/45 bg-settings-surface px-3 text-[12px] font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground sm:w-auto"
className="inline-flex h-9 min-w-[8.5rem] items-center justify-center gap-1.5 whitespace-nowrap rounded-control border border-border/45 bg-settings-surface px-3 text-[12px] font-medium text-muted-foreground transition-colors settings-hover hover:text-foreground sm:w-auto"
>
<ArrowUpDown className="h-3.5 w-3.5" aria-hidden />
<span>{sortLabel[sort]}</span>
@@ -316,7 +316,7 @@ function AutomationListItem({
"group grid w-full grid-cols-[minmax(0,1fr)_auto] gap-3 rounded-floating px-3 py-3.5 text-left transition-colors",
selected
? "bg-background/80 text-foreground"
: "text-muted-foreground hover:bg-background/55 hover:text-foreground",
: "text-muted-foreground settings-hover hover:text-foreground",
)}
>
<span className="min-w-0">
@@ -1070,27 +1070,27 @@ function automationEditDraftError(
job: SessionAutomationJob | null,
tx: (key: string, fallback: string, values?: Record<string, unknown>) => string,
): string | null {
if (!draft.name.trim()) return tx("settings.automations.validation.nameRequired", "Name is required.");
if (!draft.name.trim()) return tx("settings.automations.validation.nameRequired", "Enter a task name.");
if (isLocalTriggerAutomation(job)) return null;
if (!draft.message.trim()) {
return tx("settings.automations.validation.messageRequired", "Message is required.");
return tx("settings.automations.validation.messageRequired", "Enter a task message.");
}
if (draft.scheduleKind === "every") {
const value = Number(draft.everyValue);
if (!Number.isInteger(value) || value <= 0) {
return tx("settings.automations.validation.intervalRequired", "Interval must be a positive number.");
return tx("settings.automations.validation.intervalRequired", "Enter a positive whole number for the interval.");
}
}
if (draft.scheduleKind === "cron" && !draft.cronExpr.trim()) {
return tx("settings.automations.validation.cronRequired", "Cron expression is required.");
return tx("settings.automations.validation.cronRequired", "Enter a Cron expression.");
}
if (draft.scheduleKind === "at") {
const atMs = new Date(draft.atLocal).getTime();
if (!Number.isFinite(atMs)) {
return tx("settings.automations.validation.timeRequired", "Run time is required.");
return tx("settings.automations.validation.timeRequired", "Choose a run time.");
}
if (atMs <= Date.now() && automationScheduleChanged(draft, job)) {
return tx("settings.automations.validation.futureRequired", "Run time must be in the future.");
return tx("settings.automations.validation.futureRequired", "Choose a time in the future.");
}
}
return null;
@@ -1,52 +1,26 @@
import { useEffect, useRef, useState } from "react";
import { ChevronLeft, Loader2, Search } from "lucide-react";
import { useRef, useState } from "react";
import { Loader2 } from "lucide-react";
import { useTranslation } from "react-i18next";
import {
channelIsRunning,
channelMatchesFilter,
channelSearchText,
localizedChannelDisplayName,
type ChannelFilter,
} from "@/components/settings/channels/ChannelIdentity";
import { localizedChannelDisplayName } from "@/components/settings/channels/ChannelIdentity";
import { ChannelCatalogRow, ChannelSetupPanel } from "@/components/settings/channels/ChannelSetupPanel";
import {
DismissibleStatusMessage,
RestartRequiredNotice,
SETTINGS_SEARCH_INPUT_CLASS,
} from "@/components/settings/shared/SettingsControls";
import { Input } from "@/components/ui/input";
import { useMediaQuery } from "@/hooks/useMediaQuery";
import { DismissibleStatusMessage, RestartRequiredNotice, SettingsGroup } from "@/components/settings/shared/SettingsControls";
import type { NanobotFeaturesPayload } from "@/lib/types";
import { cn } from "@/lib/utils";
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
export function ChannelsSettings({
token,
nanobotFeatures,
loading,
query,
actionKey,
chatAppsDocsUrl,
showBrandLogos,
error,
requiresRestartPending,
onQueryChange,
onAction,
onFeaturesUpdate,
onDismissStatus,
onRestart,
isRestarting,
token, nanobotFeatures, loading, actionKey, chatAppsDocsUrl, showBrandLogos,
error, requiresRestartPending, onAction, onFeaturesUpdate, onDismissStatus,
onRestart, isRestarting,
}: {
token: string;
nanobotFeatures: NanobotFeaturesPayload | null;
loading: boolean;
query: string;
actionKey: string | null;
chatAppsDocsUrl?: string;
showBrandLogos: boolean;
error: string | null;
requiresRestartPending: boolean;
onQueryChange: (value: string) => void;
onAction: (action: "enable" | "disable", name: string) => void;
onFeaturesUpdate: (payload: NanobotFeaturesPayload) => void;
onDismissStatus: () => void;
@@ -54,204 +28,58 @@ export function ChannelsSettings({
isRestarting?: boolean;
}) {
const { t } = useTranslation();
const tx = (key: string, fallback: string) => t(key, { defaultValue: fallback });
const normalizedQuery = query.trim().toLowerCase();
const [filter, setFilter] = useState<ChannelFilter>("all");
const splitLayout = useMediaQuery("(min-width: 1280px)");
const containerRef = useRef<HTMLDivElement>(null);
const compactDetailTopRef = useRef<HTMLButtonElement>(null);
const [compactDetailOpen, setCompactDetailOpen] = useState(false);
const allChannels = (nanobotFeatures?.features ?? [])
.filter((feature) => feature.type === "channel")
.filter((feature) => feature.settings_visible !== false)
.filter((feature) => !normalizedQuery || channelSearchText(feature, t).includes(normalizedQuery))
.sort((left, right) => {
const rank = Number(!left.ready) - Number(!right.ready);
return rank || localizedChannelDisplayName(left, t).localeCompare(
localizedChannelDisplayName(right, t),
);
});
const channels = allChannels.filter((feature) => channelMatchesFilter(feature, filter));
const [selectedChannelName, setSelectedChannelName] = useState<string | null>(null);
const selectedChannel =
channels.find((feature) => feature.name === selectedChannelName) ?? channels[0] ?? null;
const enabledCount = allChannels.filter(channelIsRunning).length;
const offCount = Math.max(0, allChannels.length - enabledCount);
const filterOptions: Array<{ value: ChannelFilter; label: string; count: number }> = [
{ value: "all", label: tx("settings.channels.filterAll", "All"), count: allChannels.length },
{ value: "on", label: tx("settings.channels.filterOn", "On"), count: enabledCount },
{ value: "off", label: tx("settings.channels.filterOff", "Off"), count: offCount },
];
const statusMessage = error;
const statusIsError = true;
useEffect(() => {
if (!channels.length) {
if (selectedChannelName !== null) setSelectedChannelName(null);
setCompactDetailOpen(false);
return;
}
if (!selectedChannelName || !channels.some((feature) => feature.name === selectedChannelName)) {
setSelectedChannelName(channels[0].name);
setCompactDetailOpen(false);
}
}, [channels, selectedChannelName]);
useEffect(() => {
if (splitLayout) return;
const resetScroll = () => {
let node = containerRef.current?.parentElement ?? null;
while (node) {
node.scrollTop = 0;
node = node.parentElement;
}
if (compactDetailOpen) {
compactDetailTopRef.current?.scrollIntoView?.({ block: "start" });
}
};
resetScroll();
const frame = window.requestAnimationFrame(resetScroll);
return () => window.cancelAnimationFrame(frame);
}, [compactDetailOpen, selectedChannelName, splitLayout]);
const openChannel = (name: string) => {
setSelectedChannelName(name);
if (!splitLayout) setCompactDetailOpen(true);
};
const setupPanel = selectedChannel ? (
<ChannelSetupPanel
token={token}
feature={selectedChannel}
actionKey={actionKey}
chatAppsDocsUrl={chatAppsDocsUrl}
showBrandLogos={showBrandLogos}
onAction={onAction}
onFeaturesUpdate={onFeaturesUpdate}
/>
) : null;
const showingCompactDetail = !splitLayout && compactDetailOpen && selectedChannel !== null;
const [connectRequestId, setConnectRequestId] = useState(0);
const triggerRef = useRef<HTMLElement | null>(null);
const dialogRef = useRef<HTMLDivElement | null>(null);
const channels = (nanobotFeatures?.features ?? [])
.filter((feature) => feature.type === "channel" && feature.settings_visible !== false)
.sort((left, right) => Number(!left.ready) - Number(!right.ready)
|| localizedChannelDisplayName(left, t).localeCompare(localizedChannelDisplayName(right, t)));
const selectedChannel = channels.find((feature) => feature.name === selectedChannelName);
return (
<div
ref={containerRef}
className="flex min-h-full flex-1 flex-col xl:min-h-0 xl:overflow-hidden"
>
{!showingCompactDetail ? (
<section className="shrink-0 space-y-4">
<div className="flex flex-col gap-3 lg:flex-row lg:items-center">
<div className="relative min-w-0 flex-1">
<Search className="pointer-events-none absolute left-4 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" aria-hidden />
<Input
value={query}
onChange={(event) => onQueryChange(event.target.value)}
placeholder={tx("settings.channels.searchPlaceholder", "Search channels")}
className={cn(
"h-12 rounded-control pl-11 text-[15px]",
SETTINGS_SEARCH_INPUT_CLASS,
)}
/>
</div>
<div className="flex shrink-0 flex-wrap gap-1.5 rounded-control bg-muted/55 p-1">
{filterOptions.map((option) => (
<button
key={option.value}
type="button"
onClick={() => setFilter(option.value)}
className={cn(
"rounded-control px-3 py-1.5 text-[12px] font-medium transition-colors",
filter === option.value
? "bg-background text-foreground"
: "text-muted-foreground hover:text-foreground",
)}
>
{option.label}
<span className="ml-1 text-[11px] text-muted-foreground">{option.count}</span>
</button>
))}
</div>
</div>
</section>
) : null}
{statusMessage ? (
<div className="mt-3 shrink-0">
<DismissibleStatusMessage
message={statusMessage}
isError={statusIsError}
onDismiss={onDismissStatus}
/>
</div>
) : null}
<div className="settings-stack">
{error ? <DismissibleStatusMessage message={error} isError onDismiss={onDismissStatus} /> : null}
{requiresRestartPending ? (
<div className="mt-3 shrink-0">
<RestartRequiredNotice
message={tx("settings.channels.restartRequired", "Restart nanobot to apply updated channel support.")}
onRestart={onRestart}
isRestarting={isRestarting}
/>
</div>
<RestartRequiredNotice message={t("settings.channels.restartRequired")}
onRestart={onRestart} isRestarting={isRestarting} />
) : null}
<section
className={cn(
"flex flex-1 flex-col",
showingCompactDetail ? "mt-1" : "mt-5",
splitLayout && "min-h-0 overflow-hidden",
)}
>
{loading && !nanobotFeatures ? (
<div className="flex h-36 items-center justify-center text-sm text-muted-foreground">
<Loader2 className="mr-2 h-4 w-4 animate-spin" aria-hidden />
{tx("settings.channels.loading", "Loading Channels...")}
</div>
) : channels.length ? splitLayout ? (
<div className="grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_minmax(400px,460px)] gap-6 overflow-hidden">
<div className="min-h-0 space-y-1 overflow-y-auto overscroll-contain pr-1">
{channels.map((feature) => (
<ChannelCatalogRow
key={feature.name}
feature={feature}
selected={selectedChannel?.name === feature.name}
showBrandLogos={showBrandLogos}
onSelect={() => openChannel(feature.name)}
/>
))}
</div>
<div className="min-h-0 overflow-y-auto overscroll-contain pr-1">{setupPanel}</div>
</div>
) : showingCompactDetail ? (
<div className="pb-6">
<button
ref={compactDetailTopRef}
type="button"
onClick={() => setCompactDetailOpen(false)}
className="mb-4 inline-flex h-9 items-center gap-1.5 rounded-full px-2.5 text-[13px] font-medium text-muted-foreground transition-colors hover:bg-muted/70 hover:text-foreground"
>
<ChevronLeft className="h-4 w-4" aria-hidden />
{tx("settings.channels.backToChannels", "All channels")}
</button>
{setupPanel}
</div>
) : (
<div className="space-y-1 pb-6">
{channels.map((feature) => (
<ChannelCatalogRow
key={feature.name}
feature={feature}
selected={false}
showBrandLogos={showBrandLogos}
onSelect={() => openChannel(feature.name)}
/>
))}
</div>
) : (
<div className="min-h-0 flex-1 px-3 py-12 text-center text-sm text-muted-foreground">
{tx("settings.channels.empty", "No channels match this filter.")}
</div>
)}
</section>
{loading && !nanobotFeatures ? (
<div className="flex h-36 items-center justify-center text-sm text-muted-foreground">
<Loader2 className="mr-2 h-4 w-4 animate-spin" aria-hidden />
{t("settings.channels.loading")}
</div>
) : channels.length ? (
<SettingsGroup>
{channels.map((feature) => (
<ChannelCatalogRow key={feature.name} feature={feature} showBrandLogos={showBrandLogos}
actionKey={actionKey} onAction={onAction}
onSelect={(connect = false) => {
triggerRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
setConnectRequestId(connect ? 1 : 0);
setSelectedChannelName(feature.name);
}} />
))}
</SettingsGroup>
) : (
<div className="px-3 py-12 text-center text-sm text-muted-foreground">
{t("settings.channels.empty")}
</div>
)}
<Dialog open={Boolean(selectedChannel)} onOpenChange={(open) => { if (!open) setSelectedChannelName(null); }}>
<DialogContent ref={dialogRef} aria-describedby={undefined} className="max-h-[85dvh] w-[min(calc(100vw-2rem),40rem)] max-w-none overflow-y-auto p-0 outline-none"
onOpenAutoFocus={(event) => {
event.preventDefault();
dialogRef.current?.focus({ preventScroll: true });
}}
onCloseAutoFocus={(event) => { event.preventDefault(); triggerRef.current?.focus(); }}>
<DialogTitle className="sr-only">{t("settings.nav.channels")}</DialogTitle>
{selectedChannel ? <ChannelSetupPanel token={token} feature={selectedChannel} actionKey={actionKey}
chatAppsDocsUrl={chatAppsDocsUrl} showBrandLogos={showBrandLogos}
onAction={onAction} onFeaturesUpdate={onFeaturesUpdate} connectRequestId={connectRequestId} /> : null}
</DialogContent>
</Dialog>
</div>
);
}
@@ -449,7 +449,7 @@ function ToolsPanel({
return (
<label
key={toolName}
className="flex min-h-11 cursor-pointer items-center gap-3 border-b border-border/45 px-3.5 py-2.5 transition-colors last:border-b-0 hover:bg-muted/35 has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-inset has-[:focus-visible]:ring-ring"
className="flex min-h-11 cursor-pointer items-center gap-3 border-b border-border/45 px-3.5 py-2.5 transition-colors last:border-b-0 settings-hover has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-inset has-[:focus-visible]:ring-ring"
>
<span className="relative h-5 w-5 shrink-0">
<input
@@ -598,7 +598,7 @@ function ConnectionPanel({
{field.label}
{field.configured ? (
<span className="font-normal text-emerald-600 dark:text-emerald-300">
· {tx("settings.mcp.configured", "configured")}
· {tx("settings.mcp.configured", "Configured")}
</span>
) : null}
</span>
@@ -607,7 +607,7 @@ function ConnectionPanel({
type={field.secret ? "password" : "text"}
value={values[field.name] ?? ""}
onChange={(event) => onFieldChange(preset.name, field.name, event.target.value)}
placeholder={field.configured ? tx("settings.mcp.keepExisting", "Leave blank to keep existing") : field.placeholder}
placeholder={field.configured ? tx("settings.mcp.keepExisting", "Leave blank to keep the current value") : field.placeholder}
className="h-10 rounded-full bg-muted/35 text-[12.5px]"
/>
</label>
@@ -0,0 +1,238 @@
import { useEffect, useRef, useState, type ReactNode } from "react";
import { useTranslation } from "react-i18next";
import { ToggleButton } from "@/components/settings/ToggleButton";
import { SettingsGroup, SettingsRow, SettingsSectionTitle, RestartRequiredNotice, RestartSettingsFooter } from "@/components/settings/shared/SettingsControls";
import { ProviderPicker } from "@/components/settings/shared/ModelControls";
import { TimezonePicker } from "@/components/settings/shared/TimezonePicker";
import { SettingsTextEditor } from "@/components/settings/shared/SettingsTextEditor";
import { Input } from "@/components/ui/input";
import { RUNTIME_CONFIG_FIELDS, RUNTIME_CONFIG_GROUPS, type RuntimeConfigField, type RuntimeConfigPage } from "@/components/settings/system/runtime-config-fields";
import { updateRuntimeConfigSettings } from "@/lib/api";
import type { NanobotClient } from "@/lib/nanobot-client";
import type { RuntimeConfigValue, SettingsPayload } from "@/lib/types";
import type { ApplySettingsPayload } from "@/components/settings/contracts";
type Draft = string | boolean;
function displayValue(value: RuntimeConfigValue | undefined): Draft {
if (typeof value === "boolean") return value;
if (Array.isArray(value)) return value.join("\n");
return value == null ? "" : String(value);
}
export function useRuntimeConfigSettings(
settings: SettingsPayload | null,
client: NanobotClient,
applyPayload: ApplySettingsPayload,
) {
const { t } = useTranslation();
const [drafts, setDrafts] = useState<Record<string, Draft>>({});
const [saving, setSaving] = useState<string | null>(null);
const [errors, setErrors] = useState<Record<string, string>>({});
const [invalidField, setInvalidField] = useState<string | null>(null);
const delay = useRef(600);
const saveLatest = useRef<(group: string) => Promise<void>>(async () => {});
const pendingGroups = useRef<string[]>([]);
const queuedSaves = useRef<string[]>([]);
const [saved, setSaved] = useState<Record<string, boolean>>({});
useEffect(() => {
if (invalidField && saving === null) document.getElementById(`runtime-${invalidField}`)?.focus();
}, [invalidField, saving]);
const value = (path: string): Draft => drafts[path] ?? displayValue(settings?.runtime_config?.[path]);
const visible = (field: RuntimeConfigField) => !field.when || (Array.isArray(field.when.value)
? field.when.value.includes(String(value(field.when.path)))
: value(field.when.path) === field.when.value);
const dirty = (field: RuntimeConfigField) =>
drafts[field.path] !== undefined && drafts[field.path] !== displayValue(settings?.runtime_config?.[field.path]);
const discard = (group: string) => {
setDrafts((prev) => Object.fromEntries(Object.entries(prev).filter(([path]) =>
!RUNTIME_CONFIG_FIELDS.some((field) => field.group === group && field.path === path),
)));
setErrors((prev) => ({ ...prev, [group]: "" }));
setInvalidField(null);
};
const change = (field: RuntimeConfigField, next: Draft) => {
delay.current = ["boolean", "toggle", "select", "preset"].includes(field.kind) ? 0 : 600;
setDrafts((prev) => ({ ...prev, [field.path]: next }));
setSaved((prev) => ({ ...prev, [field.group]: false }));
setErrors((prev) => ({ ...prev, [field.group]: "" }));
setInvalidField(null);
};
const save = async (group: string) => {
if (!settings?.runtime_config) return;
if (saving) {
if (!queuedSaves.current.includes(group)) queuedSaves.current.push(group);
return;
}
const changed = RUNTIME_CONFIG_FIELDS.filter((field) => field.group === group && visible(field) && dirty(field));
if (!changed.length) return;
const values: Record<string, RuntimeConfigValue> = {};
for (const field of changed) {
const raw = value(field.path);
if (field.kind === "number") {
const parsed = Number(raw);
if (String(raw).trim() === "" || !Number.isFinite(parsed)
|| (field.path !== "api.timeout" && !Number.isInteger(parsed))
|| (field.min !== undefined && parsed < field.min)
|| (field.max !== undefined && parsed > field.max)) {
setErrors((prev) => ({ ...prev, [group]: t("settings.runtimeConfig.numberError") }));
setInvalidField(field.path);
return;
}
values[field.path] = parsed;
} else if (field.kind === "list") {
values[field.path] = String(raw).split("\n").map((line) => line.trim()).filter(Boolean);
} else if (field.kind === "nullable" || field.kind === "preset") {
values[field.path] = String(raw).trim() || null;
} else {
values[field.path] = raw;
}
}
setSaving(group);
setErrors((prev) => ({ ...prev, [group]: "" }));
try {
const payload = await updateRuntimeConfigSettings(client, values);
applyPayload(payload, { preserveAgentForm: true, preserveCapabilityForms: true });
discard(group);
setSaved((prev) => ({ ...prev, [group]: true }));
} catch (error) {
const message = (error as Error).message;
setErrors((prev) => ({ ...prev, [group]: message }));
setInvalidField(changed.find((field) => message.startsWith(field.path))?.path ?? null);
} finally {
setSaving(null);
}
};
saveLatest.current = save;
pendingGroups.current = [...new Set(RUNTIME_CONFIG_FIELDS.filter((field) =>
visible(field) && dirty(field) && !errors[field.group]
&& !RUNTIME_CONFIG_FIELDS.some((other) => other.group === field.group && other.manual && dirty(other)),
).map((field) => field.group))];
useEffect(() => {
if (saving) return;
const timer = window.setTimeout(() => {
const group = queuedSaves.current.shift() ?? pendingGroups.current[0];
if (group) void saveLatest.current(group);
}, delay.current);
return () => window.clearTimeout(timer);
}, [drafts, saving]);
const saveList = async (field: RuntimeConfigField, next: string) => {
const payload = await updateRuntimeConfigSettings(client, {
[field.path]: next.split("\n").map((line) => line.trim()).filter(Boolean),
});
applyPayload(payload, { preserveAgentForm: true, preserveCapabilityForms: true });
setSaved((prev) => ({ ...prev, [field.group]: true }));
};
return { value, visible, dirty, discard, change, save, saveList, saving, errors, invalidField, saved };
}
export type RuntimeConfigController = ReturnType<typeof useRuntimeConfigSettings>;
export function RuntimeConfigSettings({
page, settings, state, onRestart, isRestarting, remoteBrowserAccess, children,
}: {
page: RuntimeConfigPage;
settings: SettingsPayload;
state: RuntimeConfigController;
onRestart?: () => void;
isRestarting: boolean;
remoteBrowserAccess: boolean;
children?: ReactNode;
}) {
const { t } = useTranslation();
const tr = (key: string) => t(`settings.runtimeConfig.${key}`);
if (!settings.runtime_config) return <div className="settings-stack">
<p className="settings-editor text-[13px] leading-5 text-muted-foreground">{tr("unavailable")}</p>
{children}
</div>;
const groups = RUNTIME_CONFIG_GROUPS.filter((group) => group.page === page);
const restartPending = settings.restart_required_sections?.includes("runtime")
|| (settings.requires_restart && Object.values(state.saved).some(Boolean));
return (
<div className="settings-stack">
{restartPending && onRestart ? <RestartRequiredNotice message={t("settings.status.savedRestartApply")}
onRestart={onRestart} isRestarting={isRestarting} /> : null}
{groups.map((group) => {
if (group.enabledBy && state.value(group.enabledBy) === false) return null;
if (group.id === "chat") return <div key={group.id}>{children}</div>;
const fields = RUNTIME_CONFIG_FIELDS.filter((field) => field.group === group.id);
const dirty = fields.filter(state.visible).some(state.dirty);
const title = tr(`groups.${group.id}.title`);
const errorId = `runtime-error-${group.id}`;
const section = (
<section key={group.id} aria-label={title}>
<SettingsSectionTitle>{title}</SettingsSectionTitle>
<form noValidate onSubmit={(event) => { event.preventDefault(); void state.save(group.id); }}>
<fieldset disabled={state.saving === group.id || isRestarting} className="min-w-0">
<legend className="sr-only">{title}</legend>
<button type="submit" hidden />
<SettingsGroup>
{fields.filter(state.visible).map((field) => {
const id = `runtime-${field.path}`;
const key = field.path.replaceAll(".", "_");
const text = tr(`fields.${key}.label`);
const help = tr(`fields.${key}.help`);
const current = state.value(field.path);
const disabled = (field.path === "agents.defaults.timezone" && state.value("agents.defaults.timezone_mode") === "auto")
|| (field.path === "tools.webui_allow_remote_package_install" && remoteBrowserAccess);
const common = {
id, disabled, "aria-label": text, "aria-describedby": `${id}-help${state.invalidField === field.path ? ` ${errorId}` : ""}`,
"aria-invalid": state.invalidField === field.path || undefined,
};
const options = field.kind === "preset"
? ["", ...new Set(["default", ...settings.model_presets.map((preset) => preset.name)])]
: [...field.options ?? []];
// Keep a configured preset visible if it is no longer available.
if (field.kind === "preset" && current && !options.includes(String(current))) options.push(String(current));
return (
<SettingsRow key={field.path} title={text} description={help}>
<span id={`${id}-help`} className="sr-only">{help}</span>
{field.kind === "boolean" || field.kind === "toggle" ? (
<ToggleButton {...common} checked={field.kind === "toggle" ? current === field.options?.[1] : current === true} label={text}
onChange={(next) => state.change(field, field.kind === "toggle" ? field.options![next ? 1 : 0] : next)} />
) : (
<div className="w-full">
{field.path === "agents.defaults.timezone" ? (
<TimezonePicker {...common} value={String(current)} onChange={(next) => state.change(field, next)} />
) : field.kind === "list" ? (
<SettingsTextEditor id={id} title={text} description={help} value={String(current)}
disabled={disabled || state.saving !== null || isRestarting}
onSave={(next) => state.saveList(field, next)} />
) : field.kind === "select" || field.kind === "preset" ? (
<ProviderPicker triggerProps={{ ...common, disabled: disabled || state.saving === group.id || isRestarting }}
value={String(current) || "__none__"} emptyLabel={tr("none")}
providers={options.map((option) => ({ name: option || "__none__", label:
!option ? tr(field.kind === "preset" ? "activeModel" : "none")
: ["auto", "manual", "standard", "persistent"].includes(option) ? tr(option) : option,
}))}
onChange={(next) => state.change(field, next === "__none__" ? "" : next)} />
) : (
<Input {...common} type={field.kind === "number" ? "number" : "text"}
min={field.min} max={field.max} step={field.path === "api.timeout" ? "any" : 1}
value={String(current)} className="h-9 rounded-full text-[13px]" autoComplete="off"
onChange={(event) => state.change(field, event.target.value)} />
)}
</div>
)}
</SettingsRow>
);
})}
<RestartSettingsFooter autoSave={!fields.some((field) => field.manual && state.dirty(field))} dirty={dirty} saving={state.saving === group.id}
error={Boolean(state.errors[group.id])}
disabled={state.saving === group.id || isRestarting}
pendingRestart={false}
message={state.saved[group.id] && !dirty ? tr("saved") : undefined}
onSave={() => void state.save(group.id)} onReset={() => state.discard(group.id)}
onRestart={onRestart} isRestarting={isRestarting} />
</SettingsGroup>
</fieldset>
{state.errors[group.id] ? <p id={errorId} role="alert" className="mt-2 break-words px-1 text-[12px] text-destructive">{state.errors[group.id]}</p> : null}
</form>
</section>
);
return section;
})}
</div>
);
}
@@ -91,11 +91,11 @@ export function RuntimeSettings({
const [apiKeyVisible, setApiKeyVisible] = useState(false);
useEffect(() => {
if (!apiService) return;
setApiHost(apiService.host);
setApiPort(apiService.port);
setApiHost(settings.api?.host ?? apiService.host);
setApiPort(settings.api?.port ?? apiService.port);
setApiKey("");
setApiKeyVisible(false);
}, [apiService]);
}, [apiService, settings.api?.host, settings.api?.port]);
const apiNetworkAccess = !isLoopbackHost(apiHost);
const apiMissingNetworkKey = apiNetworkAccess && !apiKey.trim() && !apiDefaults.api_key_hint;
const engineState = isRestarting
@@ -114,7 +114,7 @@ export function RuntimeSettings({
target,
message: tx(
"settings.status.hostApiUnavailable",
"Host actions are only available inside the native app.",
"These actions are only available in the desktop app.",
),
});
return;
@@ -131,7 +131,7 @@ export function RuntimeSettings({
}
};
return (
<div className="space-y-7">
<div className="settings-stack">
{isNativeHost ? (
<section>
<SettingsSectionTitle>{tx("settings.sections.nativeHost", "Native host")}</SettingsSectionTitle>
@@ -238,7 +238,7 @@ export function RuntimeSettings({
: {
host: apiHost,
port: apiPort,
timeout: apiDefaults.timeout,
timeout: settings.api?.timeout ?? apiDefaults.timeout,
apiKey: apiKey.trim() || undefined,
},
)
@@ -284,8 +284,7 @@ export function RuntimeSettings({
<SettingsRow title={tx("settings.api.port", "Port")}>
<NumberInput value={apiPort} min={1} max={65535} onChange={setApiPort} />
</SettingsRow>
{apiNetworkAccess ? (
<SettingsRow
<SettingsRow
title={tx("settings.api.apiKey", "API key")}
description={
apiMissingNetworkKey
@@ -293,7 +292,7 @@ export function RuntimeSettings({
: tx("settings.api.apiKeyHelp", "Clients send this as a Bearer token.")
}
>
<div className="relative w-[280px] max-w-full">
<div className="relative w-full">
<Input
type={apiKeyVisible ? "text" : "password"}
value={apiKey}
@@ -312,8 +311,7 @@ export function RuntimeSettings({
{apiKeyVisible ? <EyeOff className="h-3.5 w-3.5" /> : <Eye className="h-3.5 w-3.5" />}
</Button>
</div>
</SettingsRow>
) : null}
</SettingsRow>
</>
) : null}
</SettingsGroup>
@@ -353,7 +351,7 @@ export function RuntimeSettings({
<Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden />
) : null}
{capabilityAction === "enable:langfuse"
? tx("settings.capabilities.installing", "Installing support...")
? tx("settings.capabilities.installing", "Installing required packages…")
: tx("settings.observability.enable", "Enable tracing support")}
</Button>
)}
@@ -372,14 +370,18 @@ export function RuntimeSettings({
/>
) : null}
<ReadOnlyRow title={t("settings.rows.configPath")} value={settings.runtime.config_path} />
<ReadOnlyRow title={tx("settings.rows.workspacePath", "Default workspace")} value={settings.runtime.workspace_path} />
<ReadOnlyRow title={tx("settings.rows.timezone", "Timezone")} value={form.timezone} />
{!settings.runtime_config ? (
<ReadOnlyRow title={tx("settings.rows.workspacePath", "Default workspace")} value={settings.runtime.workspace_path} />
) : null}
{!settings.runtime_config ? (
<ReadOnlyRow title={tx("settings.rows.timezone", "Timezone")} value={form.timezone} />
) : null}
{onRestart ? (
<SettingsRow
title={t("settings.rows.restart")}
description={
requiresRestartPending
? tx("settings.status.savedRestartApply", "Saved. Restart when ready.")
? tx("settings.status.savedRestartApply", "Saved. Restart to apply changes.")
: undefined
}
>
@@ -0,0 +1,70 @@
export interface RuntimeConfigField {
group: string;
path: string;
kind: "toggle" | "text" | "nullable" | "number" | "boolean" | "select" | "list" | "preset";
options?: string[];
when?: { path: string; value: string | boolean | string[] };
manual?: boolean;
min?: number;
max?: number;
}
export type RuntimeConfigPage = "memory" | "runtime" | "advanced" | "browser" | "image";
export const RUNTIME_CONFIG_GROUPS: { id: string; page: RuntimeConfigPage; enabledBy?: string }[] = [
{ id: "identity", page: "runtime" },
{ id: "memory", page: "memory" },
{ id: "chat", page: "advanced" },
{ id: "execution", page: "advanced" },
{ id: "sessions", page: "runtime" },
{ id: "tools", page: "runtime" },
{ id: "web", page: "browser" },
{ id: "shell", page: "advanced", enabledBy: "tools.exec.enable" },
{ id: "network", page: "advanced", enabledBy: "tools.web.enable" },
{ id: "safety", page: "advanced" },
{ id: "cli", page: "advanced", enabledBy: "tools.cli_apps.enable" },
{ id: "gateway", page: "advanced" },
{ id: "api", page: "advanced" },
{ id: "storage", page: "image" },
];
export const RUNTIME_CONFIG_FIELDS: RuntimeConfigField[] = [
{ group: "identity", path: "agents.defaults.timezone_mode", kind: "toggle", options: ["manual", "auto"] },
{ group: "identity", path: "agents.defaults.timezone", kind: "text", when: { path: "agents.defaults.timezone_mode", value: "manual" } },
{ group: "memory", path: "agents.defaults.dream.enabled", kind: "boolean" },
{ group: "execution", path: "agents.defaults.provider_retry_mode", kind: "toggle", options: ["standard", "persistent"] },
{ group: "execution", path: "agents.defaults.max_tool_iterations", kind: "number", min: 1 },
{ group: "execution", path: "agents.defaults.max_concurrent_subagents", kind: "number", min: 1 },
{ group: "execution", path: "agents.defaults.max_tool_result_chars", kind: "number", min: 1 },
{ group: "execution", path: "agents.defaults.tool_hint_max_length", kind: "number", min: 20, max: 500 },
{ group: "execution", path: "tools.max_session_messages_per_minute", kind: "number", min: 1 },
{ group: "sessions", path: "agents.defaults.unified_session", kind: "boolean" },
{ group: "tools", path: "tools.exec.enable", kind: "boolean" },
{ group: "tools", path: "tools.file.enable", kind: "boolean" },
{ group: "web", path: "tools.web.enable", kind: "boolean" },
{ group: "tools", path: "tools.my.enable", kind: "boolean" },
{ group: "tools", path: "tools.my.allow_set", kind: "boolean", when: { path: "tools.my.enable", value: true } },
{ group: "shell", path: "tools.exec.timeout", kind: "number", min: 0 },
{ group: "shell", path: "tools.exec.path_prepend", kind: "text" },
{ group: "shell", path: "tools.exec.path_append", kind: "text" },
{ group: "shell", path: "tools.exec.sandbox", kind: "select", options: ["", "bwrap", "seatbelt"] },
{ group: "shell", path: "tools.exec.sandbox_ro_binds", kind: "list", when: { path: "tools.exec.sandbox", value: ["bwrap", "seatbelt"] } },
{ group: "shell", path: "tools.exec.sandbox_rw_binds", kind: "list", when: { path: "tools.exec.sandbox", value: ["bwrap", "seatbelt"] } },
{ group: "shell", path: "tools.exec.allowed_env_keys", kind: "list" },
{ group: "shell", path: "tools.exec.allow_patterns", kind: "list" },
{ group: "shell", path: "tools.exec.deny_patterns", kind: "list" },
{ group: "network", path: "tools.web.proxy", kind: "nullable" },
{ group: "network", path: "tools.web.user_agent", kind: "nullable" },
{ group: "safety", path: "tools.restrict_to_workspace", kind: "boolean" },
{ group: "safety", path: "tools.webui_allow_remote_package_install", kind: "boolean" },
{ group: "safety", path: "tools.ssrf_whitelist", kind: "list" },
{ group: "cli", path: "tools.cli_apps.install_timeout", kind: "number", min: 1, max: 3600 },
{ group: "cli", path: "tools.cli_apps.run_timeout", kind: "number", min: 1, max: 600 },
{ group: "cli", path: "tools.cli_apps.catalog_ttl_seconds", kind: "number", min: 60, max: 86400 },
{ group: "gateway", path: "gateway.host", kind: "text", manual: true },
{ group: "gateway", path: "gateway.port", kind: "number", min: 1, max: 65535, manual: true },
{ group: "gateway", path: "gateway.restart_mode", kind: "select", options: ["auto", "exec", "spawn", "exit"] },
{ group: "api", path: "api.host", kind: "text", manual: true },
{ group: "api", path: "api.timeout", kind: "number", min: 1, max: 3600 },
{ group: "storage", path: "tools.image_generation.save_dir", kind: "text" },
];
@@ -85,7 +85,7 @@ export function useSystemSettingsEffects({
useEffect(() => {
if (
!pageVisible
|| !["channels", "models", "browser", "runtime"].includes(activeSection)
|| !["channels", "models", "browser", "image", "voice", "memory", "capabilities", "runtime"].includes(activeSection)
) {
return;
}
@@ -46,7 +46,6 @@ export function useSystemSettingsState() {
const [apiServiceAction, setApiServiceAction] = useState<"start" | "stop" | null>(null);
const [apiServiceError, setApiServiceError] = useState<string | null>(null);
const [appsQuery, setAppsQuery] = useState("");
const [channelsQuery, setChannelsQuery] = useState("");
const [automationsQuery, setAutomationsQuery] = useState("");
const [automationsFilter, setAutomationsFilter] = useState<AutomationFilter>("all");
const [automationsSort, setAutomationsSort] = useState<AutomationSort>("next");
@@ -83,7 +82,6 @@ export function useSystemSettingsState() {
automationsLoading,
automationsQuery,
automationsSort,
channelsQuery,
cliApps,
cliAppsAction,
cliAppsError,
@@ -126,7 +124,6 @@ export function useSystemSettingsState() {
setAutomationsLoading,
setAutomationsQuery,
setAutomationsSort,
setChannelsQuery,
setCliApps,
setCliAppsAction,
setCliAppsError,
@@ -12,7 +12,7 @@ import {
} from "@/components/settings/capabilities/TranscriptionSettings";
import { useCapabilitySettingsActions } from "@/components/settings/capabilities/useCapabilitySettingsActions";
import { useCapabilitySettingsState } from "@/components/settings/capabilities/useCapabilitySettingsState";
import { webSearchFormFromPayload } from "@/components/settings/capabilities/WebSettings";
import { webSearchDraftState, webSearchFormFromPayload } from "@/components/settings/capabilities/WebSettings";
import type {
ApplySettingsPayload,
PendingRestartSections,
@@ -27,10 +27,12 @@ import {
} from "@/components/settings/models/useModelSettingsEffects";
import { useModelSettingsState } from "@/components/settings/models/useModelSettingsState";
import { normalizeContextWindowTokens } from "@/components/settings/shared/ModelControls";
import { useRuntimeConfigSettings } from "@/components/settings/system/RuntimeConfigSettings";
import { createSystemSettingsActions } from "@/components/settings/system/createSystemSettingsActions";
import { useSystemSettingsEffects } from "@/components/settings/system/useSystemSettingsEffects";
import { useSystemSettingsState } from "@/components/settings/system/useSystemSettingsState";
import { usePageVisibility } from "@/hooks/usePageVisibility";
import { useAutoSave } from "@/components/settings/shared/useAutoSave";
import { fetchSettings, fetchSettingsUsage } from "@/lib/api";
import {
readLocalPreferences,
@@ -115,14 +117,14 @@ export function useSettingsController({
apiService, apiServiceAction, apiServiceError, apiServiceLoading, appsKindFilter, appsQuery,
automationAction, automationPendingDelete, automationPendingEdit, automations,
automationsError, automationsFilter, automationsLoading, automationsQuery, automationsSort,
channelsQuery, cliApps, cliAppsAction, cliAppsError, cliAppsFocusName, cliAppsLoading,
cliApps, cliAppsAction, cliAppsError, cliAppsFocusName, cliAppsLoading,
cliAppsMessage, customMcpForm, mcpConfigImport, mcpError, mcpFieldValues, mcpMessage,
mcpOAuthCallbackError, mcpOAuthCallbackUrl, mcpOAuthCompleting, mcpOAuthFlow,
mcpOAuthPopupBlocked, mcpPresetAction, mcpPresets, mcpPresetsLoading, nanobotFeatureAction,
nanobotFeatureConfirm, nanobotFeatures, nanobotFeaturesError, nanobotFeaturesLoading,
setAppsKindFilter, setAppsQuery, setAutomationPendingDelete,
setAutomationPendingEdit, setAutomationsFilter,
setAutomationsQuery, setAutomationsSort, setChannelsQuery,
setAutomationsQuery, setAutomationsSort,
setCliAppsError,
setCliAppsMessage, setCustomMcpForm, setMcpConfigImport, setMcpError, setMcpFieldValues,
setMcpMessage, setMcpOAuthCallbackError, setMcpOAuthCallbackUrl,
@@ -145,7 +147,7 @@ export function useSettingsController({
const applyPayload: ApplySettingsPayload = useCallback(
(
payload: SettingsPayload,
options: { preserveAgentForm?: boolean } = {},
options: { preserveAgentForm?: boolean; preserveCapabilityForms?: boolean } = {},
) => {
setSettings(payload);
if (!options.preserveAgentForm) {
@@ -153,12 +155,16 @@ export function useSettingsController({
setForm(nextForm);
setModelPresetEditingName(nextForm.modelPreset);
setModelPresetCreating(false);
} else {
setForm((current) => ({ ...current, timezone: payload.agent.timezone }));
}
setModelCallOrder(payload.model_call_order ?? []);
setWebSearchForm((prev) => webSearchFormFromPayload(payload, prev));
setImageGenerationForm(imageGenerationFormFromPayload(payload));
setTranscriptionForm(transcriptionFormFromPayload(payload));
setNetworkSafetyForm(networkSafetyFormFromPayload(payload));
if (!options.preserveCapabilityForms) {
setWebSearchForm((prev) => webSearchFormFromPayload(payload, prev));
setImageGenerationForm(imageGenerationFormFromPayload(payload));
setTranscriptionForm(transcriptionFormFromPayload(payload));
setNetworkSafetyForm(networkSafetyFormFromPayload(payload));
}
if (payload.restart_required_sections) {
setPendingRestartSections(pendingRestartSectionsFromPayload(payload));
}
@@ -167,6 +173,8 @@ export function useSettingsController({
[onSettingsChange],
);
const runtimeConfigState = useRuntimeConfigSettings(settings, client, applyPayload);
const closeProviderOAuthFlow = useCallback(() => {
providerOAuthFlowRef.current = null;
setProviderOAuthFlow(null);
@@ -314,15 +322,6 @@ export function useSettingsController({
[settings],
);
const hasPendingRestart = useMemo(
() =>
!!settings?.requires_restart ||
pendingRestartSections.runtime ||
pendingRestartSections.browser ||
pendingRestartSections.image,
[pendingRestartSections, settings?.requires_restart],
);
const restartViaSettingsSurface = useCallback(async () => {
const isNativeHost = (settings?.surface ?? settings?.runtime_surface) === "native";
if (
@@ -412,7 +411,6 @@ export function useSettingsController({
applyPayload,
maybeRestartHostEngine,
setPendingRestartSections,
setError,
installCapabilities,
imageGenerationDirty,
transcriptionDirty,
@@ -441,6 +439,15 @@ export function useSettingsController({
saveTranscriptionSettings,
saveWebSearch,
} = capabilityActions;
useAutoSave(imageGenerationForm, imageGenerationDirty, imageGenerationSaving, saveImageGenerationSettings,
!imageGenerationForm.enabled || Boolean(settings?.image_generation.providers.find(
(provider) => provider.name === imageGenerationForm.provider,
)?.configured));
useAutoSave(transcriptionForm, transcriptionDirty, transcriptionSaving, saveTranscriptionSettings);
const webDraft = settings ? webSearchDraftState(settings, webSearchForm) : null;
useAutoSave(webSearchForm, webDraft?.dirty ?? false, webSearchSaving, saveWebSearch,
!webDraft?.missingCredential && (webSearchForm.provider !== "olostep" ||
featureCatalog.some((feature) => feature.name === "olostep" && feature.installed)));
const {
handleApiServiceAction,
handleAutomationAction,
@@ -459,6 +466,8 @@ export function useSettingsController({
return {
activeSection,
capabilityErrors: capabilityState.capabilityErrors,
runtimeConfigState,
apiService,
apiServiceAction,
apiServiceError,
@@ -477,7 +486,6 @@ export function useSettingsController({
beginModelPresetCreation,
cancelModelPresetCreation,
changeModelCallOrder,
channelsQuery,
cliApps,
cliAppsAction,
cliAppsError,
@@ -510,7 +518,6 @@ export function useSettingsController({
handleSaveCustomMcp,
handleToggleProvider,
handleWebSearchProviderChange,
hasPendingRestart,
hostEngineApplying,
imageGenerationDirty,
imageGenerationForm,
@@ -574,7 +581,6 @@ export function useSettingsController({
setAutomationsFilter,
setAutomationsQuery,
setAutomationsSort,
setChannelsQuery,
setCliAppsError,
setCliAppsMessage,
setCustomMcpForm,
@@ -112,7 +112,7 @@ export function ComposerUsagePopover({
return (
<Popover>
<TooltipProvider delayDuration={300} skipDelayDuration={80}>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<PopoverTrigger asChild>
@@ -454,7 +454,7 @@ export function ModelPresetBadge({
);
return (
<TooltipProvider delayDuration={300} skipDelayDuration={80}>
<TooltipProvider>
<Tooltip open={tooltipOpen && !open && !motion} onOpenChange={setTooltipOpen}>
{badge}
<TooltipContent side="top">{tooltipLabel}</TooltipContent>
@@ -2,7 +2,6 @@ import { useState } from "react";
import {
CalendarClock,
CircleAlert,
ListTodo,
RefreshCcw,
} from "lucide-react";
import type { TFunction } from "i18next";
@@ -74,7 +73,7 @@ export function SessionInfoPopover({ sessionKey, token, title }: SessionInfoPopo
"hover:bg-accent/40 hover:text-foreground",
)}
>
<ListTodo className="h-4 w-4 stroke-[1.75]" />
<CalendarClock className="h-4 w-4 stroke-[1.75]" />
</Button>
</PopoverTrigger>
<PopoverContent
@@ -96,7 +95,6 @@ export function SessionInfoPopover({ sessionKey, token, title }: SessionInfoPopo
<div className="flex items-center justify-between gap-3">
<div className="flex min-w-0 items-center gap-2">
<CalendarClock className="h-3.5 w-3.5 shrink-0 text-muted-foreground/80" />
<span className="truncate text-[13px] font-medium text-foreground">
{t("thread.sessionInfo.automations")}
</span>
@@ -2481,7 +2481,7 @@ export function ThreadComposer({
/>
) : null}
{showVoiceButton ? (
<TooltipProvider delayDuration={220} skipDelayDuration={80}>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Button
+1 -1
View File
@@ -96,7 +96,7 @@ export function ThreadHeader({
{promptNavigatorAction}
{actions}
{onTemporaryChatEnabledChange ? (
<TooltipProvider delayDuration={700} skipDelayDuration={0}>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Button
@@ -86,7 +86,7 @@ export function ActivityStep({
</span>
<div className={cn("min-w-0", contentClassName)}>
{typeof label === "string" ? (
<TooltipProvider delayDuration={300} skipDelayDuration={80}>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>{line}</TooltipTrigger>
<TooltipContent side="top" className="max-w-[min(32rem,calc(100vw-2rem))] whitespace-pre-wrap break-words">
+49 -5
View File
@@ -8,9 +8,12 @@ import {
modalSurfaceClassName,
} from "@/components/ui/floating-surface";
import { cn } from "@/lib/utils";
import { FloatingPortalContext } from "@/components/ui/floating-portal";
const Dialog = DialogPrimitive.Root;
const DialogTrigger = DialogPrimitive.Trigger;
const DialogPortal = DialogPrimitive.Portal;
export const DialogLayoutContext = React.createContext<HTMLElement | null>(null);
const DialogOverlay = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Overlay>,
@@ -35,22 +38,62 @@ interface DialogContentProps
const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
DialogContentProps
>(({ className, children, showCloseButton = true, ...props }, ref) => {
>(({ className, children, showCloseButton = true, onOpenAutoFocus, ...props }, ref) => {
const { t } = useTranslation();
const [container, setContainer] = React.useState<HTMLDivElement | null>(null);
const contentNode = React.useRef<HTMLDivElement | null>(null);
const layoutAnchor = React.useContext(DialogLayoutContext);
const [layout, setLayout] = React.useState<React.CSSProperties>();
React.useLayoutEffect(() => {
if (!layoutAnchor) {
setLayout(undefined);
return;
}
const update = () => {
const rect = layoutAnchor.getBoundingClientRect();
const style = getComputedStyle(layoutAnchor);
const start = parseFloat(style.paddingLeft) || 0;
const end = parseFloat(style.paddingRight) || 0;
if (rect.width > 0) setLayout({ left: rect.left + start, right: "auto", width: rect.width - start - end, paddingInline: 0 });
};
update();
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(update);
observer?.observe(layoutAnchor);
window.addEventListener("resize", update);
return () => {
observer?.disconnect();
window.removeEventListener("resize", update);
};
}, [layoutAnchor]);
const contentRef = React.useCallback((node: HTMLDivElement | null) => {
contentNode.current = node;
setContainer(node);
if (typeof ref === "function") ref(node);
else if (ref) ref.current = node;
}, [ref]);
return (
<DialogPortal>
<DialogOverlay />
<div className="fixed inset-0 z-50 flex items-center justify-center p-4">
<div className="fixed inset-0 z-50 flex items-center justify-center p-4" style={layout}>
<DialogPrimitive.Content
ref={ref}
ref={contentRef}
onOpenAutoFocus={(event) => {
if (onOpenAutoFocus) onOpenAutoFocus(event);
else {
event.preventDefault();
contentNode.current?.focus({ preventScroll: true });
}
}}
className={cn(
modalSurfaceClassName,
"grid w-full max-w-lg origin-center gap-4 rounded-modal p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
"relative grid w-full max-w-lg origin-center gap-4 rounded-modal p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
className,
)}
{...props}
>
{children}
<FloatingPortalContext.Provider value={container}>
{children}
</FloatingPortalContext.Provider>
{showCloseButton ? (
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none">
<X className="h-4 w-4" />
@@ -121,6 +164,7 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
export {
Dialog,
DialogTrigger,
DialogContent,
DialogDescription,
DialogFooter,
+7 -3
View File
@@ -9,6 +9,7 @@ import {
floatingSurfaceMotionClassName,
} from "@/components/ui/floating-surface";
import { cn } from "@/lib/utils";
import { useFloatingPortal } from "@/components/ui/floating-portal";
const DropdownMenu = DropdownMenuPrimitive.Root;
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
@@ -26,8 +27,10 @@ interface DropdownMenuContentProps
const DropdownMenuContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
DropdownMenuContentProps
>(({ className, sideOffset = 4, portalContainer, ...props }, ref) => (
<DropdownMenuPrimitive.Portal container={portalContainer ?? undefined}>
>(({ className, sideOffset = 4, portalContainer, ...props }, ref) => {
const dialogContainer = useFloatingPortal();
return (
<DropdownMenuPrimitive.Portal container={portalContainer ?? dialogContainer ?? undefined}>
<DropdownMenuPrimitive.Content
ref={ref}
sideOffset={sideOffset}
@@ -40,7 +43,8 @@ const DropdownMenuContent = React.forwardRef<
{...props}
/>
</DropdownMenuPrimitive.Portal>
));
);
});
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
const DropdownMenuItem = React.forwardRef<
@@ -0,0 +1,4 @@
import { createContext, useContext } from "react";
export const FloatingPortalContext = createContext<HTMLElement | null>(null);
export const useFloatingPortal = () => useContext(FloatingPortalContext);
+1 -1
View File
@@ -5,7 +5,7 @@ export const floatingSurfaceVisualClassName =
`rounded-floating p-1.5 ${floatingSurfaceElevationClassName}`;
export const modalOverlayClassName =
"fixed inset-0 z-50 bg-black/45 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
"fixed inset-0 z-50 bg-black/25 backdrop-blur-[8px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
export const modalSurfaceClassName =
"bg-background text-foreground shadow-[0_12px_36px_rgba(15,23,42,0.12)] dark:bg-popover dark:shadow-[0_18px_44px_rgba(0,0,0,0.32)]";
+1 -1
View File
@@ -11,7 +11,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={cn(
"flex h-10 w-full rounded-control border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
"flex h-10 w-full rounded-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
formControlFocusClassName,
className,
)}
+7 -3
View File
@@ -6,6 +6,7 @@ import {
floatingSurfaceMotionClassName,
} from "@/components/ui/floating-surface";
import { cn } from "@/lib/utils";
import { useFloatingPortal } from "@/components/ui/floating-portal";
const Popover = PopoverPrimitive.Root;
const PopoverTrigger = PopoverPrimitive.Trigger;
@@ -18,8 +19,10 @@ interface PopoverContentProps
const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
PopoverContentProps
>(({ className, sideOffset = 4, portalContainer, ...props }, ref) => (
<PopoverPrimitive.Portal container={portalContainer ?? undefined}>
>(({ className, sideOffset = 4, portalContainer, ...props }, ref) => {
const dialogContainer = useFloatingPortal();
return (
<PopoverPrimitive.Portal container={portalContainer ?? dialogContainer ?? undefined}>
<PopoverPrimitive.Content
ref={ref}
sideOffset={sideOffset}
@@ -32,7 +35,8 @@ const PopoverContent = React.forwardRef<
{...props}
/>
</PopoverPrimitive.Portal>
));
);
});
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
export {
@@ -32,8 +32,7 @@ export function SegmentedControl<T extends string>({
role={tabs ? "tablist" : undefined}
aria-label={ariaLabel}
className={cn(
"inline-flex min-h-8 max-w-full items-center gap-1 overflow-x-auto rounded-full bg-muted/65 p-1 text-[12px] font-medium text-muted-foreground",
"scrollbar-thin scrollbar-track-transparent",
"segmented-control inline-flex min-h-8 max-w-full flex-nowrap items-center gap-1 rounded-full bg-muted/65 p-1 text-[12px] font-medium text-muted-foreground",
className,
)}
>
@@ -48,7 +47,7 @@ export function SegmentedControl<T extends string>({
aria-pressed={tabs ? undefined : selected}
onClick={() => onChange(option.value)}
className={cn(
"shrink-0 whitespace-nowrap rounded-full px-3 py-1 text-muted-foreground transition-colors",
"min-w-0 truncate whitespace-nowrap rounded-full px-2 py-1 text-muted-foreground transition-colors",
selected ? "bg-background text-foreground" : "hover:text-foreground",
itemClassName,
)}
+46
View File
@@ -0,0 +1,46 @@
import * as React from "react";
import * as SelectPrimitive from "@radix-ui/react-select";
import { Check, ChevronDown, ChevronUp } from "lucide-react";
import { floatingSurfaceElevationClassName, floatingItemClassName } from "@/components/ui/floating-surface";
import { useFloatingPortal } from "@/components/ui/floating-portal";
import { cn } from "@/lib/utils";
export const Select = SelectPrimitive.Root;
export const SelectValue = SelectPrimitive.Value;
export const SelectTrigger = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<SelectPrimitive.Trigger ref={ref} {...props}
className={cn("flex h-9 items-center justify-between gap-2 rounded-control border border-input bg-background px-3 text-[13px] outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 [&>span:first-child]:truncate", className)}>
{children}
<SelectPrimitive.Icon asChild><ChevronDown className="h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden /></SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
));
SelectTrigger.displayName = "SelectTrigger";
export function SelectContent({ children }: { children: React.ReactNode }) {
const container = useFloatingPortal();
return (
<SelectPrimitive.Portal container={container ?? undefined}>
<SelectPrimitive.Content position="item-aligned" className={cn("z-50 max-h-[min(24rem,calc(100dvh-2rem))] min-w-[10rem] overflow-hidden rounded-control border border-transparent", floatingSurfaceElevationClassName)}>
<SelectPrimitive.ScrollUpButton className="flex h-6 items-center justify-center"><ChevronUp className="h-3.5 w-3.5" /></SelectPrimitive.ScrollUpButton>
<SelectPrimitive.Viewport className="p-1">
{children}
</SelectPrimitive.Viewport>
<SelectPrimitive.ScrollDownButton className="flex h-6 items-center justify-center"><ChevronDown className="h-3.5 w-3.5" /></SelectPrimitive.ScrollDownButton>
</SelectPrimitive.Content>
</SelectPrimitive.Portal>
);
}
export function SelectItem({ children, className, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>) {
return (
<SelectPrimitive.Item {...props} className={cn(floatingItemClassName, "h-9 py-0 pl-2 pr-8 data-[state=checked]:bg-muted data-[highlighted]:bg-muted data-[disabled]:opacity-50", className)}>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
<SelectPrimitive.ItemIndicator className="absolute right-2 flex items-center"><Check className="h-3.5 w-3.5" aria-hidden /></SelectPrimitive.ItemIndicator>
</SelectPrimitive.Item>
);
}
+3 -1
View File
@@ -4,7 +4,9 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import { floatingSurfaceElevationClassName } from "@/components/ui/floating-surface";
import { cn } from "@/lib/utils";
const TooltipProvider = TooltipPrimitive.Provider;
function TooltipProvider(props: Omit<React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>, "delayDuration" | "skipDelayDuration">) {
return <TooltipPrimitive.Provider {...props} delayDuration={500} skipDelayDuration={0} />;
}
const Tooltip = TooltipPrimitive.Root;
const TooltipTrigger = TooltipPrimitive.Trigger;
@@ -687,7 +687,7 @@ export function PaneWorkbench({
aria-label={t("workbench.aria", { defaultValue: "Conversation workbench" })}
className="flex h-full min-h-0 flex-col overflow-hidden bg-background"
>
<TooltipProvider delayDuration={500} skipDelayDuration={100}>
<TooltipProvider>
{chrome ? (
<header className="shrink-0 bg-background">
<div
+124
View File
@@ -52,6 +52,8 @@
--radius-pill: 9999px;
--sidebar: 40 8% 96.8%;
--sidebar-foreground: 0 0% 3.9%;
--sidebar-content: 240 3% 30%;
--sidebar-muted-foreground: 240 2% 44%;
--sidebar-selected: 40 1% 89.4%;
--sidebar-accent: 0 0% 95.8%;
--sidebar-accent-foreground: 0 0% 9%;
@@ -92,6 +94,8 @@
--temporary-border: 27 96% 61%;
--sidebar: var(--card);
--sidebar-foreground: 0 0% 98%;
--sidebar-content: 240 3% 84%;
--sidebar-muted-foreground: 240 2% 70%;
--sidebar-selected: 0 0% 29.8%;
--sidebar-accent: var(--background);
--sidebar-accent-foreground: 0 0% 98%;
@@ -851,6 +855,16 @@
transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes settings-restart-breathe {
0%, 100% { opacity: 1; }
50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: no-preference) {
.settings-restart-pending { animation: settings-restart-breathe 3s ease-in-out infinite; }
.settings-restart-pending:hover, .settings-restart-pending:focus-visible { animation: none; }
}
@keyframes preset-name-shake {
0%,
100% {
@@ -975,3 +989,113 @@
outline-offset: 2px;
}
}
/* Settings grid: 4px baseline; 920px frame; 12 columns / 24px gutter on
desktop, 4 columns / 16px gutter on mobile. Rows share the same tracks. */
@layer components {
.settings-grid {
--settings-baseline: 4px;
--settings-columns: 4;
--settings-gutter: 16px;
--settings-margin: 16px;
--settings-inset: 16px;
--settings-module-gap: 20px;
container-type: inline-size;
max-inline-size: 720px;
padding-inline: var(--settings-margin);
}
.settings-stack > :not([hidden]) ~ :not([hidden]) {
margin-block-start: var(--settings-module-gap, 20px);
}
.settings-section-title {
margin-block-end: 20px;
padding-inline: var(--settings-inset, 16px);
line-height: 20px;
}
.settings-section-heading {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px 24px;
padding-inline: var(--settings-inset, 16px);
}
.settings-section-heading > .settings-section-title { margin: 0; padding: 0; }
.settings-stack > .settings-section-heading + :not([hidden]) { margin-block-start: 20px; }
.settings-row, .settings-footer {
display: grid;
grid-template-columns: repeat(var(--settings-columns, 4), minmax(0, 1fr));
column-gap: var(--settings-gutter, 16px);
row-gap: 12px;
align-items: center;
padding: 12px var(--settings-inset, 16px);
min-block-size: 60px;
}
.settings-row > *, .settings-footer > * { grid-column: 1 / -1; min-inline-size: 0; }
.settings-control { display: flex; align-items: center; max-inline-size: 100%; }
.settings-control > * { max-inline-size: 100%; }
.settings-control input, .settings-control textarea { max-inline-size: 100%; text-align: start; }
.settings-control input[type="number"] { font-variant-numeric: tabular-nums; }
.settings-footer { min-block-size: 60px; }
.settings-footer-auto { min-block-size: 40px; padding-block: 8px; row-gap: 0; }
.settings-footer-auto > :first-child { grid-column: 1 / -1; font-size: 12px; }
.settings-footer-auto > :nth-child(2):empty { display: none; }
.settings-row:has(> .settings-control > [role="switch"]) {
grid-template-columns: minmax(0, 1fr) auto;
column-gap: 24px;
}
.settings-row:has(> .settings-control > [role="switch"]) > :first-child { grid-column: 1; }
.settings-row:has(> .settings-control > [role="switch"]) > :nth-child(2) { grid-column: 2; }
.settings-disclosure > summary {
cursor: pointer;
padding: 12px var(--settings-inset, 16px);
border-radius: var(--radius-control, 12px);
font-size: 13px;
font-weight: 500;
line-height: 20px;
color: hsl(var(--muted-foreground));
}
.settings-disclosure > summary:hover { color: hsl(var(--foreground)); }
.settings-disclosure > summary:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.settings-disclosure[open] > summary { margin-block-end: 8px; }
.settings-list-row, .settings-list-inset { padding-inline: var(--settings-inset, 16px); }
.settings-list-row { min-block-size: 60px; border-radius: 12px; }
.sidebar-action-label:lang(zh) {
display: inline-block;
min-inline-size: var(--sidebar-label-width, 3em);
text-align: justify;
text-align-last: justify;
}
@media (hover: hover) {
.settings-hover:hover { background-color: hsl(var(--sidebar-foreground) / 0.055); }
.dark .settings-hover:hover { background-color: rgb(255 255 255 / 0.07); }
}
.settings-editor { padding: 16px var(--settings-inset, 16px); }
@media (min-width: 640px) {
.settings-grid { --settings-margin: 32px; }
}
@container (min-width: 640px) {
.settings-grid .settings-row, .settings-grid .settings-footer {
--settings-columns: 12;
--settings-gutter: 24px;
}
.settings-grid .settings-control { justify-content: flex-end; }
.settings-grid .settings-row > :first-child,
.settings-grid .settings-footer > :first-child { grid-column: 1 / 8; }
.settings-grid .settings-row > :nth-child(2),
.settings-grid .settings-footer > :nth-child(2) { grid-column: 8 / -1; }
.settings-grid .settings-footer-auto > :first-child { grid-column: 1 / -1; }
.settings-grid .settings-row:has(.segmented-control) > :first-child { grid-column: 1 / 7; }
.settings-grid .settings-row:has(.segmented-control) > :nth-child(2) { grid-column: 7 / -1; }
}
@media (min-width: 768px) {
.settings-grid { --settings-inset: 24px; }
}
}
.sidebar-scroll-fade {
scroll-padding-block: 1rem;
-webkit-mask-image: linear-gradient(to bottom, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
mask-image: linear-gradient(to bottom, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
}
+401 -100
View File
@@ -25,6 +25,7 @@
"system": {
"section": "System",
"restartHint": "Restart nanobot to apply runtime changes.",
"restartAction": "Restart",
"restart": "Restart nanobot",
"restarting": "Restarting...",
"restartEngine": "Restart engine",
@@ -60,6 +61,7 @@
"closeAction": "Close temporary chat: {{title}}"
},
"sidebar": {
"resize": "Resize sidebar",
"navigation": "Sidebar navigation",
"collapse": "Collapse sidebar",
"newChat": "New topic",
@@ -80,12 +82,278 @@
}
},
"settings": {
"timezoneNoMatches": "No matching timezones.",
"configure": "Configure",
"exit": {
"title": "Restart before leaving?",
"description": "Your changes are saved. Restart to apply them.",
"later": "Restart later"
},
"runtimeConfig": {
"apiSaved": "Saved. Restart the API service to apply changes.",
"fields": {
"agents_defaults_timezone_mode": {
"label": "Use system timezone",
"help": "Turn off to choose a timezone manually."
},
"agents_defaults_timezone": {
"label": "Timezone",
"help": "Choose a timezone. UTC offsets reflect the current date."
},
"agents_defaults_dream_enabled": {
"label": "Memory consolidation",
"help": "Automatically organize useful information from conversations. Turning this off keeps existing memories available."
},
"gateway_heartbeat_enabled": {
"label": "Heartbeat",
"help": "Periodically check HEARTBEAT.md for tasks."
},
"gateway_heartbeat_interval_s": {
"label": "Check every (seconds)",
"help": "Schedule the built-in heartbeat when the gateway starts."
},
"agents_defaults_max_tool_iterations": {
"label": "Tool iterations per turn",
"help": "Maximum number of model and tool rounds for each reply."
},
"agents_defaults_max_concurrent_subagents": {
"label": "Concurrent subagents",
"help": "Maximum number of subagents running at the same time."
},
"agents_defaults_max_tool_result_chars": {
"label": "Tool result length (characters)",
"help": "Maximum number of characters from each tool result sent to the model."
},
"agents_defaults_provider_retry_mode": {
"label": "Keep retrying model requests",
"help": "Keep retrying requests after recoverable errors. Turn off to use standard retries."
},
"agents_defaults_tool_hint_max_length": {
"label": "Tool activity summary length (characters)",
"help": "Maximum number of characters shown in a tool activity summary."
},
"tools_max_session_messages_per_minute": {
"label": "Session message tool limit (per minute)",
"help": "Maximum number of messages tools can send to the same session each minute."
},
"agents_defaults_unified_session": {
"label": "Share sessions across channels",
"help": "Share conversation history across chat channels for a single user."
},
"tools_exec_enable": {
"label": "Shell tool",
"help": "Allow the agent to run shell commands."
},
"tools_file_enable": {
"label": "File tools",
"help": "Allow built-in file reading and editing tools."
},
"tools_web_enable": {
"label": "Web tools",
"help": "Allow web search and web fetch tools."
},
"tools_cli_apps_enable": {
"label": "CLI apps tool",
"help": "Allow the agent to manage and run CLI apps."
},
"tools_my_enable": {
"label": "Self-management tool",
"help": "Allow the agent to inspect its configuration."
},
"tools_my_allow_set": {
"label": "Allow configuration changes",
"help": "Allow the self-management tool to update configuration."
},
"tools_exec_timeout": {
"label": "Command timeout (seconds)",
"help": "Stop commands that exceed this duration. Set to 0 for no time limit."
},
"tools_exec_path_prepend": {
"label": "Prepend to PATH",
"help": "Directories added to the start of PATH. Separate entries with semicolons on Windows or colons on Linux and macOS."
},
"tools_exec_path_append": {
"label": "Append to PATH",
"help": "Directories added to the end of PATH. Separate entries with semicolons on Windows or colons on Linux and macOS."
},
"tools_exec_sandbox": {
"label": "Command sandbox",
"help": "Use bwrap on Linux or Seatbelt on macOS. Workspace checks alone do not isolate processes."
},
"tools_exec_sandbox_ro_binds": {
"label": "Read-only sandbox paths",
"help": "Additional paths mounted read-only. One path per line."
},
"tools_exec_sandbox_rw_binds": {
"label": "Writable sandbox paths",
"help": "Additional paths mounted with write access. One path per line."
},
"tools_exec_allowed_env_keys": {
"label": "Allowed environment variables",
"help": "Additional environment variables to pass from the host to commands, alongside required variables. One name per line."
},
"tools_exec_allow_patterns": {
"label": "Allowed command patterns",
"help": "One regular expression per line. When set, every command segment must fully match an allow rule. Matches override built-in and custom deny rules; workspace and network restrictions still apply."
},
"tools_exec_deny_patterns": {
"label": "Denied command patterns",
"help": "One regular expression per line, checked alongside built-in deny rules. Commands that fully match allow rules skip these checks."
},
"tools_web_proxy": {
"label": "Web proxy",
"help": "Proxy URL for web tools. Leave empty to use the default network configuration."
},
"tools_web_user_agent": {
"label": "User agent",
"help": "User-Agent header sent with web requests. Leave blank to use the default."
},
"tools_restrict_to_workspace": {
"label": "Restrict tools to the workspace",
"help": "Global tool access policy. Per-chat WebUI permissions are configured separately."
},
"tools_ssrf_whitelist": {
"label": "Allowed IP addresses and networks",
"help": "Allow outbound requests to these otherwise restricted addresses. Enter one IP address or CIDR range per line."
},
"tools_webui_allow_remote_package_install": {
"label": "Remote package installation",
"help": "Allow WebUI browsers on other devices to install optional packages and skills. This setting can only be changed on the gateway host."
},
"tools_cli_apps_install_timeout": {
"label": "Install timeout (seconds)",
"help": "Time allowed for CLI app installation."
},
"tools_cli_apps_run_timeout": {
"label": "Run timeout (seconds)",
"help": "Time allowed for a CLI app command."
},
"tools_cli_apps_catalog_ttl_seconds": {
"label": "Catalog cache duration (seconds)",
"help": "How long the CLI app catalog stays cached."
},
"gateway_host": {
"label": "Gateway bind address",
"help": "Address used by the gateway. Configure the WebUI listener separately under Channels → WebSocket."
},
"gateway_port": {
"label": "Gateway port",
"help": "Port used by the gateway. Command-line arguments override this setting."
},
"gateway_restart_mode": {
"label": "Restart mode",
"help": "Choose how the gateway restarts. Automatic selects a method for your environment."
},
"api_host": {
"label": "API bind address",
"help": "Set an API key in System before binding to a network address. Restart the API service to apply changes."
},
"api_timeout": {
"label": "API request timeout (seconds)",
"help": "How long each API request can take. Restart the API service to apply changes."
},
"tools_image_generation_save_dir": {
"label": "Generated image directory",
"help": "Subdirectory of nanobot’s media directory. Use a relative path; existing images are not moved."
}
},
"groups": {
"chat": {
"title": "WebUI chat permissions",
"help": "Local service access and default permissions for WebUI chats."
},
"identity": {
"title": "Timezone",
"help": "Choose the timezone for scheduled work."
},
"memory": {
"title": "Memory",
"help": "Enable or disable automatic memory consolidation."
},
"heartbeat": {
"title": "Heartbeat schedule",
"help": "Configure the built-in periodic task check."
},
"execution": {
"title": "Agent limits",
"help": "Tune tool execution and retry behavior."
},
"sessions": {
"title": "Sessions",
"help": "Share conversations across channels."
},
"tools": {
"title": "Built-in tools",
"help": "Choose which tools the agent can use."
},
"shell": {
"title": "Shell and sandbox",
"help": "Command timeouts, environment, mounts, and command filters."
},
"network": {
"title": "Web connections",
"help": "Set the proxy and User-Agent header for web requests."
},
"safety": {
"title": "Global access policies",
"help": "Workspace restrictions, private networks, and remote installs."
},
"cli": {
"title": "CLI app limits",
"help": "Set installation and command timeouts, and how long to cache the app catalog."
},
"gateway": {
"title": "Gateway process",
"help": "Deployment and process restart configuration."
},
"api": {
"title": "API server details",
"help": "Custom bind address and request timeout."
},
"storage": {
"title": "Image storage",
"help": "Choose where generated images are stored."
},
"maintenance": {
"title": "Memory scheduling",
"help": ""
},
"web": {
"title": "Web access",
"help": ""
},
"applications": {
"title": "Command-line apps",
"help": ""
}
},
"save": "Save changes",
"saving": "Saving…",
"discard": "Discard changes",
"saved": "Saved.",
"restart": "Restart nanobot",
"restartHelp": "Restart to apply changes. Command-line arguments and environment variables may override these settings.",
"search": "Find an advanced setting",
"noResults": "No matching settings.",
"pending": "Unsaved changes",
"numberError": "Enter a valid number within the allowed range.",
"activeModel": "Use active model",
"none": "None",
"auto": "Automatic",
"manual": "Manual",
"standard": "Standard",
"persistent": "Persistent",
"unavailable": "Update the gateway to edit these settings.",
"advancedOptions": "Advanced options"
},
"backToChat": "Back to chat",
"sidebar": {
"title": "Settings",
"ariaLabel": "Settings sections"
},
"nav": {
"about": "About",
"capabilities": "Capabilities",
"general": "General",
"byok": "BYOK",
"overview": "Overview",
@@ -96,13 +364,14 @@
"voice": "Voice",
"browser": "Web",
"channels": "Channels",
"cliApps": "CLI Apps",
"cliApps": "CLI apps",
"mcp": "MCP",
"runtime": "System",
"advanced": "Security",
"advanced": "Advanced",
"apps": "Apps",
"automations": "Automations",
"skills": "Skills"
"skills": "Skills",
"memory": "Memory"
},
"sections": {
"interface": "Interface",
@@ -130,7 +399,7 @@
"selectModel": "Select model",
"addConfiguration": "Add configuration",
"newConfiguration": "New model configuration",
"newConfigurationHelp": "Save a provider and model as a one-click option.",
"newConfigurationHelp": "Save a provider, model, and generation settings as a reusable preset.",
"configurationName": "Configuration name",
"configurationNameHelp": "Rename this saved model configuration.",
"configurationNamePlaceholder": "Fast writing",
@@ -139,7 +408,7 @@
"fallbackNumber": "Fallback {{number}}",
"addToOrder": "Enable preset",
"newPreset": "New model preset",
"newPresetHelp": "Save a reusable model and its generation settings.",
"newPresetHelp": "Save a model and its generation settings to use across tasks.",
"presets": "Model presets",
"editPreset": "Edit preset",
"presetName": "Preset name",
@@ -163,21 +432,22 @@
"disabled": "Disabled",
"noPresets": "No model presets yet",
"noPresetsHelp": "Create a preset, then add it to the call order.",
"removeBeforeDelete": "Remove this preset from the call order before deleting it.",
"removeBeforeDelete": "Choose another primary preset before deleting this one.",
"providerSetupRequired": "Provider setup required",
"configureProviderBeforeSaving": "Configure this provider before saving the preset.",
"deletePresetTitle": "Delete model preset?",
"deletePresetHelp": "This removes the preset “{{name}}”. Provider credentials are not affected.",
"deletePresetHelp": "Delete “{{name}}” and remove it from the fallback list. Provider credentials will be kept.",
"searchModels": "Search or type model ID",
"useCustomModel": "Use",
"loadingModels": "Loading models...",
"searchCatalog": "Search provider catalog to choose a model.",
"searchCatalog": "Search this provider’s model catalog.",
"modelsAvailable": "available",
"noModelResults": "No matching models.",
"loadFailed": "Model list unavailable.",
"unsupportedModelList": "Type a model ID manually.",
"providerNotConfigured": "Configure this provider before loading models.",
"autoProviderCustomOnly": "Auto provider mode uses custom model IDs."
"autoProviderCustomOnly": "Enter a model ID manually when using automatic provider selection.",
"availableCount": "Models available: {{count}}"
},
"rows": {
"theme": "Theme",
@@ -185,7 +455,7 @@
"provider": "Provider",
"model": "Model",
"restart": "Restart nanobot",
"configPath": "Config path",
"configPath": "Configuration file",
"activePreset": "Active preset",
"gateway": "Gateway",
"restartState": "Restart state",
@@ -193,7 +463,6 @@
"currentModel": "Current configuration",
"selectedPreset": "Selected preset",
"presetModel": "Preset model",
"density": "Density",
"activityMode": "Activity detail",
"fileEditDisplay": "File edit display",
"codeWrap": "Code wrapping",
@@ -205,11 +474,11 @@
"imageGeneration": "Image generation",
"imageProvider": "Image provider",
"imageProviderStatus": "Provider status",
"imageProviderBase": "Provider base",
"imageProviderBase": "Provider URL",
"imageModel": "Image model",
"defaultAspectRatio": "Default aspect",
"defaultAspectRatio": "Default aspect ratio",
"defaultImageSize": "Default size",
"maxImagesPerTurn": "Max images per turn",
"maxImagesPerTurn": "Max images per request",
"imageSaveDir": "Save directory",
"timezone": "Timezone",
"workspacePath": "Default workspace",
@@ -237,40 +506,39 @@
"currentModel": "Used for new replies.",
"selectedModelProvider": "Set by the selected model.",
"selectedModelValue": "Set by the selected model.",
"selectedPreset": "Named presets are read-only here; edit them in config.json.",
"presetModel": "Switch to Default to edit model and provider from the WebUI.",
"density": "Stored only in this browser.",
"activityMode": "Choose how much agent activity chrome to show by default.",
"fileEditDisplay": "Choose whether file edit activity opens as line counts or a diff.",
"selectedPreset": "Edit named presets in Models.",
"presetModel": "Choose a preset in Models to edit its model and provider.",
"activityMode": "Choose how much detail to show about the agent’s activity.",
"fileEditDisplay": "Choose whether file edits show a line count or an expanded diff.",
"codeWrap": "Keep long code lines readable on smaller screens.",
"brandLogos": "Show third-party provider and CLI logos in Settings.",
"browserNotifications": "Notify only when this page is in the background. Off by default.",
"maxResults": "Results returned by each web_search call.",
"timeout": "Seconds before a search provider request times out.",
"jinaReader": "Use Jina Reader for web_fetch when available.",
"imageGeneration": "Expose generate_image in chats when a configured image provider is available.",
"imageProvider": "Choose the registry provider used by generate_image.",
"maxResults": "Maximum number of results returned by each web search.",
"timeout": "How long to wait for a search request to finish.",
"jinaReader": "Use Jina Reader to read web pages when available.",
"imageGeneration": "Generate images in chat after setting up an image provider.",
"imageProvider": "Choose the provider used to generate images.",
"imageProviderStatus": "Image generation reuses provider credentials from Providers.",
"imageModel": "Choose a model supported by the selected image provider.",
"defaultAspectRatio": "Used when the prompt does not choose an aspect ratio.",
"defaultImageSize": "Size hint sent to providers that support it.",
"maxImagesPerTurn": "Upper bound for one generate_image request.",
"timezone": "Used for schedules and time-aware replies.",
"cliAppsCatalog": "Install only the app-specific CLI adapters nanobot can run locally; native apps stay untouched.",
"defaultAspectRatio": "Used when the request does not specify an aspect ratio.",
"defaultImageSize": "Requested image size. Only applies to providers that support this option.",
"maxImagesPerTurn": "Maximum number of images generated in a single request.",
"timezone": "Used for scheduled tasks and replies that refer to dates and times.",
"cliAppsCatalog": "Install command-line tools for nanobot to use. This does not install or change the corresponding desktop apps.",
"cliAppsFilter": "Search by app, category, or capability.",
"localServiceAccess": "Allow Full Access shell commands to reach localhost services.",
"webuiDefaultAccess": "Used by web chats without a project-specific permission.",
"securityManagedControls": "Web fetches always protect local, private, and metadata services. Core channel safety stays in config.json.",
"securityManagedControls": "Web requests block local, private, and metadata service addresses unless explicitly allowed. Channel security is configured separately.",
"logs": "Open the native engine log folder.",
"diagnostics": "Export a small runtime report for support.",
"diagnostics": "Export a diagnostic report to help troubleshoot problems.",
"localServiceAccessNative": "Allow Full Access shell commands to reach services on this Mac.",
"webuiDefaultAccessNative": "Used by native chats without a project-specific permission.",
"contextWindow": "Choose the default context budget for this model configuration.",
"transcription": "Transcribe microphone input before sending it. Chat channel voice messages use the same settings.",
"transcriptionProvider": "Uses the matching provider credentials from Providers.",
"transcriptionProviderStatus": "API keys stay under providers, not in transcription settings.",
"transcriptionModel": "Leave as the resolved default unless your provider needs a custom model id.",
"transcriptionLanguage": "Optional ISO-639 hint such as en, zh, ja, or ko."
"transcriptionModel": "Keep the default model unless your provider requires a specific model ID.",
"transcriptionLanguage": "Optional language code, such as en for English, zh for Chinese, ja for Japanese, or ko for Korean."
},
"timezone": {
"select": "Select timezone",
@@ -286,8 +554,8 @@
"filterInstalled": "Installed CLIs",
"filterNotInstalled": "Not installed",
"searchPlaceholder": "Search CLIs",
"loading": "Loading CLI Apps...",
"empty": "No CLI Apps match this filter.",
"loading": "Loading CLI apps…",
"empty": "No CLI apps match this filter.",
"statusInstalled": "App ready",
"statusMissing": "Missing",
"statusAvailable": "Available",
@@ -306,9 +574,16 @@
"openChat": "Open chat",
"unsupported": "Unsupported",
"unavailable": "Unavailable",
"noDescription": "No description available."
"noDescription": "No description available.",
"availableCount_one": "{{count}} app",
"availableCount_other": "{{count}} apps",
"installedCount_one": "{{count}} CLI installed",
"installedCount_other": "{{count}} CLIs installed"
},
"about": {
"documentation": "Documentation",
"sourceCode": "Source code",
"reportIssue": "Report an issue",
"version": "Version",
"checking": "Checking...",
"checkForUpdates": "Check for updates",
@@ -335,15 +610,15 @@
"authNone": "None",
"authHeaders": "Headers",
"command": "Command",
"args": "Args JSON",
"headers": "Headers JSON",
"args": "Arguments (JSON)",
"headers": "Headers (JSON)",
"oauthAfterSave": "Save the server, then select Connect to sign in.",
"headersHelp": "Add the request headers used by this server.",
"env": "Env JSON",
"timeout": "Tool timeout",
"env": "Environment variables (JSON)",
"timeout": "Tool timeout (seconds)",
"advancedOptions": "Advanced options",
"hideAdvanced": "Hide advanced",
"saveCustom": "Save MCP",
"hideAdvanced": "Hide advanced options",
"saveCustom": "Save MCP server",
"configImport": "Import mcp.json",
"importConfig": "Import",
"restartRequired": "Restart nanobot to connect updated MCP tools.",
@@ -364,8 +639,8 @@
"connectHint": "Add the key from your account settings.",
"saveAndEnable": "Save and enable",
"updateSetup": "Update setup",
"configured": "configured",
"keepExisting": "Leave blank to keep existing",
"configured": "Configured",
"keepExisting": "Leave blank to keep the current value",
"statusConfigured": "Configured",
"statusMissingCredentials": "Needs key",
"connectingAccount": "Connecting {{name}}",
@@ -373,10 +648,10 @@
"continueSignIn": "Continue sign-in",
"preparingSignIn": "Preparing secure sign-in…",
"openSignInToContinue": "Open the sign-in page to continue.",
"finishSignInInBrowser": "Finish signing in in the browser window.",
"finishSignInInBrowser": "Complete sign-in in the browser window.",
"manualCallbackRequired": "Finish signing in, then paste the callback URL into nanobot.",
"manualCallbackHelp": "After approving access, the localhost page will not load. Copy its full URL from the address bar and paste it here.",
"finishingConnection": "Finishing connection…",
"finishingConnection": "Completing connection…",
"activatingTools": "Activating tools…",
"connected": "Connected.",
"connectionFailed": "Connection failed.",
@@ -429,7 +704,9 @@
"linear": "Find and manage Linear issues, projects, and comments.",
"github": "Manage GitHub repositories, issues, and pull requests.",
"supabase": "Inspect and manage Supabase projects."
}
},
"toolsFound_one": "{{count}} tool",
"toolsFound_other": "{{count}} tools"
},
"values": {
"light": "Light",
@@ -442,8 +719,6 @@
"privateEngine": "Private engine",
"unixSocket": "Unix socket",
"defaultWorkspace": "Default workspace",
"comfortable": "Comfortable",
"compact": "Compact",
"auto": "Auto",
"default": "Default",
"expanded": "Expanded",
@@ -468,12 +743,12 @@
"unsaved": "Unsaved changes.",
"upToDate": "Up to date.",
"savedRestart": "Saved. Restart nanobot to apply.",
"restartAfterSaving": "Save changes, then restart when ready.",
"savedRestartApply": "Saved. Restart when ready.",
"imageProviderRestart": "Image provider changes saved. Restart when ready.",
"restartAfterSaving": "Save changes, then restart nanobot to apply them.",
"savedRestartApply": "Saved. Restart to apply changes.",
"imageProviderRestart": "Image settings saved. Restart to apply changes.",
"hostRestartAfterSaving": "Save changes and nanobot will restart its engine.",
"hostRestartPending": "Saved. Restarting engine when ready.",
"hostApiUnavailable": "Host actions are only available inside the native app.",
"hostRestartPending": "Settings saved. Waiting for the engine to restart.",
"hostApiUnavailable": "These actions are only available in the desktop app.",
"logsOpened": "Opened logs folder.",
"logsOpenFailed": "Could not open logs folder.",
"diagnosticsExported": "Diagnostics exported to {{path}}.",
@@ -495,7 +770,7 @@
"exporting": "Exporting..."
},
"byok": {
"description": "Bring your own provider keys. Nanobot reads these values from the current config and only configured providers can be used in model presets.",
"description": "Add your own provider credentials to use them in model presets.",
"configured": "Configured",
"notConfigured": "Not configured",
"configuredSection": "Configured",
@@ -503,7 +778,7 @@
"showMore": "Show {{count}} more",
"showLess": "Show fewer",
"apiKey": "API key",
"apiBase": "API base",
"apiBase": "API base URL",
"apiKeyPlaceholder": "Enter API key",
"apiKeyConfiguredPlaceholder": "Leave blank to keep the current key",
"configuredKeyHint": "Configured key",
@@ -512,21 +787,21 @@
"showApiKey": "Show API key",
"hideApiKey": "Hide API key",
"noConfiguredProviders": "No configured providers",
"configureFirst": "Configure a provider in BYOK first.",
"openByok": "Open BYOK",
"configureFirst": "Set up a provider in Providers first.",
"openByok": "Configure providers",
"tabs": {
"ariaLabel": "BYOK credential type",
"ariaLabel": "Credential type",
"llm": "LLM",
"webSearch": "Web Search"
"webSearch": "Web search"
},
"webSearch": {
"provider": "Search provider",
"providerHelp": "Choose the backend used by the web search tool.",
"providerHelp": "Choose the service used for web searches.",
"selectProvider": "Select provider",
"credentials": "Credentials",
"noCredentialRequired": "No key required",
"noCredentialHelp": "DuckDuckGo works without a saved API key.",
"apiKeyHelp": "Stored in config and masked after saving.",
"apiKeyHelp": "The key is hidden after saving.",
"baseUrl": "Base URL",
"baseUrlHelp": "SearXNG needs the URL of your own instance.",
"baseUrlPlaceholder": "https://search.example.com",
@@ -547,8 +822,31 @@
"workspace": "Workspace"
},
"usage": {
"title": "Token activity",
"shortTitle": "Token Usage",
"title": "Token usage",
"shortTitle": "Token usage",
"last30Days": "Last 30 days",
"viewDetails": "View details",
"previousPage": "Previous page",
"nextPage": "Next page",
"dailyAverage": "Daily average",
"inputTokens": "Input tokens",
"cacheHitRate": "Cache hit rate",
"requestTrend": "Daily requests",
"cacheRateHelp": "Cache hit rate excludes input with unknown cache status.",
"dailyTrend": "Daily token usage",
"bySource": "Usage by source",
"byModel": "Usage by model",
"modelTrend": "Model usage over time",
"modelsUnavailable": "No model breakdown available.",
"otherModels": "Other / unattributed",
"unclassified": "Unclassified",
"unavailable": "Usage data is unavailable.",
"noActivity": "No token usage in the last 30 days.",
"cachedInput": "Cached input",
"cacheMiss": "Cache miss",
"cacheUnknown": "Cache status unknown",
"outputTokens": "Output",
"otherTokens": "Other tokens",
"subtitle": "Provider-reported usage over the last 12 months.",
"empty": "Token activity will appear after new model replies.",
"totalTokens": "Total tokens",
@@ -568,8 +866,9 @@
"api": "API",
"cron": "Automations",
"dream": "Memory",
"system": "System"
}
"system": "Auxiliary calls"
},
"systemHelp": "Auxiliary calls include chat title generation, other internal tasks, and calls without a recorded source."
},
"providers": {
"title": "Model providers",
@@ -584,12 +883,12 @@
"saveAdvancedBeforeSignIn": "Save advanced changes before signing in.",
"apiType": "API type",
"proxy": "Network proxy",
"thinkingStyle": "Thinking style",
"thinkingStyle": "Reasoning parameter format",
"region": "Region",
"profile": "Profile",
"profile": "AWS profile",
"extraHeaders": "Extra headers",
"extraBody": "Extra body",
"extraQuery": "Extra query",
"extraBody": "Additional body parameters",
"extraQuery": "Additional query parameters",
"capabilityFastMode": "Fast mode",
"capabilityFastModeHelp": "Use OpenAI's priority service tier for faster responses. This consumes credits faster.",
"capabilityDeepSeekSearch": "DeepSeek web search",
@@ -613,16 +912,16 @@
"missingCredential": "Configure this provider before enabling image generation."
},
"capabilities": {
"providerSupport": "Provider support",
"providerInstallOnSave": "Required support will be installed automatically when you save this provider.",
"searchSupport": "Search provider support",
"searchInstallOnSave": "Olostep support will be installed automatically when you save.",
"installing": "Installing support..."
"providerSupport": "Provider dependencies",
"providerInstallOnSave": "Required packages will be installed automatically when you save this provider.",
"searchSupport": "Search dependencies",
"searchInstallOnSave": "Required Olostep packages will be installed automatically when you save.",
"installing": "Installing required packages…"
},
"api": {
"title": "API server",
"openaiCompatible": "OpenAI-compatible API",
"description": "Connect SDKs and agents through a local /v1 endpoint.",
"description": "Connect SDKs and other agents to nanobot through its OpenAI-compatible API.",
"start": "Start API server",
"starting": "Starting...",
"stop": "Stop",
@@ -638,7 +937,7 @@
"apiKeyHelp": "Clients send this as a Bearer token.",
"apiKeyRequired": "Required before exposing the API to your network.",
"apiKeyPlaceholder": "Enter an API key",
"autoInstall": "API support will be installed automatically when you start it."
"autoInstall": "Required API server packages will be installed automatically when you start it."
},
"observability": {
"title": "Observability",
@@ -647,7 +946,7 @@
"enable": "Enable tracing support"
},
"apps": {
"description": "Add tools to nanobot, then @ them in chat.",
"description": "Add tools to nanobot, then mention them with @ in chat.",
"cliLabel": "App",
"mcpLabel": "MCP",
"channelLabel": "Channel",
@@ -661,7 +960,7 @@
"searchPlaceholder": "Search tools",
"featured": "Tools",
"mcpTools": "MCP tools",
"loading": "Loading Apps...",
"loading": "Loading apps…",
"empty": "No tools match your search.",
"emptyApps": "No apps available.",
"emptyIntegrations": "No MCP tools available.",
@@ -678,7 +977,7 @@
"searchPlaceholder": "Search channels",
"backToChannels": "All channels",
"catalog": "Channels",
"loading": "Loading Channels...",
"loading": "Loading channels…",
"empty": "No channels match this filter.",
"restartRequired": "Restart nanobot to apply updated channel support.",
"requires": "Requires: {{requirements}}",
@@ -702,7 +1001,7 @@
"commandCopied": "Command copied.",
"commandCopyFailed": "Could not copy command.",
"configuredInstances": "{{count}} instances configured",
"connectPreview": "The in-browser connect flow is next. For now, run the command below.",
"connectPreview": "Run the command below in your terminal to connect.",
"copyCommand": "Copy command",
"filterAll": "All",
"filterOff": "Not running",
@@ -722,7 +1021,7 @@
"requiredSetup": "Required setup",
"savedSecret": "Saved",
"savedSecretPlaceholder": "Saved secret",
"savedSettings": "Saved settings.",
"savedSettings": "Settings saved.",
"saveSettings": "Save settings",
"selectChannel": "View {{name}} settings",
"setupSteps": "Next steps",
@@ -737,7 +1036,9 @@
"needs_setup": "Needs setup",
"invalid": "Invalid",
"unsupported": "Manual setup"
}
},
"configuredInstances_one": "{{count}} instance configured",
"configuredInstances_other": "{{count}} instances configured"
},
"nanobotFeatures": {
"enabled": "Enabled",
@@ -796,7 +1097,7 @@
"commandCopied": "Copied",
"copyCommand": "Copy",
"deleteTitle": "Delete automation",
"deleteDescription": "This removes {{name}} from the cron store. Past chat messages stay in the session.",
"deleteDescription": "Delete the automation “{{name}}”. Existing chat messages will be kept.",
"cancel": "Cancel",
"status": {
"system": "System",
@@ -874,12 +1175,12 @@
"day": "Days"
},
"validation": {
"nameRequired": "Name is required.",
"messageRequired": "Message is required.",
"intervalRequired": "Interval must be a positive number.",
"cronRequired": "Cron expression is required.",
"timeRequired": "Run time is required.",
"futureRequired": "Run time must be in the future."
"nameRequired": "Enter a task name.",
"messageRequired": "Enter a task message.",
"intervalRequired": "Enter a positive whole number for the interval.",
"cronRequired": "Enter a Cron expression.",
"timeRequired": "Choose a run time.",
"futureRequired": "Choose a time in the future."
}
},
"oauth": {
@@ -899,9 +1200,9 @@
"proxyLabel": "Network proxy",
"proxySaveBeforeSignIn": "Save proxy changes before signing in.",
"saveProxy": "Save proxy",
"localCodeHelp": "Complete sign-in in your browser. Nanobot usually finishes automatically; if it does not, paste the authorization code below.",
"localCodeHelp": "Complete sign-in in your browser. If nanobot does not connect automatically, paste the authorization code below.",
"remoteCodeHelp": "Select Sign in to open xAI on your computer. After signing in, paste the authorization code shown by xAI below.",
"localCallbackHelp": "Complete sign-in in your browser. Nanobot usually finishes automatically; if it does not, copy the full localhost callback URL from the address bar and paste it below.",
"localCallbackHelp": "Complete sign-in in your browser. If nanobot does not connect automatically, copy the full localhost callback URL from the address bar and paste it below.",
"remoteCallbackHelp": "Open ChatGPT in this browser and finish signing in. When the localhost page fails to load, copy the full URL from the address bar and paste it below.",
"authorizationCode": "Authorization code",
"callbackUrl": "Full callback URL",
@@ -912,7 +1213,7 @@
"finishSignIn": "Finish sign-in"
},
"skills": {
"description": "Review the instruction skills this agent can load during a conversation.",
"description": "Manage the skills the agent can use in conversations.",
"caption": "{{available}} available · {{total}} total",
"views": "Skills views",
"installedTab": "Installed",
@@ -931,7 +1232,7 @@
"showLess": "Show less",
"showMore": "Show more",
"enabledControl": "Use this skill",
"enabledDescription": "Allow the agent to load this skill when its requirements are ready.",
"enabledDescription": "Allow the agent to use this skill when its requirements are met.",
"enableSkill": "Enable {{name}}",
"disableSkill": "Disable {{name}}",
"updateFailed": "Could not update this skill.",
@@ -955,7 +1256,7 @@
"marketplaceProviderFilter": "Skill source",
"marketplaceProviderAll": "All",
"marketplaceTrendingTitle": "Trending by marketplace",
"marketplaceTrendingDescription": "Each marketplace keeps its own ranking and install metrics.",
"marketplaceTrendingDescription": "Rankings and install counts are shown separately for each marketplace.",
"marketplaceViewAll": "View all",
"marketplaceTrendingUnavailable": "Trending skills are temporarily unavailable.",
"marketplaceEmpty": "No skills found for “{{query}}”.",
@@ -986,14 +1287,14 @@
"source": "Source",
"status": "Status",
"requirements": "Requirements",
"noRequirements": "No explicit requirements.",
"noRequirements": "No additional requirements declared.",
"commands": "Commands",
"environment": "Environment variables",
"missingCommands": "Missing CLI",
"missingEnvironment": "Missing ENV",
"unavailableReasonLabel": "Unavailable reason",
"missingCommands": "Missing command-line tools",
"missingEnvironment": "Missing environment variables",
"unavailableReasonLabel": "Why it is unavailable",
"rawInstructions": "Raw SKILL.md",
"rawInstructionsEmpty": "No raw instructions.",
"rawInstructionsEmpty": "No skill file content available.",
"detailDescription": "Details for {{name}}."
},
"voice": {
+219 -104
View File
@@ -25,6 +25,7 @@
"system": {
"section": "Sistema",
"restartHint": "Reinicia nanobot para aplicar los cambios de ejecución.",
"restartAction": "Reiniciar",
"restart": "Reiniciar nanobot",
"restarting": "Reiniciando...",
"restartEngine": "Reiniciar motor",
@@ -60,6 +61,7 @@
"closeAction": "Cerrar chat temporal: {{title}}"
},
"sidebar": {
"resize": "Cambiar el ancho de la barra lateral",
"navigation": "Navegación de la barra lateral",
"collapse": "Contraer barra lateral",
"newChat": "Nuevo tema",
@@ -80,12 +82,92 @@
}
},
"settings": {
"timezoneNoMatches": "No hay zonas horarias que coincidan.",
"configure": "Configurar",
"exit": {
"title": "¿Reiniciar nanobot antes de salir de los ajustes?",
"description": "Los cambios están guardados. Reinicia para aplicarlos.",
"later": "Reiniciar más tarde"
},
"runtimeConfig": {
"apiSaved": "Guardado. Reinicia el servicio API para aplicar los cambios.",
"fields": {
"agents_defaults_timezone_mode": {"label": "Usar la zona horaria del sistema", "help": "Desactiva esta opción para elegir la zona horaria manualmente."},
"agents_defaults_timezone": {"label": "Zona horaria", "help": "Elige una zona horaria. La diferencia con UTC corresponde a la fecha actual."},
"agents_defaults_dream_enabled": {"label": "Consolidación de memoria", "help": "Organiza la información útil de las conversaciones. La memoria existente sigue disponible al desactivarla."},
"gateway_heartbeat_enabled": {"label": "Comprobación periódica", "help": "Busca tareas periódicamente en HEARTBEAT.md."},
"gateway_heartbeat_interval_s": {"label": "Intervalo de comprobación (segundos)", "help": "La gateway programa las comprobaciones al iniciarse."},
"agents_defaults_max_tool_iterations": {"label": "Iteraciones de herramientas por turno", "help": "Máximo de intercambios entre el modelo y las herramientas en un turno."},
"agents_defaults_max_concurrent_subagents": {"label": "Subagentes simultáneos", "help": "Máximo de subagentes que pueden ejecutarse a la vez."},
"agents_defaults_max_tool_result_chars": {"label": "Longitud de resultados de herramientas (caracteres)", "help": "Limita la salida de las herramientas incluida en el contexto del modelo."},
"agents_defaults_provider_retry_mode": {"label": "Reintentar solicitudes al modelo continuamente", "help": "Vuelve a intentar las solicitudes al modelo tras un error temporal. Desactiva esta opción para limitar el número de reintentos."},
"agents_defaults_tool_hint_max_length": {"label": "Longitud de indicaciones de herramientas (caracteres)", "help": "Longitud máxima de las indicaciones breves de actividad."},
"tools_max_session_messages_per_minute": {"label": "Mensajes de herramientas por minuto", "help": "Limita la frecuencia de los mensajes que envían las herramientas a una conversación."},
"agents_defaults_unified_session": {"label": "Compartir conversaciones entre plataformas", "help": "Usa la misma conversación para un usuario en varias plataformas de chat."},
"tools_exec_enable": {"label": "Herramienta de shell", "help": "Permite al agente ejecutar comandos de shell."},
"tools_file_enable": {"label": "Herramientas de archivos", "help": "Permite las herramientas integradas de lectura y edición de archivos."},
"tools_web_enable": {"label": "Herramientas web", "help": "Permite buscar en la web y obtener páginas."},
"tools_cli_apps_enable": {"label": "Herramienta de aplicaciones CLI", "help": "Permite al agente gestionar y ejecutar aplicaciones de línea de comandos."},
"tools_my_enable": {"label": "Herramienta de autogestión", "help": "Permite al agente consultar su configuración."},
"tools_my_allow_set": {"label": "Cambios de configuración por el agente", "help": "Permite que la herramienta de autogestión modifique la configuración."},
"tools_exec_timeout": {"label": "Tiempo límite de comandos (segundos)", "help": "Duración máxima de un comando de shell. 0 significa sin límite."},
"tools_exec_path_prepend": {"label": "Rutas prioritarias", "help": "Directorios que se añaden al inicio de PATH. Sepáralos con punto y coma en Windows o con dos puntos en macOS y Linux."},
"tools_exec_path_append": {"label": "Rutas adicionales", "help": "Directorios que se añaden al final de PATH. Sepáralos con punto y coma en Windows o con dos puntos en macOS y Linux."},
"tools_exec_sandbox": {"label": "Sandbox de comandos", "help": "Usa bwrap en Linux o Seatbelt en macOS. Las comprobaciones del espacio de trabajo por sí solas no aíslan los procesos."},
"tools_exec_sandbox_ro_binds": {"label": "Rutas de solo lectura del entorno aislado", "help": "Montajes adicionales de solo lectura, uno por línea."},
"tools_exec_sandbox_rw_binds": {"label": "Rutas con escritura del entorno aislado", "help": "Montajes adicionales con permiso de escritura, uno por línea."},
"tools_exec_allowed_env_keys": {"label": "Variables de entorno permitidas", "help": "Variables adicionales que se pasan a los comandos, una por línea. Las variables básicas necesarias siguen disponibles."},
"tools_exec_allow_patterns": {"label": "Patrones de comandos permitidos", "help": "Una expresión regular por línea. Si añades reglas, cada segmento del comando debe coincidir por completo con alguna de ellas. Los comandos permitidos omiten las reglas de bloqueo integradas y personalizadas, pero mantienen las restricciones de red y del espacio de trabajo."},
"tools_exec_deny_patterns": {"label": "Patrones de comandos bloqueados", "help": "Expresiones regulares de bloqueo adicionales, una por línea. Las reglas de permiso explícitas tienen prioridad sobre las reglas de bloqueo integradas y personalizadas."},
"tools_web_proxy": {"label": "Proxy web", "help": "URL del proxy para las herramientas web. Déjalo vacío para usar la red predeterminada."},
"tools_web_user_agent": {"label": "Cabecera User-Agent", "help": "Cabecera User-Agent personalizada. Déjalo vacío para usar el valor predeterminado."},
"tools_restrict_to_workspace": {"label": "Restringir herramientas al espacio de trabajo", "help": "Política global de herramientas. Los permisos de cada conversación WebUI se configuran por separado."},
"tools_ssrf_whitelist": {"label": "Rangos de red privada permitidos", "help": "Direcciones IP o rangos CIDR exentos de la protección de solicitudes salientes, uno por línea."},
"tools_webui_allow_remote_package_install": {"label": "Instalación remota de paquetes", "help": "Permite instalar paquetes y habilidades desde una WebUI remota. Este ajuste debe modificarse en el equipo que ejecuta la pasarela."},
"tools_cli_apps_install_timeout": {"label": "Tiempo límite de instalación (segundos)", "help": "Duración máxima de instalación de aplicaciones CLI."},
"tools_cli_apps_run_timeout": {"label": "Tiempo límite de ejecución (segundos)", "help": "Duración máxima de los comandos de aplicaciones CLI."},
"tools_cli_apps_catalog_ttl_seconds": {"label": "Duración de la caché del catálogo (segundos)", "help": "Tiempo que se conserva en caché el catálogo de aplicaciones CLI."},
"gateway_host": {"label": "Dirección de escucha de la pasarela", "help": "Dirección de escucha de la pasarela. Las direcciones de WebSocket y WebUI se configuran en Canales → WebSocket."},
"gateway_port": {"label": "Puerto de la pasarela", "help": "Puerto guardado. Los argumentos de línea de comandos tienen prioridad."},
"gateway_restart_mode": {"label": "Modo de reinicio", "help": "Método de reinicio del proceso. El modo automático depende del entorno del host."},
"api_host": {"label": "Dirección de escucha de la API", "help": "Se requiere una clave API para escuchar en una dirección distinta de localhost. Configúrala en Sistema y reinicia el servicio API para aplicar los cambios."},
"api_timeout": {"label": "Tiempo límite de solicitudes API (segundos)", "help": "Duración máxima de las solicitudes. Reinicia el servicio API para aplicar los cambios."},
"tools_image_generation_save_dir": {"label": "Carpeta de imágenes generadas", "help": "Ruta relativa dentro de la carpeta multimedia de nanobot. Las imágenes existentes no se mueven."}
},
"groups": {
"chat": {"title": "Permisos de chat WebUI", "help": "Acceso a servicios locales y permisos predeterminados de chat."},
"identity": {"title": "Zona horaria", "help": "Elige la zona horaria de las tareas programadas."},
"memory": {"title": "Memoria", "help": "Activa o desactiva la consolidación automática de memoria."},
"heartbeat": {"title": "Comprobaciones periódicas", "help": "Configura la comprobación periódica integrada de tareas."},
"execution": {"title": "Límites del agente", "help": "Ejecución de herramientas y reintentos."},
"sessions": {"title": "Conversaciones", "help": "Comparte conversaciones entre plataformas."},
"tools": {"title": "Herramientas integradas", "help": "Elige las categorías de herramientas permitidas."},
"shell": {"title": "Shell y entorno aislado", "help": "Tiempos límite, entorno, montajes y filtros de comandos."},
"network": {"title": "Conexión web", "help": "Proxy e identificación de las solicitudes web."},
"safety": {"title": "Políticas de acceso globales", "help": "Restricciones del espacio de trabajo, redes privadas e instalaciones remotas."},
"cli": {"title": "Límites de aplicaciones CLI", "help": "Tiempos de instalación, ejecución y caché del catálogo."},
"gateway": {"title": "Proceso de la pasarela", "help": "Configuración de despliegue y reinicio del proceso."},
"api": {"title": "Detalles del servidor API", "help": "Dirección de escucha y tiempo límite de solicitudes."},
"storage": {"title": "Almacenamiento de imágenes", "help": "Ubicación de las imágenes generadas."},
"maintenance": {"title": "Programación de memoria", "help": ""},
"web": {"title": "Acceso web", "help": ""},
"applications": {"title": "Aplicaciones de línea de comandos", "help": ""}
},
"save": "Guardar cambios", "saving": "Guardando…", "discard": "Descartar cambios", "saved": "Guardado.",
"restart": "Reiniciar nanobot", "restartHelp": "Reinicia para aplicar los cambios. Los argumentos de línea de comandos y las variables de entorno pueden tener prioridad.",
"search": "Buscar un ajuste avanzado", "noResults": "No hay ajustes que coincidan.", "pending": "Cambios sin guardar",
"numberError": "Introduce un número válido dentro del rango permitido.", "activeModel": "Usar el modelo activo", "none": "Ninguno",
"auto": "Automático", "manual": "Manual", "standard": "Estándar", "persistent": "Continuo",
"unavailable": "Actualiza la pasarela para editar estos ajustes.", "advancedOptions": "Opciones avanzadas"
},
"backToChat": "Volver al chat",
"sidebar": {
"title": "Ajustes",
"ariaLabel": "Secciones de ajustes"
},
"nav": {
"about": "Acerca de",
"capabilities": "Funciones",
"general": "General",
"byok": "BYOK",
"overview": "Resumen",
@@ -97,7 +179,8 @@
"browser": "Internet",
"channels": "Canales",
"runtime": "Sistema",
"advanced": "Seguridad",
"advanced": "Avanzado",
"memory": "Memoria",
"cliApps": "Aplicaciones CLI",
"mcp": "MCP",
"apps": "Aplicaciones",
@@ -106,23 +189,23 @@
},
"sections": {
"interface": "Interfaz",
"ai": "AI",
"ai": "IA",
"system": "Sistema",
"about": "Acerca de",
"status": "Estado",
"localPreferences": "Preferencias locales",
"localPreferences": "Preferencias del navegador",
"presets": "Preajustes",
"imageGeneration": "Generación de imágenes",
"imageDefaults": "Valores predeterminados",
"webSearch": "Búsqueda web",
"webBehavior": "Comportamiento",
"webBehavior": "Acceso a páginas web",
"regional": "Configuración regional",
"webuiSafety": "Seguridad de WebUI",
"capabilities": "Capacidades",
"capabilities": "Funciones",
"cliApps": "Aplicaciones CLI",
"mcp": "Servicios MCP",
"apps": "Aplicaciones",
"nativeHost": "Host nativo",
"nativeHost": "Aplicación de escritorio",
"hostSafety": "Seguridad de la app",
"voiceInput": "Entrada de voz"
},
@@ -132,28 +215,27 @@
"provider": "Proveedor",
"model": "Modelo",
"restart": "Reiniciar nanobot",
"configPath": "Ruta de configuración",
"configPath": "Archivo de configuración",
"activePreset": "Preajuste activo",
"gateway": "Pasarela",
"restartState": "Estado de reinicio",
"pendingChanges": "Cambios pendientes",
"selectedPreset": "Preajuste seleccionado",
"presetModel": "Modelo del preajuste",
"density": "Densidad",
"activityMode": "Detalle de actividad",
"fileEditDisplay": "Vista de edición de archivos",
"codeWrap": "Ajuste de código",
"codeWrap": "Ajuste de línea del código",
"maxResults": "Resultados máximos",
"timeout": "Tiempo de espera",
"jinaReader": "Lector Jina",
"imageGeneration": "Generación de imágenes",
"imageProvider": "Proveedor de imágenes",
"imageProviderStatus": "Estado del proveedor",
"imageProviderBase": "Base del proveedor",
"imageProviderBase": "URL base del proveedor",
"imageModel": "Modelo de imagen",
"defaultAspectRatio": "Proporción predeterminada",
"defaultImageSize": "Tamaño predeterminado",
"maxImagesPerTurn": "Máx. imágenes por turno",
"maxImagesPerTurn": "Máx. imágenes por solicitud",
"imageSaveDir": "Directorio de guardado",
"timezone": "Zona horaria",
"workspacePath": "Espacio de trabajo predeterminado",
@@ -180,44 +262,43 @@
"language": "Elige el idioma usado por WebUI.",
"provider": "Selecciona el proveedor para nuevas solicitudes de modelo.",
"model": "Elige el modelo que usa este preajuste.",
"configPath": "Archivo de configuración que usa actualmente el gateway.",
"selectedPreset": "Los preajustes con nombre son de solo lectura aquí; edítalos en config.json.",
"presetModel": "Cambia a Predeterminado para editar el modelo y el proveedor desde WebUI.",
"density": "Solo se guarda en este navegador.",
"configPath": "Archivo de configuración que usa actualmente la pasarela.",
"selectedPreset": "Gestiona los preajustes en la sección Modelos.",
"presetModel": "Cambia el proveedor y el modelo en la sección Modelos.",
"activityMode": "Elige cuánto detalle de actividad del agente se muestra por defecto.",
"fileEditDisplay": "Elige si la actividad de edición muestra recuentos de líneas o diferencias.",
"codeWrap": "Mantiene legibles las líneas largas de código en pantallas pequeñas.",
"maxResults": "Resultados devueltos por cada llamada web_search.",
"maxResults": "Número máximo de resultados por búsqueda web.",
"timeout": "Segundos antes de que una solicitud de búsqueda expire.",
"jinaReader": "Usa Jina Reader para web_fetch cuando esté disponible.",
"imageGeneration": "Expone generate_image en chats cuando hay un proveedor de imagen configurado.",
"imageProvider": "Elige el proveedor registrado usado por generate_image.",
"jinaReader": "Usa Jina Reader para leer páginas web cuando esté disponible.",
"imageGeneration": "Permite que el agente genere imágenes en el chat cuando hay un proveedor configurado.",
"imageProvider": "Elige el proveedor que se usará para generar imágenes.",
"imageProviderStatus": "La generación de imágenes reutiliza las credenciales de los proveedores.",
"imageModel": "Nombre del modelo enviado al proveedor de imágenes seleccionado.",
"defaultAspectRatio": "Se usa cuando la instrucción no elige una proporción.",
"defaultImageSize": "Pista de tamaño enviada a proveedores compatibles.",
"maxImagesPerTurn": "Límite superior para una solicitud generate_image.",
"timezone": "Se usa para horarios y respuestas con conciencia temporal.",
"defaultAspectRatio": "Se usa si la solicitud no especifica las proporciones de la imagen.",
"defaultImageSize": "Tamaño de imagen que se solicita a los proveedores compatibles.",
"maxImagesPerTurn": "Número máximo de imágenes que se generan por solicitud.",
"timezone": "Se usa en las tareas programadas y en las respuestas que dependen de la fecha o la hora.",
"localServiceAccess": "Permite que los comandos shell con acceso completo alcancen servicios locales.",
"webuiDefaultAccess": "Usado por chats web sin permiso específico de proyecto.",
"securityManagedControls": "Las capturas web siempre protegen servicios locales, privados y metadata. La seguridad de canales core se gestiona en config.json.",
"securityManagedControls": "Las herramientas web bloquean el acceso a servicios locales, redes privadas y servicios de metadatos, salvo que se permita de forma explícita. Los demás ajustes de seguridad de los canales se gestionan en config.json.",
"currentModel": "Se usa para nuevas respuestas.",
"selectedModelProvider": "Definido por el modelo seleccionado.",
"selectedModelValue": "Definido por el modelo seleccionado.",
"brandLogos": "Muestra logos de proveedores de terceros y CLI en Ajustes.",
"browserNotifications": "Notifica solo cuando esta página está en segundo plano. Desactivado de forma predeterminada.",
"cliAppsCatalog": "Instala solo adaptadores CLI de aplicaciones que nanobot puede ejecutar localmente; las aplicaciones nativas no se modifican.",
"cliAppsCatalog": "Instala las herramientas de línea de comandos que nanobot puede usar en este equipo. Las aplicaciones de escritorio no se modifican.",
"cliAppsFilter": "Busca por aplicación, categoría o capacidad.",
"logs": "Abre la carpeta de registros del motor nativo.",
"diagnostics": "Exporta un pequeño informe del tiempo de ejecución para soporte.",
"logs": "Abre la carpeta de registros de la aplicación de escritorio.",
"diagnostics": "Exporta un informe de diagnóstico para el equipo de soporte.",
"localServiceAccessNative": "Permite que los comandos shell con acceso completo alcancen servicios en este Mac.",
"webuiDefaultAccessNative": "Usado por chats nativos sin permiso específico de proyecto.",
"contextWindow": "Elige el presupuesto de contexto predeterminado para esta configuración de modelo.",
"contextWindow": "Elige el límite de contexto predeterminado para esta configuración de modelo.",
"transcription": "Transcribe la entrada del micrófono antes de enviarla. Los mensajes de voz de los canales usan la misma configuración.",
"transcriptionProvider": "Usa las credenciales del proveedor correspondiente en la sección Proveedores.",
"transcriptionProviderStatus": "Las claves API permanecen en los proveedores, no en la configuración de transcripción.",
"transcriptionModel": "Déjalo como el valor predeterminado resuelto, salvo que el proveedor necesite un identificador de modelo personalizado.",
"transcriptionLanguage": "Pista ISO-639 opcional, como en, zh, ja o ko."
"transcriptionModel": "Usa el modelo predeterminado, salvo que el proveedor requiera un ID de modelo específico.",
"transcriptionLanguage": "Código de idioma ISO-639 opcional, como en, zh, ja o ko. Déjalo vacío para detectar el idioma automáticamente."
},
"values": {
"light": "Claro",
@@ -230,14 +311,12 @@
"privateEngine": "Motor privado",
"unixSocket": "Socket Unix",
"defaultWorkspace": "Espacio predeterminado",
"comfortable": "Cómodo",
"compact": "Compacto",
"auto": "Automático",
"expanded": "Expandido",
"default": "Predeterminado",
"summary": "Resumen",
"diff": "Diferencias",
"collapsedDiff": "Diff contraído",
"collapsedDiff": "Diferencias contraídas",
"on": "Activado",
"off": "Desactivado",
"defaultPermission": "Permiso predeterminado",
@@ -255,13 +334,13 @@
"loadError": "No se pudieron cargar los ajustes",
"unsaved": "Cambios sin guardar.",
"upToDate": "Actualizado.",
"savedRestart": "Guardado. Reinicia nanobot para aplicar.",
"savedRestart": "Guardado. Reinicia nanobot para aplicar los cambios.",
"restartAfterSaving": "Guarda los cambios y reinicia cuando puedas.",
"savedRestartApply": "Guardado. Reinicia cuando puedas.",
"imageProviderRestart": "Cambios del proveedor de imagen guardados. Reinicia cuando puedas.",
"savedRestartApply": "Guardado. Reinicia nanobot para aplicar los cambios.",
"imageProviderRestart": "Proveedor de imágenes guardado. Reinicia nanobot para aplicar los cambios.",
"hostRestartAfterSaving": "Al guardar, nanobot reiniciará su motor.",
"hostRestartPending": "Guardado. El motor se reiniciará cuando esté listo.",
"hostApiUnavailable": "Las acciones del host solo están disponibles en la app nativa.",
"hostApiUnavailable": "Estas acciones solo están disponibles en la aplicación de escritorio.",
"logsOpened": "Carpeta de registros abierta.",
"logsOpenFailed": "No se pudo abrir la carpeta de registros.",
"diagnosticsExported": "Diagnóstico exportado a {{path}}.",
@@ -291,17 +370,17 @@
"showMore": "Mostrar {{count}} más",
"showLess": "Mostrar menos",
"apiKey": "Clave API",
"apiBase": "Base de la API",
"apiBase": "URL base de la API",
"apiKeyPlaceholder": "Introduce la clave API",
"apiKeyConfiguredPlaceholder": "Déjalo vacío para conservar la clave actual",
"configuredKeyHint": "Key configurada",
"configuredKeyHint": "Clave configurada",
"apiBasePlaceholder": "Usar el valor predeterminado del proveedor",
"apiKeyRequired": "Se requiere una clave API para configurar este proveedor.",
"showApiKey": "Mostrar clave API",
"hideApiKey": "Ocultar clave API",
"noConfiguredProviders": "No hay proveedores configurados",
"configureFirst": "Configura primero un proveedor en BYOK.",
"openByok": "Abrir BYOK",
"configureFirst": "Configura primero un proveedor en la sección Proveedores.",
"openByok": "Configurar proveedor",
"tabs": {
"ariaLabel": "Tipo de credencial BYOK",
"llm": "LLM",
@@ -309,12 +388,12 @@
},
"webSearch": {
"provider": "Proveedor de búsqueda",
"providerHelp": "Elige el backend que usará la herramienta de búsqueda web.",
"providerHelp": "Elige el servicio que se usará para buscar en la web.",
"selectProvider": "Seleccionar proveedor",
"credentials": "Credenciales",
"noCredentialRequired": "No requiere clave",
"noCredentialHelp": "DuckDuckGo funciona sin guardar una API key.",
"apiKeyHelp": "Se guarda en config y se muestra enmascarada después de guardar.",
"noCredentialHelp": "DuckDuckGo funciona sin una clave API.",
"apiKeyHelp": "Se guarda en la configuración y se oculta después de guardar.",
"baseUrl": "URL base",
"baseUrlHelp": "SearXNG necesita la URL de tu propia instancia.",
"baseUrlPlaceholder": "https://search.example.com",
@@ -337,6 +416,30 @@
"usage": {
"title": "Actividad de tokens",
"shortTitle": "Uso de tokens",
"last30Days": "Últimos 30 días",
"viewDetails": "Ver detalles",
"previousPage": "Página anterior",
"nextPage": "Página siguiente",
"dailyAverage": "Promedio diario",
"inputTokens": "Tokens de entrada",
"cacheHitRate": "Tasa de aciertos de caché",
"requestTrend": "Solicitudes diarias",
"cacheRateHelp": "La tasa excluye las entradas cuyo estado de caché se desconoce.",
"dailyTrend": "Uso diario de tokens",
"systemHelp": "Incluye la generación de títulos de chat, otras tareas internas y llamadas sin un origen registrado.",
"bySource": "Uso por origen",
"byModel": "Uso por modelo",
"modelTrend": "Tendencia de uso por modelo",
"modelsUnavailable": "Sin desglose por modelo.",
"otherModels": "Otros / sin atribuir",
"unclassified": "Sin clasificar",
"unavailable": "Los datos de uso no están disponibles.",
"noActivity": "Sin uso de tokens en los últimos 30 días.",
"cachedInput": "Entrada en caché",
"cacheMiss": "Entrada sin caché",
"cacheUnknown": "Estado de caché desconocido",
"outputTokens": "Salida",
"otherTokens": "Otros tokens",
"subtitle": "Uso reportado por el proveedor durante los últimos 12 meses.",
"empty": "La actividad de tokens aparecerá después de nuevas respuestas del modelo.",
"totalTokens": "Tokens totales",
@@ -355,8 +458,8 @@
"user": "Chat",
"api": "API",
"cron": "Automatizaciones",
"dream": "Memoria",
"system": "Sistema"
"dream": "Consolidación de memoria",
"system": "Llamadas auxiliares"
}
},
"providers": {
@@ -372,11 +475,11 @@
"saveAdvancedBeforeSignIn": "Guarda los cambios avanzados antes de iniciar sesión.",
"apiType": "Tipo de API",
"proxy": "Proxy de red",
"thinkingStyle": "Estilo de razonamiento",
"thinkingStyle": "Formato de los parámetros de razonamiento",
"region": "Región",
"profile": "Perfil",
"profile": "Perfil de AWS",
"extraHeaders": "Cabeceras adicionales",
"extraBody": "Cuerpo adicional",
"extraBody": "Campos adicionales del cuerpo de la solicitud",
"extraQuery": "Parámetros de consulta adicionales",
"capabilityFastMode": "Modo rápido",
"capabilityFastModeHelp": "Usa el nivel de servicio prioritario de OpenAI para responder más rápido. Esto consume créditos más deprisa.",
@@ -398,17 +501,17 @@
"missingCredential": "Configura este proveedor antes de activar la generación de imágenes."
},
"capabilities": {
"providerSupport": "Compatibilidad del proveedor",
"providerInstallOnSave": "La compatibilidad necesaria se instalará automáticamente al guardar este proveedor.",
"searchSupport": "Compatibilidad del proveedor de búsqueda",
"searchInstallOnSave": "La compatibilidad con Olostep se instalará automáticamente al guardar.",
"installing": "Instalando compatibilidad..."
"providerSupport": "Dependencias del proveedor",
"providerInstallOnSave": "Las dependencias necesarias se instalarán automáticamente al guardar este proveedor.",
"searchSupport": "Dependencias del servicio de búsqueda",
"searchInstallOnSave": "Las dependencias de Olostep se instalarán automáticamente al guardar.",
"installing": "Instalando dependencias…"
},
"models": {
"selectModel": "Seleccionar modelo",
"addConfiguration": "Agregar configuración",
"newConfiguration": "Nueva configuración de modelo",
"newConfigurationHelp": "Guarda un proveedor y modelo como opción de un clic.",
"newConfigurationHelp": "Guarda un proveedor y un modelo para seleccionarlos rápidamente.",
"configurationName": "Nombre de configuración",
"configurationNameHelp": "Renombra esta configuración de modelo guardada.",
"configurationNamePlaceholder": "Escritura rápida",
@@ -441,21 +544,22 @@
"disabled": "Desactivado",
"noPresets": "Aún no hay preajustes de modelo",
"noPresetsHelp": "Crea un preajuste y añádelo al orden de llamada.",
"removeBeforeDelete": "Quita este preajuste del orden de llamada antes de eliminarlo.",
"removeBeforeDelete": "Elige otro preajuste principal antes de eliminar este.",
"providerSetupRequired": "El proveedor requiere configuración",
"configureProviderBeforeSaving": "Configura este proveedor antes de guardar el preajuste.",
"deletePresetTitle": "¿Eliminar el preajuste de modelo?",
"deletePresetHelp": "Se eliminará el preajuste «{{name}}». Las credenciales del proveedor no cambiarán.",
"deletePresetHelp": "Se eliminará el preajuste «{{name}}» y se quitará del orden de llamada. Las credenciales del proveedor se conservarán.",
"searchModels": "Buscar o escribir ID de modelo",
"useCustomModel": "Usar",
"loadingModels": "Cargando modelos...",
"searchCatalog": "Busca el catálogo del proveedor para elegir un modelo.",
"searchCatalog": "Busca un modelo en el catálogo del proveedor.",
"availableCount": "Modelos disponibles: {{count}}",
"modelsAvailable": "disponibles",
"noModelResults": "No hay modelos coincidentes.",
"loadFailed": "Lista de modelos no disponible.",
"unsupportedModelList": "Escribe un ID de modelo manualmente.",
"providerNotConfigured": "Configura este proveedor antes de cargar modelos.",
"autoProviderCustomOnly": "El modo de proveedor automático usa IDs de modelo personalizados."
"autoProviderCustomOnly": "Introduce un ID de modelo para usar la selección automática del proveedor."
},
"timezone": {
"select": "Seleccionar zona horaria",
@@ -464,13 +568,17 @@
},
"cliApps": {
"allCategories": "Todas las categorías",
"availableCount_one": "{{count}} aplicación",
"availableCount_other": "{{count}} aplicaciones",
"availableCount": "{{count}} aplicaciones",
"installedCount_one": "{{count}} herramienta CLI instalada",
"installedCount_other": "{{count}} herramientas CLI instaladas",
"installedCount": "{{count}} instaladas",
"summary": "{{installed}} de {{total}} CLIs instaladas",
"summary": "{{installed}} de {{total}} herramientas CLI instaladas",
"filterAll": "Todas",
"filterInstalled": "CLIs instaladas",
"filterInstalled": "Herramientas CLI instaladas",
"filterNotInstalled": "No instaladas",
"searchPlaceholder": "Buscar CLIs",
"searchPlaceholder": "Buscar herramientas CLI",
"statusInstalled": "Instalada",
"statusAvailable": "Disponible",
"statusMissing": "Falta dependencia",
@@ -481,7 +589,7 @@
"empty": "Ninguna aplicación CLI coincide con este filtro.",
"readyTitle": "@{{name}} está listo",
"readyStatus": "Listo",
"readyPrompt": "Usa @{{name}} para ver qué puede hacer este CLI.",
"readyPrompt": "Usa @{{name}} para descubrir qué puedes hacer con esta herramienta.",
"readyTry": "Probar @{{name}}",
"readyCopied": "Copiado",
"openChat": "Abrir chat",
@@ -494,6 +602,9 @@
"noDescription": "Sin descripción disponible."
},
"about": {
"documentation": "Documentación",
"sourceCode": "Código fuente",
"reportIssue": "Informar de un problema",
"version": "Versión",
"checking": "Buscando actualizaciones...",
"checkForUpdates": "Buscar actualizaciones",
@@ -518,24 +629,26 @@
"transport": "Transporte",
"authentication": "Autenticación",
"authNone": "Ninguna",
"authHeaders": "Encabezados",
"authHeaders": "Cabeceras",
"command": "Comando",
"args": "Argumentos JSON",
"headers": "Encabezados JSON",
"args": "Argumentos (JSON)",
"headers": "Cabeceras (JSON)",
"oauthAfterSave": "Guarda el servidor y selecciona Conectar para iniciar sesión.",
"headersHelp": "Añade los encabezados de solicitud que utiliza este servidor.",
"env": "Entorno JSON",
"timeout": "Tiempo límite de herramienta",
"headersHelp": "Añade las cabeceras de solicitud que utiliza este servidor.",
"env": "Variables de entorno (JSON)",
"timeout": "Tiempo límite de las herramientas (segundos)",
"advancedOptions": "Opciones avanzadas",
"hideAdvanced": "Ocultar avanzado",
"saveCustom": "Guardar MCP",
"hideAdvanced": "Ocultar opciones avanzadas",
"saveCustom": "Guardar servidor",
"configImport": "Importar mcp.json",
"importConfig": "Importar",
"restartRequired": "Reinicia nanobot para conectar las herramientas MCP actualizadas.",
"toolsFound_one": "{{count}} herramienta",
"toolsFound_other": "{{count}} herramientas",
"toolsFound": "{{count}} herramientas",
"loading": "Cargando preajustes MCP...",
"empty": "Ningún preajuste MCP coincide con este filtro.",
"openDocs": "Abrir docs",
"openDocs": "Abrir documentación",
"test": "Probar",
"remove": "Eliminar",
"enable": "Habilitar",
@@ -596,14 +709,14 @@
"toolScope": "Herramientas",
"allTools": "Activar todas",
"noTools": "Desactivar todas",
"reloadTools": "Recargar herramientas",
"reloadTools": "Actualizar lista de herramientas",
"presetDescriptions": {
"browserbase": "Automatiza navegadores en la nube con Browserbase.",
"playwright": "Inspecciona y automatiza navegadores locales con Playwright.",
"context7": "Obtén documentación actual y ejemplos de código.",
"firecrawl": "Rastrea, busca y extrae contenido web.",
"parallel-search": "Busca en la web y lee páginas relevantes.",
"exa": "Busca en la web y extrae contenido limpio.",
"exa": "Busca en la web y extrae el contenido de las páginas.",
"microsoft-learn": "Busca y lee documentación de Microsoft Learn.",
"aws-docs": "Busca documentación y guías de servicios de AWS.",
"brave-search": "Busca web, noticias, imágenes, vídeos y resultados locales con Brave Search.",
@@ -624,11 +737,11 @@
"localHelp": "Solo este dispositivo puede conectarse.", "networkHelp": "Otros dispositivos pueden conectarse; se requiere una clave API.",
"port": "Puerto", "portHelp": "La API usa este puerto local.", "apiKey": "Clave API",
"apiKeyHelp": "Los clientes la envían como token Bearer.", "apiKeyRequired": "Obligatoria antes de exponer la API en la red.",
"apiKeyPlaceholder": "Introduce una clave API", "autoInstall": "El soporte API se instalará automáticamente al iniciarlo."
"apiKeyPlaceholder": "Introduce una clave API", "autoInstall": "Las dependencias del servidor API se instalarán automáticamente al iniciarlo."
},
"observability": {
"title": "Observabilidad", "configured": "Las credenciales de trazas están disponibles para nanobot.",
"environment": "Configura LANGFUSE_SECRET_KEY y LANGFUSE_PUBLIC_KEY y reinicia nanobot.", "enable": "Habilitar soporte de trazas"
"environment": "Configura LANGFUSE_SECRET_KEY y LANGFUSE_PUBLIC_KEY y reinicia nanobot.", "enable": "Activar trazas"
},
"legal": {
"thirdPartyBrands": "Los nombres, logotipos y marcas de productos pertenecen a sus respectivos propietarios. Su uso es solo identificativo y no implica respaldo."
@@ -639,11 +752,11 @@
"mcpLabel": "MCP",
"channelLabel": "Canal",
"featureLabel": "Función",
"filterAll": "Listo",
"filterAll": "Disponibles",
"filterPlugins": "Complementos",
"filterCli": "Aplicaciones",
"filterMcp": "MCP",
"enabledSummary": "{{count}} listos",
"enabledSummary": "{{count}} disponibles",
"caption": "{{cli}} aplicaciones · {{mcp}} herramientas MCP",
"searchPlaceholder": "Buscar aplicaciones",
"featured": "Herramientas",
@@ -660,8 +773,8 @@
"restartRequired": "Reinicia nanobot para aplicar las aplicaciones y herramientas MCP actualizadas."
},
"channels": {
"description": "Conecta nanobot con aplicaciones de chat. Instalar el soporte solo añade el paquete de integración; la mayoría de canales aún necesitan tokens o configuración del espacio de trabajo.",
"caption": "{{enabled}} activados · {{total}} canales",
"description": "Conecta nanobot con tus aplicaciones de chat. Después de instalar las dependencias, configura las credenciales y los ajustes de cada plataforma.",
"caption": "{{enabled}} en ejecución · {{total}} canales",
"searchPlaceholder": "Buscar canales",
"backToChannels": "Todos los canales",
"catalog": "Canales",
@@ -671,7 +784,7 @@
"requires": "Requiere: {{requirements}}",
"setUp": "Configurar",
"setupGuide": "Guía de configuración",
"setupSummary": "Activar solo habilita el soporte en nanobot. Añade las credenciales de la plataforma y reinicia nanobot.",
"setupSummary": "Activa el canal, añade las credenciales de la plataforma y reinicia nanobot.",
"configKeys": "Claves de configuración",
"enable": "Activar canal",
"disable": "Desactivar canal",
@@ -688,12 +801,14 @@
"checkOnly": "Solo comprobar",
"commandCopied": "Comando copiado.",
"commandCopyFailed": "No se pudo copiar el comando.",
"configuredInstances_one": "{{count}} instancia configurada",
"configuredInstances_other": "{{count}} instancias configuradas",
"configuredInstances": "{{count}} instancias configuradas",
"connectPreview": "El siguiente paso es la conexión en el navegador. Por ahora, ejecuta el comando siguiente.",
"copyCommand": "Copiar comando",
"filterAll": "Todos",
"filterOff": "Desactivados",
"filterOn": "Activados",
"filterOff": "Detenidos",
"filterOn": "En ejecución",
"helperCopied": "{{name}} copiado.",
"helperCopyFailed": "No se pudo copiar {{name}}.",
"hideSecret": "Ocultar secreto",
@@ -714,8 +829,8 @@
"selectChannel": "Ver la configuración de {{name}}",
"setupSteps": "Siguientes pasos",
"showSecret": "Mostrar secreto",
"toggleChannel": "Canal {{name}}",
"toggleInstance": "Instancia {{name}}",
"toggleChannel": "Activar {{name}}",
"toggleInstance": "Activar la instancia {{name}}",
"tryIt": "Pruébalo",
"validationFailed": "Comprueba la configuración requerida antes de activar.",
"validation": {
@@ -731,10 +846,10 @@
"enable": "Activar",
"disable": "Desactivar",
"ready": "Listo",
"missingDependency": "Falta soporte",
"installSupport": "Instalar soporte",
"installConfirmTitle": "¿Instalar soporte para {{name}}?",
"installConfirmDescription": "nanobot añadirá lo que {{name}} necesita y luego lo activará. ¿Continuar?",
"missingDependency": "Faltan dependencias",
"installSupport": "Instalar dependencias",
"installConfirmTitle": "¿Instalar las dependencias de {{name}}?",
"installConfirmDescription": "nanobot instalará las dependencias necesarias y activará {{name}}.",
"installConfirmAction": "Instalar y activar",
"websocketRequired": "Requerido para WebUI",
"channelDisabled": "El canal está desactivado",
@@ -783,7 +898,7 @@
"commandCopied": "Copiado",
"copyCommand": "Copiar",
"deleteTitle": "Eliminar automatización",
"deleteDescription": "Esto elimina {{name}} del almacén cron. Los mensajes de chat anteriores permanecen en la sesión.",
"deleteDescription": "Se eliminará la automatización «{{name}}». Los mensajes anteriores se conservarán en el chat.",
"cancel": "Cancelar",
"status": {
"system": "Sistema",
@@ -821,10 +936,10 @@
"cron": "Cron {{expr}}",
"cronWithTz": "Cron {{expr}} · {{tz}}",
"withTz": "{{summary}} · {{tz}}",
"dailyAt": "Diaria a las {{time}}",
"weekdaysAt": "Días laborables a las {{time}}",
"hourlyAt": "Cada hora en :{{minute}}",
"hourlyWindow": "Cada hora {{start}}-{{end}} en :{{minute}}",
"dailyAt": "Todos los días a las {{time}}",
"weekdaysAt": "De lunes a viernes a las {{time}}",
"hourlyAt": "Cada hora, en el minuto {{minute}}",
"hourlyWindow": "Cada hora de {{start}} a {{end}}, en el minuto {{minute}}",
"local": "Activador local",
"custom": "Programación personalizada"
},
@@ -876,7 +991,7 @@
"signInAgain": "Iniciar sesión de nuevo",
"signOut": "Cerrar sesión",
"signedInAs": "Sesión iniciada como {{account}}",
"signInHelp": "Inicia sesión desde este dispositivo; no se guarda API key en config.",
"signInHelp": "Inicia sesión desde este dispositivo. No se guarda ninguna clave API en la configuración.",
"remoteSignInHelp": "Selecciona Iniciar sesión para abrir xAI en tu computadora y luego pega el código de autorización que se muestra tras iniciar sesión.",
"codexRemoteSignInHelp": "Inicia sesión en este navegador y pega en nanobot la URL completa de devolución de localhost.",
"signInRequired": "Inicio de sesión requerido",
@@ -899,7 +1014,7 @@
"finishSignIn": "Completar inicio de sesión"
},
"skills": {
"description": "Revisa las habilidades de instrucciones que este agente puede cargar durante una conversación.",
"description": "Gestiona las habilidades que el agente puede usar durante una conversación.",
"caption": "{{available}} disponibles · {{total}} en total",
"views": "Vistas de habilidades",
"installedTab": "Instaladas",
@@ -918,7 +1033,7 @@
"showLess": "Mostrar menos",
"showMore": "Mostrar más",
"enabledControl": "Usar esta habilidad",
"enabledDescription": "Permite que el agente cargue esta habilidad cuando sus requisitos estén listos.",
"enabledDescription": "Permite que el agente use esta habilidad cuando se cumplan sus requisitos.",
"enableSkill": "Activar {{name}}",
"disableSkill": "Desactivar {{name}}",
"updateFailed": "No se pudo actualizar esta habilidad.",
@@ -934,7 +1049,7 @@
"setupDescription": "Instala la dependencia que falta en el equipo donde se ejecuta nanobot y vuelve a comprobarlo.",
"copySetupCommand": "Copiar comando de configuración",
"checkAgain": "Comprobar de nuevo",
"marketplaceSearchFailed": "No se pudieron buscar los mercados de habilidades.",
"marketplaceSearchFailed": "No se pudo buscar en los catálogos de habilidades.",
"marketplaceInstallFailed": "No se pudo instalar esta habilidad.",
"marketplaceSearchPlaceholder": "Buscar habilidades",
"marketplaceSearchLabel": "Buscar habilidades",
@@ -955,14 +1070,14 @@
"marketplaceInstalls": "{{formattedCount}} instalaciones",
"marketplaceNpxRequired": "Se requiere Node.js con npx",
"marketplaceInstalling": "Instalando",
"marketplaceInstalled": "Instalado",
"marketplaceInstalled": "Instalada",
"marketplaceInstall": "Instalar",
"marketplaceNoTrend": "Sin tendencia todavía",
"marketplaceTrendLabel": "Tendencia de instalaciones de 8 semanas",
"featured": "Habilidades del agente",
"empty": "No hay habilidades disponibles.",
"sourceWorkspace": "Personalizada",
"sourceBuiltin": "Integradas",
"sourceBuiltin": "Integrada",
"statusAvailable": "Disponible",
"statusUnavailable": "No disponible",
"unavailableReason": "Falta: {{reason}}",
@@ -976,11 +1091,11 @@
"noRequirements": "Sin requisitos explícitos.",
"commands": "Comandos",
"environment": "Variables de entorno",
"missingCommands": "Falta CLI",
"missingEnvironment": "Falta ENV",
"missingCommands": "Faltan herramientas de línea de comandos",
"missingEnvironment": "Faltan variables de entorno",
"unavailableReasonLabel": "Motivo de indisponibilidad",
"rawInstructions": "SKILL.md original",
"rawInstructionsEmpty": "No hay instrucciones originales.",
"rawInstructions": "Contenido de SKILL.md",
"rawInstructionsEmpty": "No hay instrucciones disponibles.",
"detailDescription": "Detalles de {{name}}."
},
"voice": {
+201 -86
View File
@@ -25,6 +25,7 @@
"system": {
"section": "Système",
"restartHint": "Redémarrez nanobot pour appliquer les changements d’exécution.",
"restartAction": "Redémarrer",
"restart": "Redémarrer nanobot",
"restarting": "Redémarrage...",
"restartEngine": "Redémarrer le moteur",
@@ -60,6 +61,7 @@
"closeAction": "Fermer la discussion temporaire : {{title}}"
},
"sidebar": {
"resize": "Redimensionner la barre latérale",
"navigation": "Navigation de la barre latérale",
"collapse": "Réduire la barre latérale",
"newChat": "Nouveau sujet",
@@ -80,12 +82,92 @@
}
},
"settings": {
"timezoneNoMatches": "Aucun fuseau horaire correspondant.",
"configure": "Configurer",
"exit": {
"title": "Redémarrer nanobot avant de quitter les réglages ?",
"description": "Vos modifications sont enregistrées. Redémarrez pour les appliquer.",
"later": "Redémarrer plus tard"
},
"runtimeConfig": {
"apiSaved": "Enregistré. Redémarrez le service API pour appliquer les modifications.",
"fields": {
"agents_defaults_timezone_mode": {"label": "Utiliser le fuseau horaire du système", "help": "Désactivez pour choisir le fuseau horaire manuellement."},
"agents_defaults_timezone": {"label": "Fuseau horaire", "help": "Choisissez un fuseau horaire. Le décalage UTC correspond à la date actuelle."},
"agents_defaults_dream_enabled": {"label": "Consolidation de la mémoire", "help": "Organise les informations utiles des conversations. La mémoire existante reste disponible après désactivation."},
"gateway_heartbeat_enabled": {"label": "Vérification périodique", "help": "Recherche régulièrement des tâches dans HEARTBEAT.md."},
"gateway_heartbeat_interval_s": {"label": "Intervalle de vérification (secondes)", "help": "La passerelle programme les vérifications à son démarrage."},
"agents_defaults_max_tool_iterations": {"label": "Itérations des outils par tour", "help": "Nombre maximal d’échanges entre le modèle et les outils par tour."},
"agents_defaults_max_concurrent_subagents": {"label": "Sous-agents simultanés", "help": "Nombre maximal de sous-agents exécutés en parallèle."},
"agents_defaults_max_tool_result_chars": {"label": "Longueur des résultats des outils (caractères)", "help": "Limite la sortie des outils incluse dans le contexte du modèle."},
"agents_defaults_provider_retry_mode": {"label": "Réessayer les requêtes en continu", "help": "Relance les requêtes après une erreur temporaire du modèle. Désactivez cette option pour limiter le nombre de tentatives."},
"agents_defaults_tool_hint_max_length": {"label": "Longueur des indications des outils (caractères)", "help": "Longueur maximale des brèves indications d’activité."},
"tools_max_session_messages_per_minute": {"label": "Messages des outils par minute", "help": "Limite la fréquence des messages envoyés par les outils dans une conversation."},
"agents_defaults_unified_session": {"label": "Partager les conversations entre plateformes", "help": "Utilise une même conversation pour un utilisateur sur plusieurs plateformes."},
"tools_exec_enable": {"label": "Outil shell", "help": "Autorise l’agent à exécuter des commandes shell."},
"tools_file_enable": {"label": "Outils de fichiers", "help": "Autorise les outils intégrés de lecture et de modification de fichiers."},
"tools_web_enable": {"label": "Outils web", "help": "Autorise la recherche et la récupération de pages web."},
"tools_cli_apps_enable": {"label": "Applications en ligne de commande", "help": "Autorise l’agent à gérer et à exécuter ces applications."},
"tools_my_enable": {"label": "Outil d’autogestion", "help": "Autorise l’agent à consulter sa configuration."},
"tools_my_allow_set": {"label": "Modification de la configuration par l’agent", "help": "Autorise l’outil d’autogestion à modifier la configuration."},
"tools_exec_timeout": {"label": "Délai des commandes (secondes)", "help": "Durée maximale d’une commande shell. 0 signifie aucune limite."},
"tools_exec_path_prepend": {"label": "Chemins prioritaires", "help": "Dossiers à placer au début de PATH. Séparez-les par un point-virgule sous Windows ou par deux-points sous macOS et Linux."},
"tools_exec_path_append": {"label": "Chemins supplémentaires", "help": "Dossiers à placer à la fin de PATH. Séparez-les par un point-virgule sous Windows ou par deux-points sous macOS et Linux."},
"tools_exec_sandbox": {"label": "Bac à sable des commandes", "help": "Utilisez bwrap sous Linux ou Seatbelt sous macOS. Les contrôles de l’espace de travail seuls n’isolent pas les processus."},
"tools_exec_sandbox_ro_binds": {"label": "Chemins en lecture seule", "help": "Montages supplémentaires en lecture seule, un par ligne."},
"tools_exec_sandbox_rw_binds": {"label": "Chemins accessibles en écriture", "help": "Montages supplémentaires accessibles en écriture, un par ligne."},
"tools_exec_allowed_env_keys": {"label": "Variables d’environnement autorisées", "help": "Variables supplémentaires à transmettre aux commandes, une par ligne. Les variables nécessaires au fonctionnement restent disponibles."},
"tools_exec_allow_patterns": {"label": "Règles de commandes autorisées", "help": "Une expression régulière par ligne. Si cette liste est renseignée, chaque segment de commande doit correspondre entièrement à une règle. Les commandes autorisées échappent aux règles de blocage intégrées et personnalisées, mais restent soumises aux restrictions réseau et d’espace de travail."},
"tools_exec_deny_patterns": {"label": "Règles de commandes interdites", "help": "Expressions régulières de blocage supplémentaires, une par ligne. Les règles d’autorisation explicites ont priorité sur ces règles et sur les protections intégrées."},
"tools_web_proxy": {"label": "Proxy web", "help": "URL du proxy des outils web. Laissez vide pour utiliser le réseau par défaut."},
"tools_web_user_agent": {"label": "En-tête User-Agent", "help": "En-tête User-Agent personnalisé. Laissez vide pour utiliser la valeur par défaut."},
"tools_restrict_to_workspace": {"label": "Limiter les outils à l’espace de travail", "help": "Règle globale des outils. Les autorisations de chaque conversation WebUI sont distinctes."},
"tools_ssrf_whitelist": {"label": "Plages réseau privées autorisées", "help": "Adresses IP ou plages CIDR exemptées de la protection des requêtes sortantes, une par ligne."},
"tools_webui_allow_remote_package_install": {"label": "Installation de paquets à distance", "help": "Autorise l’installation de paquets et de compétences depuis une WebUI distante. Ce réglage doit être modifié sur la machine qui exécute la passerelle."},
"tools_cli_apps_install_timeout": {"label": "Délai d’installation (secondes)", "help": "Durée maximale d’installation d’une application en ligne de commande."},
"tools_cli_apps_run_timeout": {"label": "Délai d’exécution (secondes)", "help": "Durée maximale d’exécution d’une commande d’application."},
"tools_cli_apps_catalog_ttl_seconds": {"label": "Durée du cache du catalogue (secondes)", "help": "Durée de conservation du catalogue des applications en cache."},
"gateway_host": {"label": "Adresse d’écoute de la passerelle", "help": "Adresse d’écoute de la passerelle. L’adresse de WebSocket et de la WebUI se règle dans Canaux → WebSocket."},
"gateway_port": {"label": "Port de la passerelle", "help": "Port enregistré. Les arguments de ligne de commande ont priorité."},
"gateway_restart_mode": {"label": "Mode de redémarrage", "help": "Mode de redémarrage du processus. Le mode automatique dépend de l’environnement hôte."},
"api_host": {"label": "Adresse d’écoute de l’API", "help": "Une clé API est requise pour écouter sur une adresse autre que localhost. Configurez-la dans Système, puis redémarrez le service API pour appliquer les modifications."},
"api_timeout": {"label": "Délai des requêtes API (secondes)", "help": "Durée maximale des requêtes. Redémarrez le service API pour appliquer les modifications."},
"tools_image_generation_save_dir": {"label": "Dossier des images générées", "help": "Chemin relatif sous le dossier multimédia de nanobot. Les images existantes ne sont pas déplacées."}
},
"groups": {
"chat": {"title": "Autorisations des conversations WebUI", "help": "Accès aux services locaux et autorisations par défaut des conversations WebUI."},
"identity": {"title": "Fuseau horaire", "help": "Choisissez le fuseau horaire des tâches planifiées."},
"memory": {"title": "Mémoire", "help": "Activez ou désactivez la consolidation automatique de la mémoire."},
"heartbeat": {"title": "Vérifications périodiques", "help": "Configurez la vérification périodique intégrée des tâches."},
"execution": {"title": "Limites de l’agent", "help": "Exécution des outils et nouvelles tentatives."},
"sessions": {"title": "Conversations", "help": "Partagez les conversations entre plateformes."},
"tools": {"title": "Outils intégrés", "help": "Choisissez les catégories d’outils autorisées."},
"shell": {"title": "Shell et bac à sable", "help": "Délais, environnement, montages et filtres de commandes."},
"network": {"title": "Connexion web", "help": "Proxy et identification des requêtes web."},
"safety": {"title": "Règles d’accès globales", "help": "Restrictions de l’espace de travail, réseaux privés et installations à distance."},
"cli": {"title": "Limites des applications en ligne de commande", "help": "Délais d’installation, d’exécution et de cache du catalogue."},
"gateway": {"title": "Processus de la passerelle", "help": "Déploiement et redémarrage du processus."},
"api": {"title": "Détails du serveur API", "help": "Adresse d’écoute et délai des requêtes."},
"storage": {"title": "Stockage des images", "help": "Emplacement des images générées."},
"maintenance": {"title": "Planification de la mémoire", "help": ""},
"web": {"title": "Accès web", "help": ""},
"applications": {"title": "Applications en ligne de commande", "help": ""}
},
"save": "Enregistrer les modifications", "saving": "Enregistrement…", "discard": "Annuler les modifications", "saved": "Enregistré.",
"restart": "Redémarrer nanobot", "restartHelp": "Redémarrez pour appliquer les modifications. Les arguments de ligne de commande et variables d’environnement peuvent avoir priorité.",
"search": "Rechercher un paramètre avancé", "noResults": "Aucun paramètre correspondant.", "pending": "Modifications non enregistrées",
"numberError": "Saisissez un nombre valide dans la plage autorisée.", "activeModel": "Utiliser le modèle actif", "none": "Aucun",
"auto": "Automatique", "manual": "Manuel", "standard": "Standard", "persistent": "Continu",
"unavailable": "Mettez à jour la passerelle pour modifier ces paramètres.", "advancedOptions": "Options avancées"
},
"backToChat": "Retour au chat",
"sidebar": {
"title": "Réglages",
"ariaLabel": "Sections des réglages"
},
"nav": {
"about": "À propos",
"capabilities": "Fonctionnalités",
"general": "Général",
"byok": "BYOK",
"overview": "Aperçu",
@@ -97,7 +179,8 @@
"browser": "Internet",
"channels": "Canaux",
"runtime": "Système",
"advanced": "Sécurité",
"advanced": "Avancé",
"memory": "Mémoire",
"cliApps": "Applications CLI",
"mcp": "MCP",
"apps": "Applications",
@@ -106,23 +189,23 @@
},
"sections": {
"interface": "Interface utilisateur",
"ai": "AI",
"ai": "IA",
"system": "Système",
"about": "À propos",
"status": "État",
"localPreferences": "Préférences locales",
"localPreferences": "Préférences du navigateur",
"presets": "Préréglages",
"imageGeneration": "Génération d’images",
"imageDefaults": "Valeurs par défaut",
"webSearch": "Recherche web",
"webBehavior": "Comportement",
"webBehavior": "Accès aux pages web",
"regional": "Paramètres régionaux",
"webuiSafety": "Sécurité WebUI",
"capabilities": "Capacités",
"capabilities": "Fonctionnalités",
"cliApps": "Applications CLI",
"mcp": "Services MCP",
"apps": "Applications",
"nativeHost": "Hôte natif",
"nativeHost": "Application de bureau",
"hostSafety": "Sécurité de l’app",
"voiceInput": "Saisie vocale"
},
@@ -132,15 +215,14 @@
"provider": "Fournisseur",
"model": "Modèle",
"restart": "Redémarrer nanobot",
"configPath": "Chemin de config",
"configPath": "Fichier de configuration",
"activePreset": "Préréglage actif",
"gateway": "Passerelle",
"restartState": "État du redémarrage",
"pendingChanges": "Modifications en attente",
"selectedPreset": "Préréglage sélectionné",
"presetModel": "Modèle du préréglage",
"density": "Densité",
"activityMode": "Détail d’activité",
"activityMode": "Détails de l’activité",
"fileEditDisplay": "Affichage des modifications de fichiers",
"codeWrap": "Retour à la ligne du code",
"maxResults": "Résultats max.",
@@ -149,11 +231,11 @@
"imageGeneration": "Génération d’images",
"imageProvider": "Fournisseur d’images",
"imageProviderStatus": "État du fournisseur",
"imageProviderBase": "Base du fournisseur",
"imageProviderBase": "URL de base du fournisseur",
"imageModel": "Modèle d’image",
"defaultAspectRatio": "Ratio par défaut",
"defaultAspectRatio": "Format par défaut",
"defaultImageSize": "Taille par défaut",
"maxImagesPerTurn": "Images max. par tour",
"maxImagesPerTurn": "Images max. par requête",
"imageSaveDir": "Dossier d’enregistrement",
"timezone": "Fuseau horaire",
"workspacePath": "Espace de travail par défaut",
@@ -181,35 +263,34 @@
"provider": "Sélectionnez le fournisseur à utiliser pour les nouvelles requêtes de modèle.",
"model": "Choisissez le modèle utilisé par ce préréglage.",
"configPath": "Le fichier de configuration actuellement utilisé par la passerelle.",
"selectedPreset": "Les préréglages nommés sont en lecture seule ici ; modifiez-les dans config.json.",
"presetModel": "Passez à la valeur par défaut pour modifier le modèle et le fournisseur depuis la WebUI.",
"density": "Enregistré seulement dans ce navigateur.",
"selectedPreset": "Gérez les préréglages dans la section Modèles.",
"presetModel": "Modifiez le fournisseur et le modèle dans la section Modèles.",
"activityMode": "Choisissez le niveau de détail de l’activité de l’agent affiché par défaut.",
"fileEditDisplay": "Choisissez si l’activité de modification affiche le nombre de lignes ou les différences.",
"codeWrap": "Garde les longues lignes de code lisibles sur les petits écrans.",
"maxResults": "Résultats renvoyés par chaque appel web_search.",
"maxResults": "Nombre maximal de résultats renvoyés par recherche web.",
"timeout": "Nombre de secondes avant l’expiration d’une requête de recherche.",
"jinaReader": "Utilise Jina Reader pour web_fetch lorsque disponible.",
"imageGeneration": "Expose generate_image dans les chats lorsqu’un fournisseur d’image configuré est disponible.",
"imageProvider": "Choisissez le fournisseur inscrit utilisé par generate_image.",
"jinaReader": "Utilise Jina Reader pour lire les pages web lorsque le service est disponible.",
"imageGeneration": "Permet à l’agent de générer des images dans les conversations lorsqu’un fournisseur est configuré.",
"imageProvider": "Choisissez le fournisseur utilisé pour générer les images.",
"imageProviderStatus": "La génération d’images réutilise les identifiants des fournisseurs.",
"imageModel": "Nom du modèle envoyé au fournisseur d’images sélectionné.",
"defaultAspectRatio": "Utilisé lorsque l’instruction ne choisit pas de ratio.",
"defaultAspectRatio": "Format utilisé si la demande ne précise pas les proportions de l’image.",
"defaultImageSize": "Indication de taille envoyée aux fournisseurs compatibles.",
"maxImagesPerTurn": "Limite supérieure pour une requête generate_image.",
"maxImagesPerTurn": "Nombre maximal d’images générées par requête.",
"timezone": "Utilisé pour les horaires et les réponses tenant compte du temps.",
"localServiceAccess": "Autorise les commandes shell avec accès complet à atteindre les services localhost.",
"webuiDefaultAccess": "Utilisé par les chats web sans permission propre au projet.",
"securityManagedControls": "Les récupérations web protègent toujours les services locaux, privés et de métadonnées. La sécurité des canaux principaux reste gérée dans config.json.",
"securityManagedControls": "Les outils web bloquent par défaut l’accès aux services locaux, aux réseaux privés et aux services de métadonnées, sauf autorisation explicite. Les autres règles de sécurité des canaux se configurent dans config.json.",
"currentModel": "Utilisée pour les nouvelles réponses.",
"selectedModelProvider": "Défini par le modèle sélectionné.",
"selectedModelValue": "Défini par le modèle sélectionné.",
"brandLogos": "Affiche les logos de fournisseurs tiers et CLI dans les Réglages.",
"browserNotifications": "Notifier uniquement lorsque cette page est en arrière-plan. Désactivé par défaut.",
"cliAppsCatalog": "Installe uniquement les adaptateurs CLI d’applications que nanobot peut exécuter localement ; les applications natives restent inchangées.",
"cliAppsCatalog": "Installe les outils en ligne de commande que nanobot peut utiliser sur cette machine. Les applications de bureau ne sont pas modifiées.",
"cliAppsFilter": "Recherchez par application, catégorie ou capacité.",
"logs": "Ouvre le dossier des journaux du moteur natif.",
"diagnostics": "Exporte un petit rapport d’exécution pour le support.",
"logs": "Ouvre le dossier des journaux de l’application de bureau.",
"diagnostics": "Exporte un rapport de diagnostic pour l’assistance.",
"localServiceAccessNative": "Autorise les commandes shell avec accès complet à atteindre les services sur ce Mac.",
"webuiDefaultAccessNative": "Utilisé par les chats natifs sans permission propre au projet.",
"contextWindow": "Choisissez le budget de contexte par défaut pour cette configuration de modèle.",
@@ -230,14 +311,12 @@
"privateEngine": "Moteur privé",
"unixSocket": "Socket Unix",
"defaultWorkspace": "Espace par défaut",
"comfortable": "Confortable",
"compact": "Compacte",
"auto": "Automatique",
"expanded": "Développé",
"default": "Par défaut",
"summary": "Résumé",
"diff": "Différences",
"collapsedDiff": "Diff replié",
"collapsedDiff": "Différences repliées",
"on": "Activé",
"off": "Désactivé",
"defaultPermission": "Autorisation par défaut",
@@ -255,13 +334,13 @@
"loadError": "Impossible de charger les réglages",
"unsaved": "Modifications non enregistrées.",
"upToDate": "À jour.",
"savedRestart": "Enregistré. Redémarrez nanobot pour appliquer.",
"savedRestart": "Enregistré. Redémarrez nanobot pour appliquer les modifications.",
"restartAfterSaving": "Enregistrez les changements, puis redémarrez quand vous êtes prêt.",
"savedRestartApply": "Enregistré. Redémarrez quand vous êtes prêt.",
"imageProviderRestart": "Changements du fournisseur d’image enregistrés. Redémarrez quand vous êtes prêt.",
"savedRestartApply": "Enregistré. Redémarrez nanobot pour appliquer les modifications.",
"imageProviderRestart": "Fournisseur d’images enregistré. Redémarrez nanobot pour appliquer les modifications.",
"hostRestartAfterSaving": "En enregistrant, nanobot redémarrera son moteur.",
"hostRestartPending": "Enregistré. Le moteur redémarrera lorsqu’il sera prêt.",
"hostApiUnavailable": "Les actions de l’hôte ne sont disponibles que dans l’app native.",
"hostApiUnavailable": "Ces actions sont disponibles uniquement dans l’application de bureau.",
"logsOpened": "Dossier des journaux ouvert.",
"logsOpenFailed": "Impossible d’ouvrir le dossier des journaux.",
"diagnosticsExported": "Diagnostic exporté vers {{path}}.",
@@ -294,14 +373,14 @@
"apiBase": "URL de base de l’API",
"apiKeyPlaceholder": "Saisir la clé API",
"apiKeyConfiguredPlaceholder": "Laisser vide pour conserver la clé actuelle",
"configuredKeyHint": "Key configurée",
"configuredKeyHint": "Clé configurée",
"apiBasePlaceholder": "Utiliser la valeur par défaut du fournisseur",
"apiKeyRequired": "Une clé API est requise pour configurer ce fournisseur.",
"showApiKey": "Afficher la clé API",
"hideApiKey": "Masquer la clé API",
"noConfiguredProviders": "Aucun fournisseur configuré",
"configureFirst": "Configurez d'abord un fournisseur dans BYOK.",
"openByok": "Ouvrir BYOK",
"configureFirst": "Configurez d’abord un fournisseur dans la section Fournisseurs.",
"openByok": "Configurer un fournisseur",
"tabs": {
"ariaLabel": "Type d'identifiants BYOK",
"llm": "LLM",
@@ -337,6 +416,30 @@
"usage": {
"title": "Activité des tokens",
"shortTitle": "Utilisation des tokens",
"last30Days": "30 derniers jours",
"viewDetails": "Voir les détails",
"previousPage": "Page précédente",
"nextPage": "Page suivante",
"dailyAverage": "Moyenne quotidienne",
"inputTokens": "Tokens d’entrée",
"cacheHitRate": "Taux de réussite du cache",
"requestTrend": "Requêtes quotidiennes",
"cacheRateHelp": "Le taux exclut les entrées dont l’état du cache est inconnu.",
"dailyTrend": "Utilisation quotidienne des tokens",
"systemHelp": "Les appels auxiliaires servent notamment à générer les titres des conversations et à exécuter des tâches internes. Ils incluent aussi les appels dont la source n’est pas renseignée.",
"bySource": "Utilisation par source",
"byModel": "Utilisation par modèle",
"modelTrend": "Évolution par modèle",
"modelsUnavailable": "Aucune ventilation par modèle disponible.",
"otherModels": "Autres / non attribués",
"unclassified": "Non classé",
"unavailable": "Les données d’utilisation sont indisponibles.",
"noActivity": "Aucun token utilisé au cours des 30 derniers jours.",
"cachedInput": "Entrée en cache",
"cacheMiss": "Entrée hors cache",
"cacheUnknown": "État du cache inconnu",
"outputTokens": "Sortie",
"otherTokens": "Autres tokens",
"subtitle": "Usage signalé par le fournisseur sur les 12 derniers mois.",
"empty": "L’activité des tokens apparaîtra après les nouvelles réponses du modèle.",
"totalTokens": "Tokens cumulés",
@@ -355,8 +458,8 @@
"user": "Chat",
"api": "API",
"cron": "Automatisations",
"dream": "Mémoire",
"system": "Système"
"dream": "Consolidation de la mémoire",
"system": "Appels auxiliaires"
}
},
"providers": {
@@ -372,11 +475,11 @@
"saveAdvancedBeforeSignIn": "Enregistrez les options avancées avant de vous connecter.",
"apiType": "Type d’API",
"proxy": "Proxy réseau",
"thinkingStyle": "Style de raisonnement",
"thinkingStyle": "Format des paramètres de raisonnement",
"region": "Région",
"profile": "Profil",
"profile": "Profil AWS",
"extraHeaders": "En-têtes supplémentaires",
"extraBody": "Corps supplémentaire",
"extraBody": "Champs supplémentaires du corps de requête",
"extraQuery": "Paramètres de requête supplémentaires",
"capabilityFastMode": "Mode rapide",
"capabilityFastModeHelp": "Utilise le niveau de service prioritaire d’OpenAI pour accélérer les réponses. Les crédits sont consommés plus rapidement.",
@@ -398,17 +501,17 @@
"missingCredential": "Configurez ce fournisseur avant d’activer la génération d’images."
},
"capabilities": {
"providerSupport": "Prise en charge du fournisseur",
"providerInstallOnSave": "La prise en charge requise sera installée automatiquement lors de l’enregistrement de ce fournisseur.",
"searchSupport": "Prise en charge du fournisseur de recherche",
"searchInstallOnSave": "La prise en charge d’Olostep sera installée automatiquement lors de l’enregistrement.",
"installing": "Installation de la prise en charge..."
"providerSupport": "Dépendances du fournisseur",
"providerInstallOnSave": "Les dépendances nécessaires seront installées lors de l’enregistrement de ce fournisseur.",
"searchSupport": "Dépendances du service de recherche",
"searchInstallOnSave": "Les dépendances d’Olostep seront installées lors de l’enregistrement.",
"installing": "Installation des dépendances…"
},
"models": {
"selectModel": "Choisir un modèle",
"addConfiguration": "Ajouter une configuration",
"newConfiguration": "Nouvelle configuration de modèle",
"newConfigurationHelp": "Enregistre un fournisseur et un modèle comme option en un clic.",
"newConfigurationHelp": "Enregistrez un fournisseur et un modèle pour les sélectionner rapidement.",
"configurationName": "Nom de la configuration",
"configurationNameHelp": "Renomme cette configuration de modèle enregistrée.",
"configurationNamePlaceholder": "Rédaction rapide",
@@ -441,21 +544,22 @@
"disabled": "Désactivé",
"noPresets": "Aucun préréglage de modèle",
"noPresetsHelp": "Créez un préréglage, puis ajoutez-le à l’ordre d’appel.",
"removeBeforeDelete": "Retirez ce préréglage de l’ordre d’appel avant de le supprimer.",
"removeBeforeDelete": "Choisissez un autre préréglage principal avant de supprimer celui-ci.",
"providerSetupRequired": "Configuration du fournisseur requise",
"configureProviderBeforeSaving": "Configurez ce fournisseur avant d’enregistrer le préréglage.",
"deletePresetTitle": "Supprimer le préréglage de modèle ?",
"deletePresetHelp": "Le préréglage « {{name}} » sera supprimé. Les identifiants du fournisseur ne seront pas modifiés.",
"deletePresetHelp": "Le préréglage « {{name}} » sera supprimé et retiré de l’ordre d’appel. Les identifiants du fournisseur seront conservés.",
"searchModels": "Rechercher ou saisir un ID de modèle",
"useCustomModel": "Utiliser",
"loadingModels": "Chargement des modèles...",
"searchCatalog": "Rechercher dans le catalogue du fournisseur pour choisir un modèle.",
"availableCount": "Modèles disponibles : {{count}}",
"modelsAvailable": "disponibles",
"noModelResults": "Aucun modèle correspondant.",
"loadFailed": "Liste des modèles indisponible.",
"unsupportedModelList": "Saisissez manuellement un ID de modèle.",
"providerNotConfigured": "Configurez ce fournisseur avant de charger les modèles.",
"autoProviderCustomOnly": "Le mode fournisseur automatique utilise des IDs de modèle personnalisés."
"autoProviderCustomOnly": "Saisissez un ID de modèle pour utiliser la sélection automatique du fournisseur."
},
"timezone": {
"select": "Choisir un fuseau horaire",
@@ -464,13 +568,17 @@
},
"cliApps": {
"allCategories": "Toutes les catégories",
"availableCount_one": "{{count}} application",
"availableCount_other": "{{count}} applications",
"availableCount": "{{count}} applications",
"installedCount_one": "{{count}} outil CLI installé",
"installedCount_other": "{{count}} outils CLI installés",
"installedCount": "{{count}} installées",
"summary": "{{installed}} CLIs installées sur {{total}}",
"summary": "{{installed}} outils CLI installés sur {{total}}",
"filterAll": "Tout",
"filterInstalled": "CLIs installées",
"filterInstalled": "Outils CLI installés",
"filterNotInstalled": "Non installées",
"searchPlaceholder": "Rechercher des CLIs",
"searchPlaceholder": "Rechercher des outils CLI",
"statusInstalled": "Installée",
"statusAvailable": "Disponible",
"statusMissing": "Dépendance manquante",
@@ -481,19 +589,22 @@
"empty": "Aucune application CLI ne correspond à ce filtre.",
"readyTitle": "@{{name}} est prêt",
"readyStatus": "Prêt",
"readyPrompt": "Utilisez @{{name}} pour voir ce que ce CLI peut faire.",
"readyPrompt": "Utilisez @{{name}} pour découvrir les fonctions de cet outil.",
"readyTry": "Essayer @{{name}}",
"readyCopied": "Copié",
"openChat": "Ouvrir le chat",
"requires": "Requiert",
"test": "Tester le CLI",
"update": "Mettre à jour le CLI",
"uninstall": "Désinstaller le CLI",
"install": "Installer le CLI",
"test": "Tester l’outil CLI",
"update": "Mettre à jour l’outil CLI",
"uninstall": "Désinstaller l’outil CLI",
"install": "Installer l’outil CLI",
"unavailable": "Indisponible",
"noDescription": "Aucune description disponible."
},
"about": {
"documentation": "Documentation",
"sourceCode": "Code source",
"reportIssue": "Signaler un problème",
"version": "Version",
"checking": "Recherche de mises à jour...",
"checkForUpdates": "Rechercher les mises à jour",
@@ -520,22 +631,24 @@
"authNone": "Aucune",
"authHeaders": "En-têtes",
"command": "Commande",
"args": "Arguments JSON",
"headers": "En-têtes JSON",
"args": "Arguments (JSON)",
"headers": "En-têtes (JSON)",
"oauthAfterSave": "Enregistrez le serveur, puis sélectionnez Se connecter pour vous identifier.",
"headersHelp": "Ajoutez les en-têtes de requête utilisés par ce serveur.",
"env": "Environnement JSON",
"timeout": "Délai d'outil",
"env": "Variables d’environnement (JSON)",
"timeout": "Délai des outils (secondes)",
"advancedOptions": "Options avancées",
"hideAdvanced": "Masquer les options avancées",
"saveCustom": "Enregistrer MCP",
"saveCustom": "Enregistrer le serveur",
"configImport": "Importer mcp.json",
"importConfig": "Importer",
"restartRequired": "Redémarrez nanobot pour connecter les outils MCP mis à jour.",
"toolsFound_one": "{{count}} outil",
"toolsFound_other": "{{count}} outils",
"toolsFound": "{{count}} outils",
"loading": "Chargement des préréglages MCP...",
"empty": "Aucun préréglage MCP ne correspond à ce filtre.",
"openDocs": "Ouvrir la doc",
"openDocs": "Ouvrir la documentation",
"test": "Tester",
"remove": "Supprimer",
"enable": "Activer",
@@ -596,14 +709,14 @@
"toolScope": "Outils",
"allTools": "Tout activer",
"noTools": "Tout désactiver",
"reloadTools": "Recharger les outils",
"reloadTools": "Actualiser la liste des outils",
"presetDescriptions": {
"browserbase": "Automatisez des navigateurs cloud avec Browserbase.",
"playwright": "Inspectez et automatisez les navigateurs locaux avec Playwright.",
"context7": "Obtenez la documentation à jour et des exemples de code.",
"firecrawl": "Explorez, recherchez et extrayez du contenu web.",
"parallel-search": "Recherchez sur le web et lisez les pages pertinentes.",
"exa": "Recherchez sur le web et extrayez du contenu propre.",
"exa": "Recherchez sur le web et extrayez le contenu des pages.",
"microsoft-learn": "Recherchez et consultez la documentation Microsoft Learn.",
"aws-docs": "Recherchez la documentation et les guides de services AWS.",
"brave-search": "Recherchez le web, les actualités, les images, les vidéos et les résultats locaux avec Brave Search.",
@@ -617,13 +730,13 @@
}
},
"api": {
"title": "Serveur API", "openaiCompatible": "API compatible OpenAI", "description": "Connectez des SDK et agents via un endpoint /v1 local.",
"title": "Serveur API", "openaiCompatible": "API compatible OpenAI", "description": "Connectez des SDK et des agents à l’API locale via /v1.",
"start": "Démarrer le serveur API", "starting": "Démarrage...", "stop": "Arrêter", "stopping": "Arrêt...",
"access": "Accès", "thisDevice": "Cet appareil", "localNetwork": "Réseau local",
"localHelp": "Seul cet appareil peut se connecter.", "networkHelp": "D’autres appareils peuvent se connecter ; une clé API est requise.",
"port": "Port", "portHelp": "L’API utilise ce port local.", "apiKey": "Clé API", "apiKeyHelp": "Les clients l’envoient comme jeton Bearer.",
"apiKeyRequired": "Requise avant d’exposer l’API au réseau.", "apiKeyPlaceholder": "Saisissez une clé API",
"autoInstall": "Le support API sera installé automatiquement au démarrage."
"autoInstall": "Les dépendances du serveur API seront installées automatiquement au démarrage."
},
"observability": {
"title": "Observabilité", "configured": "Les identifiants de traçage sont disponibles pour nanobot.",
@@ -659,8 +772,8 @@
"restartRequired": "Redémarrez nanobot pour appliquer les applications et outils MCP mis à jour."
},
"channels": {
"description": "Connectez nanobot aux applications de discussion. L'installation du support ajoute seulement le paquet d'intégration ; la plupart des canaux nécessitent encore des jetons ou des réglages d'espace de travail.",
"caption": "{{enabled}} activés · {{total}} canaux",
"description": "Connectez nanobot à vos applications de discussion. L’installation ajoute les dépendances nécessaires ; renseignez ensuite les identifiants et les paramètres de chaque plateforme.",
"caption": "{{enabled}} en cours d’exécution · {{total}} canaux",
"searchPlaceholder": "Rechercher des canaux",
"backToChannels": "Tous les canaux",
"catalog": "Canaux",
@@ -670,7 +783,7 @@
"requires": "Requiert : {{requirements}}",
"setUp": "Configurer",
"setupGuide": "Guide de configuration",
"setupSummary": "L'activation n'active que le support nanobot. Ajoutez les identifiants de la plateforme, puis redémarrez nanobot.",
"setupSummary": "Activez le canal, renseignez les identifiants de la plateforme, puis redémarrez nanobot.",
"configKeys": "Clés de configuration",
"enable": "Activer le canal",
"disable": "Désactiver le canal",
@@ -687,12 +800,14 @@
"checkOnly": "Vérifier uniquement",
"commandCopied": "Commande copiée.",
"commandCopyFailed": "Impossible de copier la commande.",
"configuredInstances_one": "{{count}} instance configurée",
"configuredInstances_other": "{{count}} instances configurées",
"configuredInstances": "{{count}} instances configurées",
"connectPreview": "La connexion dans le navigateur est la prochaine étape. Pour l'instant, exécutez la commande ci-dessous.",
"copyCommand": "Copier la commande",
"filterAll": "Tous",
"filterOff": "Désactivés",
"filterOn": "Activés",
"filterOff": "À l’arrêt",
"filterOn": "En cours d’exécution",
"helperCopied": "{{name}} copié.",
"helperCopyFailed": "Impossible de copier {{name}}.",
"hideSecret": "Masquer le secret",
@@ -713,8 +828,8 @@
"selectChannel": "Afficher les paramètres de {{name}}",
"setupSteps": "Étapes suivantes",
"showSecret": "Afficher le secret",
"toggleChannel": "Canal {{name}}",
"toggleInstance": "Instance {{name}}",
"toggleChannel": "Activer {{name}}",
"toggleInstance": "Activer l’instance {{name}}",
"tryIt": "Essayer",
"validationFailed": "Vérifiez la configuration requise avant l'activation.",
"validation": {
@@ -730,10 +845,10 @@
"enable": "Activer",
"disable": "Désactiver",
"ready": "Prêt",
"missingDependency": "Support manquant",
"installSupport": "Installer le support",
"installConfirmTitle": "Installer le support pour {{name}} ?",
"installConfirmDescription": "nanobot ajoutera ce dont {{name}} a besoin, puis l'activera. Continuer ?",
"missingDependency": "Dépendances manquantes",
"installSupport": "Installer les dépendances",
"installConfirmTitle": "Installer les dépendances de {{name}} ?",
"installConfirmDescription": "nanobot installera les dépendances nécessaires, puis activera {{name}}.",
"installConfirmAction": "Installer et activer",
"websocketRequired": "Requis pour la WebUI",
"channelDisabled": "Canal désactivé",
@@ -782,7 +897,7 @@
"commandCopied": "Copié",
"copyCommand": "Copier",
"deleteTitle": "Supprimer l’automatisation",
"deleteDescription": "Cela supprime {{name}} du stockage cron. Les anciens messages de chat restent dans la session.",
"deleteDescription": "L’automatisation {{name}} sera supprimée. Les messages déjà envoyés resteront dans la conversation.",
"cancel": "Annuler",
"status": {
"system": "Système",
@@ -791,7 +906,7 @@
"failed": "Échouée",
"completed": "Terminée",
"noSchedule": "Aucun planning",
"active": "En cours"
"active": "Activée"
},
"origin": {
"system": "Système",
@@ -821,7 +936,7 @@
"cronWithTz": "Cron {{expr}} · {{tz}}",
"withTz": "{{summary}} · {{tz}}",
"dailyAt": "Chaque jour à {{time}}",
"weekdaysAt": "Jours ouvrés à {{time}}",
"weekdaysAt": "Du lundi au vendredi à {{time}}",
"hourlyAt": "Toutes les heures à :{{minute}}",
"hourlyWindow": "Toutes les heures {{start}}-{{end}} à :{{minute}}",
"local": "Déclencheur local",
@@ -898,7 +1013,7 @@
"finishSignIn": "Terminer la connexion"
},
"skills": {
"description": "Consultez les compétences d’instruction que cet agent peut charger pendant une conversation.",
"description": "Gérez les compétences que l’agent peut utiliser pendant une conversation.",
"caption": "{{available}} disponibles · {{total}} au total",
"views": "Vues des compétences",
"installedTab": "Installées",
@@ -975,11 +1090,11 @@
"noRequirements": "Aucun prérequis explicite.",
"commands": "Commandes",
"environment": "Variables d’environnement",
"missingCommands": "CLI manquant",
"missingEnvironment": "ENV manquant",
"missingCommands": "Outils en ligne de commande manquants",
"missingEnvironment": "Variables d’environnement manquantes",
"unavailableReasonLabel": "Raison d’indisponibilité",
"rawInstructions": "SKILL.md brut",
"rawInstructionsEmpty": "Aucune instruction brute.",
"rawInstructions": "Contenu du fichier SKILL.md",
"rawInstructionsEmpty": "Aucune instruction disponible.",
"detailDescription": "Détails de {{name}}."
},
"voice": {
+215 -100
View File
@@ -25,6 +25,7 @@
"system": {
"section": "Sistem",
"restartHint": "Mulai ulang nanobot untuk menerapkan perubahan runtime.",
"restartAction": "Mulai ulang",
"restart": "Mulai ulang nanobot",
"restarting": "Memulai ulang...",
"restartEngine": "Mulai ulang mesin",
@@ -60,6 +61,7 @@
"closeAction": "Tutup obrolan sementara: {{title}}"
},
"sidebar": {
"resize": "Ubah lebar bilah samping",
"navigation": "Navigasi bilah samping",
"collapse": "Ciutkan sidebar",
"newChat": "Topik baru",
@@ -80,12 +82,92 @@
}
},
"settings": {
"timezoneNoMatches": "Tidak ada zona waktu yang cocok.",
"configure": "Konfigurasi",
"exit": {
"title": "Mulai ulang nanobot sebelum keluar dari pengaturan?",
"description": "Perubahan sudah disimpan. Mulai ulang untuk menerapkannya.",
"later": "Mulai ulang nanti"
},
"runtimeConfig": {
"apiSaved": "Tersimpan. Mulai ulang layanan API untuk menerapkan perubahan.",
"fields": {
"agents_defaults_timezone_mode": {"label": "Gunakan zona waktu sistem", "help": "Nonaktifkan untuk memilih zona waktu secara manual."},
"agents_defaults_timezone": {"label": "Zona waktu", "help": "Pilih zona waktu. Selisih waktu dari UTC mengikuti tanggal saat ini."},
"agents_defaults_dream_enabled": {"label": "Penataan memori", "help": "Menata informasi berguna dari percakapan secara otomatis. Memori yang ada tetap digunakan saat dinonaktifkan."},
"gateway_heartbeat_enabled": {"label": "Pemeriksaan berkala", "help": "Memeriksa tugas di HEARTBEAT.md secara berkala."},
"gateway_heartbeat_interval_s": {"label": "Interval pemeriksaan (detik)", "help": "Gateway menjadwalkan pemeriksaan berkala saat dimulai."},
"agents_defaults_max_tool_iterations": {"label": "Batas iterasi alat per giliran", "help": "Jumlah maksimum interaksi model dan alat dalam satu giliran."},
"agents_defaults_max_concurrent_subagents": {"label": "Batas subagen bersamaan", "help": "Jumlah maksimum subagen yang berjalan bersamaan."},
"agents_defaults_max_tool_result_chars": {"label": "Panjang hasil alat (karakter)", "help": "Membatasi keluaran alat yang disertakan dalam konteks model."},
"agents_defaults_provider_retry_mode": {"label": "Terus coba ulang permintaan model", "help": "Mencoba kembali permintaan ke model saat terjadi kesalahan sementara. Nonaktifkan untuk membatasi jumlah percobaan ulang."},
"agents_defaults_tool_hint_max_length": {"label": "Panjang petunjuk alat (karakter)", "help": "Panjang maksimum petunjuk singkat aktivitas alat."},
"tools_max_session_messages_per_minute": {"label": "Batas pesan alat per menit", "help": "Membatasi frekuensi alat mengirim pesan ke percakapan."},
"agents_defaults_unified_session": {"label": "Bagikan percakapan antarplatform", "help": "Menggunakan satu percakapan untuk satu pengguna di beberapa platform chat."},
"tools_exec_enable": {"label": "Alat shell", "help": "Mengizinkan agen menjalankan perintah shell."},
"tools_file_enable": {"label": "Alat file", "help": "Mengizinkan alat bawaan untuk membaca dan mengedit file."},
"tools_web_enable": {"label": "Alat web", "help": "Mengizinkan pencarian web dan pengambilan halaman."},
"tools_cli_apps_enable": {"label": "Alat aplikasi CLI", "help": "Mengizinkan agen mengelola dan menjalankan aplikasi baris perintah."},
"tools_my_enable": {"label": "Alat pengelolaan diri", "help": "Mengizinkan agen memeriksa konfigurasinya sendiri."},
"tools_my_allow_set": {"label": "Perubahan konfigurasi oleh agen", "help": "Mengizinkan alat pengelolaan diri memperbarui konfigurasi."},
"tools_exec_timeout": {"label": "Batas waktu perintah (detik)", "help": "Durasi maksimum perintah shell. 0 berarti tanpa batas."},
"tools_exec_path_prepend": {"label": "Jalur pencarian prioritas", "help": "Direktori yang ditambahkan di awal PATH. Pisahkan dengan titik koma di Windows atau titik dua di macOS dan Linux."},
"tools_exec_path_append": {"label": "Jalur pencarian tambahan", "help": "Direktori yang ditambahkan di akhir PATH. Pisahkan dengan titik koma di Windows atau titik dua di macOS dan Linux."},
"tools_exec_sandbox": {"label": "Sandbox perintah", "help": "Gunakan bwrap di Linux atau Seatbelt di macOS. Pemeriksaan ruang kerja saja tidak mengisolasi proses."},
"tools_exec_sandbox_ro_binds": {"label": "Jalur sandbox hanya baca", "help": "Jalur tambahan yang dipasang hanya baca, satu per baris."},
"tools_exec_sandbox_rw_binds": {"label": "Jalur sandbox yang dapat ditulis", "help": "Jalur tambahan yang dipasang dengan izin tulis, satu per baris."},
"tools_exec_allowed_env_keys": {"label": "Variabel lingkungan yang diizinkan", "help": "Variabel tambahan yang diteruskan ke perintah, satu per baris. Variabel dasar yang diperlukan tetap tersedia."},
"tools_exec_allow_patterns": {"label": "Pola perintah yang diizinkan", "help": "Satu ekspresi reguler per baris. Jika diisi, setiap bagian perintah harus cocok sepenuhnya dengan salah satu aturan. Perintah yang diizinkan melewati aturan pemblokiran bawaan dan tambahan, tetapi tetap mengikuti batasan jaringan dan ruang kerja."},
"tools_exec_deny_patterns": {"label": "Pola perintah yang diblokir", "help": "Aturan pemblokiran tambahan berupa ekspresi reguler, satu per baris. Aturan izin eksplisit mengesampingkan aturan pemblokiran bawaan dan tambahan."},
"tools_web_proxy": {"label": "Proxy web", "help": "URL proxy untuk alat web. Kosongkan untuk memakai jaringan default."},
"tools_web_user_agent": {"label": "Header User-Agent", "help": "Header User-Agent kustom. Kosongkan untuk memakai nilai default."},
"tools_restrict_to_workspace": {"label": "Batasi alat ke ruang kerja", "help": "Kebijakan alat global. Izin setiap percakapan WebUI diatur secara terpisah."},
"tools_ssrf_whitelist": {"label": "Rentang jaringan privat yang diizinkan", "help": "IP atau rentang CIDR yang dikecualikan dari perlindungan permintaan keluar, satu per baris."},
"tools_webui_allow_remote_package_install": {"label": "Instalasi paket jarak jauh", "help": "Mengizinkan pemasangan paket dan keterampilan melalui WebUI jarak jauh. Pengaturan ini harus diubah di komputer yang menjalankan gateway."},
"tools_cli_apps_install_timeout": {"label": "Batas waktu instalasi (detik)", "help": "Durasi maksimum instalasi aplikasi CLI."},
"tools_cli_apps_run_timeout": {"label": "Batas waktu eksekusi (detik)", "help": "Durasi maksimum perintah aplikasi CLI."},
"tools_cli_apps_catalog_ttl_seconds": {"label": "Durasi cache katalog (detik)", "help": "Lama katalog aplikasi CLI disimpan dalam cache."},
"gateway_host": {"label": "Alamat gateway", "help": "Alamat tempat gateway menerima koneksi. Alamat WebSocket dan WebUI diatur di Kanal → WebSocket."},
"gateway_port": {"label": "Port gateway", "help": "Port yang disimpan. Argumen baris perintah lebih diutamakan."},
"gateway_restart_mode": {"label": "Mode mulai ulang", "help": "Cara memulai ulang proses. Mode otomatis memilih berdasarkan lingkungan host."},
"api_host": {"label": "Alamat server API", "help": "Kunci API diperlukan untuk menerima koneksi pada alamat selain localhost. Atur kunci di Sistem, lalu mulai ulang layanan API untuk menerapkan perubahan."},
"api_timeout": {"label": "Batas waktu permintaan API (detik)", "help": "Durasi maksimum permintaan. Mulai ulang layanan API untuk menerapkan perubahan."},
"tools_image_generation_save_dir": {"label": "Folder gambar yang dihasilkan", "help": "Jalur relatif di dalam folder media nanobot. Gambar yang ada tidak dipindahkan."}
},
"groups": {
"chat": {"title": "Izin chat WebUI", "help": "Akses layanan lokal dan izin chat default."},
"identity": {"title": "Zona waktu", "help": "Pilih zona waktu untuk tugas terjadwal."},
"memory": {"title": "Memori", "help": "Aktifkan atau nonaktifkan penataan memori otomatis."},
"heartbeat": {"title": "Jadwal pemeriksaan berkala", "help": "Atur pemeriksaan tugas berkala bawaan."},
"execution": {"title": "Batas agen", "help": "Eksekusi alat dan perilaku percobaan ulang."},
"sessions": {"title": "Percakapan", "help": "Bagikan percakapan antarplatform."},
"tools": {"title": "Alat bawaan", "help": "Pilih kategori alat yang diizinkan."},
"shell": {"title": "Shell dan sandbox", "help": "Batas waktu, lingkungan, pemasangan jalur, dan filter perintah."},
"network": {"title": "Koneksi web", "help": "Proxy dan identitas permintaan web."},
"safety": {"title": "Kebijakan akses global", "help": "Pembatasan ruang kerja, jaringan privat, dan instalasi jarak jauh."},
"cli": {"title": "Batas aplikasi CLI", "help": "Batas waktu instalasi, eksekusi, dan cache katalog."},
"gateway": {"title": "Proses gateway", "help": "Konfigurasi penerapan dan mulai ulang proses."},
"api": {"title": "Detail server API", "help": "Alamat penerima koneksi dan batas waktu permintaan."},
"storage": {"title": "Penyimpanan gambar", "help": "Lokasi penyimpanan gambar yang dihasilkan."},
"maintenance": {"title": "Jadwal penataan memori", "help": ""},
"web": {"title": "Akses web", "help": ""},
"applications": {"title": "Aplikasi baris perintah", "help": ""}
},
"save": "Simpan perubahan", "saving": "Menyimpan…", "discard": "Buang perubahan", "saved": "Tersimpan.",
"restart": "Mulai ulang nanobot", "restartHelp": "Mulai ulang untuk menerapkan perubahan. Argumen baris perintah dan variabel lingkungan mungkin lebih diutamakan.",
"search": "Cari pengaturan lanjutan", "noResults": "Tidak ada pengaturan yang cocok.", "pending": "Perubahan belum disimpan",
"numberError": "Masukkan angka yang valid dalam rentang yang diizinkan.", "activeModel": "Gunakan model aktif", "none": "Tidak ada",
"auto": "Otomatis", "manual": "Manual", "standard": "Standar", "persistent": "Terus-menerus",
"unavailable": "Perbarui gateway untuk mengedit pengaturan ini.", "advancedOptions": "Opsi lanjutan"
},
"backToChat": "Kembali ke chat",
"sidebar": {
"title": "Pengaturan",
"ariaLabel": "Bagian pengaturan"
},
"nav": {
"about": "Tentang",
"capabilities": "Fitur",
"general": "Umum",
"byok": "BYOK",
"overview": "Ikhtisar",
@@ -97,7 +179,8 @@
"browser": "Internet",
"channels": "Kanal",
"runtime": "Sistem",
"advanced": "Keamanan",
"advanced": "Lanjutan",
"memory": "Memori",
"cliApps": "Aplikasi CLI",
"mcp": "MCP",
"apps": "Aplikasi",
@@ -110,19 +193,19 @@
"system": "Sistem",
"about": "Tentang",
"status": "Status",
"localPreferences": "Preferensi lokal",
"localPreferences": "Preferensi browser",
"presets": "Prasetel",
"imageGeneration": "Pembuatan gambar",
"imageDefaults": "Bawaan",
"webSearch": "Pencarian web",
"webBehavior": "Perilaku",
"webBehavior": "Akses halaman web",
"regional": "Regional",
"webuiSafety": "Keamanan WebUI",
"capabilities": "Kemampuan",
"capabilities": "Fitur",
"cliApps": "Aplikasi CLI",
"mcp": "Layanan MCP",
"apps": "Aplikasi",
"nativeHost": "Host asli",
"nativeHost": "Aplikasi desktop",
"hostSafety": "Keamanan aplikasi",
"voiceInput": "Input suara"
},
@@ -132,28 +215,27 @@
"provider": "Penyedia",
"model": "Model",
"restart": "Mulai ulang nanobot",
"configPath": "Path konfigurasi",
"configPath": "File konfigurasi",
"activePreset": "Prasetel aktif",
"gateway": "Gerbang",
"gateway": "Gateway",
"restartState": "Status mulai ulang",
"pendingChanges": "Perubahan tertunda",
"selectedPreset": "Prasetel terpilih",
"presetModel": "Model prasetel",
"density": "Kerapatan",
"activityMode": "Detail aktivitas",
"fileEditDisplay": "Tampilan perubahan file",
"codeWrap": "Bungkus kode",
"codeWrap": "Bungkus baris kode",
"maxResults": "Hasil maksimum",
"timeout": "Batas waktu",
"jinaReader": "Pembaca Jina",
"jinaReader": "Jina Reader",
"imageGeneration": "Pembuatan gambar",
"imageProvider": "Penyedia gambar",
"imageProviderStatus": "Status penyedia",
"imageProviderBase": "Basis penyedia",
"imageProviderBase": "URL dasar penyedia",
"imageModel": "Model gambar",
"defaultAspectRatio": "Rasio bawaan",
"defaultImageSize": "Ukuran bawaan",
"maxImagesPerTurn": "Maks. gambar per giliran",
"maxImagesPerTurn": "Maks. gambar per permintaan",
"imageSaveDir": "Direktori simpan",
"timezone": "Zona waktu",
"workspacePath": "Ruang kerja bawaan",
@@ -181,43 +263,42 @@
"provider": "Pilih penyedia untuk permintaan model baru.",
"model": "Pilih model yang digunakan oleh prasetel ini.",
"configPath": "File konfigurasi gateway yang sedang digunakan.",
"selectedPreset": "Prasetel bernama hanya-baca di sini; ubah di config.json.",
"presetModel": "Beralih ke Bawaan untuk mengubah model dan penyedia dari WebUI.",
"density": "Hanya disimpan di browser ini.",
"selectedPreset": "Kelola prasetel di bagian Model.",
"presetModel": "Ubah penyedia dan model di bagian Model.",
"activityMode": "Pilih seberapa banyak detail aktivitas agen yang ditampilkan secara default.",
"fileEditDisplay": "Pilih apakah aktivitas perubahan file ditampilkan sebagai jumlah baris atau perbedaan.",
"codeWrap": "Menjaga baris kode panjang tetap terbaca di layar kecil.",
"maxResults": "Hasil yang dikembalikan oleh setiap panggilan web_search.",
"maxResults": "Jumlah maksimum hasil per pencarian web.",
"timeout": "Detik sebelum permintaan penyedia pencarian mencapai batas waktu.",
"jinaReader": "Gunakan Jina Reader untuk web_fetch jika tersedia.",
"imageGeneration": "Tampilkan generate_image di chat saat penyedia gambar yang dikonfigurasi tersedia.",
"imageProvider": "Pilih penyedia registry yang digunakan oleh generate_image.",
"jinaReader": "Menggunakan Jina Reader untuk membaca halaman web jika tersedia.",
"imageGeneration": "Mengizinkan agen membuat gambar dalam percakapan jika penyedia sudah dikonfigurasi.",
"imageProvider": "Pilih penyedia yang digunakan untuk membuat gambar.",
"imageProviderStatus": "Pembuatan gambar menggunakan kembali kredensial penyedia dari bagian Penyedia.",
"imageModel": "Nama model yang dikirim ke penyedia gambar yang dipilih.",
"defaultAspectRatio": "Digunakan saat instruksi tidak memilih rasio aspek.",
"defaultAspectRatio": "Digunakan jika permintaan tidak menentukan rasio gambar.",
"defaultImageSize": "Petunjuk ukuran yang dikirim ke penyedia yang mendukungnya.",
"maxImagesPerTurn": "Batas atas untuk satu permintaan generate_image.",
"maxImagesPerTurn": "Jumlah maksimum gambar yang dibuat dalam satu permintaan.",
"timezone": "Dipakai untuk jadwal dan balasan yang peka waktu.",
"localServiceAccess": "Izinkan perintah shell dengan akses penuh menjangkau layanan lokal.",
"webuiDefaultAccess": "Digunakan oleh chat web tanpa izin khusus proyek.",
"securityManagedControls": "Pengambilan web selalu melindungi layanan lokal, privat, dan metadata. Keamanan kanal inti tetap dikelola di config.json.",
"securityManagedControls": "Alat web memblokir akses ke layanan lokal, jaringan privat, dan layanan metadata, kecuali diizinkan secara eksplisit. Pengaturan keamanan kanal lainnya dikelola di config.json.",
"currentModel": "Digunakan untuk balasan baru.",
"selectedModelProvider": "Ditentukan oleh model yang dipilih.",
"selectedModelValue": "Ditentukan oleh model yang dipilih.",
"brandLogos": "Tampilkan logo penyedia pihak ketiga dan CLI di Pengaturan.",
"browserNotifications": "Beri tahu hanya saat halaman ini di latar belakang. Nonaktif secara bawaan.",
"cliAppsCatalog": "Instal hanya adaptor CLI aplikasi yang dapat dijalankan nanobot secara lokal; aplikasi asli tidak diubah.",
"cliAppsCatalog": "Memasang alat baris perintah yang dapat digunakan nanobot di komputer ini. Aplikasi desktop tidak diubah.",
"cliAppsFilter": "Cari berdasarkan aplikasi, kategori, atau kemampuan.",
"logs": "Buka folder log mesin asli.",
"diagnostics": "Ekspor laporan waktu proses singkat untuk dukungan.",
"logs": "Membuka folder log aplikasi desktop.",
"diagnostics": "Mengekspor laporan diagnostik untuk tim dukungan.",
"localServiceAccessNative": "Izinkan perintah shell dengan akses penuh mengakses layanan di Mac ini.",
"webuiDefaultAccessNative": "Digunakan oleh chat bawaan tanpa izin khusus proyek.",
"contextWindow": "Pilih anggaran konteks bawaan untuk konfigurasi model ini.",
"webuiDefaultAccessNative": "Digunakan untuk percakapan di aplikasi desktop tanpa izin khusus proyek.",
"contextWindow": "Pilih batas konteks bawaan untuk konfigurasi model ini.",
"transcription": "Transkripsikan input mikrofon sebelum dikirim. Pesan suara kanal memakai pengaturan yang sama.",
"transcriptionProvider": "Menggunakan kredensial penyedia yang sesuai dari Penyedia.",
"transcriptionProviderStatus": "Kunci API tetap berada di bagian penyedia, bukan di pengaturan transkripsi.",
"transcriptionModel": "Biarkan memakai bawaan yang ter-resolve kecuali penyedia membutuhkan ID model khusus.",
"transcriptionLanguage": "Petunjuk ISO-639 opsional, seperti en, zh, ja, atau ko."
"transcriptionModel": "Gunakan model bawaan, kecuali penyedia memerlukan ID model tertentu.",
"transcriptionLanguage": "Kode bahasa ISO-639 opsional, seperti en, zh, ja, atau ko. Kosongkan untuk mendeteksi bahasa secara otomatis."
},
"values": {
"light": "Terang",
@@ -230,8 +311,6 @@
"privateEngine": "Mesin privat",
"unixSocket": "Soket Unix",
"defaultWorkspace": "Ruang kerja bawaan",
"comfortable": "Nyaman",
"compact": "Ringkas",
"auto": "Otomatis",
"expanded": "Diperluas",
"default": "Bawaan",
@@ -255,13 +334,13 @@
"loadError": "Tidak dapat memuat pengaturan",
"unsaved": "Perubahan belum disimpan.",
"upToDate": "Sudah terbaru.",
"savedRestart": "Tersimpan. Mulai ulang nanobot untuk menerapkan.",
"savedRestart": "Tersimpan. Mulai ulang nanobot untuk menerapkan perubahan.",
"restartAfterSaving": "Simpan perubahan, lalu mulai ulang saat siap.",
"savedRestartApply": "Tersimpan. Mulai ulang saat siap.",
"imageProviderRestart": "Perubahan penyedia gambar tersimpan. Mulai ulang saat siap.",
"savedRestartApply": "Tersimpan. Mulai ulang nanobot untuk menerapkan perubahan.",
"imageProviderRestart": "Perubahan penyedia gambar tersimpan. Mulai ulang nanobot untuk menerapkannya.",
"hostRestartAfterSaving": "Saat disimpan, nanobot akan memulai ulang mesinnya.",
"hostRestartPending": "Tersimpan. Mesin akan dimulai ulang saat siap.",
"hostApiUnavailable": "Tindakan host hanya tersedia di aplikasi asli.",
"hostApiUnavailable": "Tindakan ini hanya tersedia di aplikasi desktop.",
"logsOpened": "Folder log dibuka.",
"logsOpenFailed": "Tidak dapat membuka folder log.",
"diagnosticsExported": "Diagnostik diekspor ke {{path}}.",
@@ -291,17 +370,17 @@
"showMore": "Tampilkan {{count}} lagi",
"showLess": "Tampilkan lebih sedikit",
"apiKey": "Kunci API",
"apiBase": "Basis API",
"apiBase": "URL dasar API",
"apiKeyPlaceholder": "Masukkan kunci API",
"apiKeyConfiguredPlaceholder": "Kosongkan untuk mempertahankan kunci saat ini",
"configuredKeyHint": "Kunci yang dikonfigurasi",
"configuredKeyHint": "Kunci sudah diatur",
"apiBasePlaceholder": "Gunakan nilai bawaan penyedia",
"apiKeyRequired": "Kunci API diperlukan untuk mengonfigurasi penyedia ini.",
"showApiKey": "Tampilkan kunci API",
"hideApiKey": "Sembunyikan kunci API",
"noConfiguredProviders": "Belum ada penyedia yang dikonfigurasi",
"configureFirst": "Konfigurasikan penyedia di BYOK terlebih dahulu.",
"openByok": "Buka BYOK",
"configureFirst": "Konfigurasikan penyedia di bagian Penyedia terlebih dahulu.",
"openByok": "Konfigurasi penyedia",
"tabs": {
"ariaLabel": "Jenis kredensial BYOK",
"llm": "LLM",
@@ -309,12 +388,12 @@
},
"webSearch": {
"provider": "Penyedia pencarian",
"providerHelp": "Pilih backend yang digunakan alat pencarian web.",
"providerHelp": "Pilih layanan untuk pencarian web.",
"selectProvider": "Pilih penyedia",
"credentials": "Kredensial",
"noCredentialRequired": "Tidak perlu kunci",
"noCredentialHelp": "DuckDuckGo berfungsi tanpa menyimpan kunci API.",
"apiKeyHelp": "Disimpan di config dan ditampilkan tersamarkan setelah disimpan.",
"apiKeyHelp": "Kunci disimpan dalam konfigurasi dan disembunyikan setelah disimpan.",
"baseUrl": "URL dasar",
"baseUrlHelp": "SearXNG memerlukan URL instance Anda sendiri.",
"baseUrlPlaceholder": "https://search.example.com",
@@ -337,14 +416,38 @@
"usage": {
"title": "Aktivitas token",
"shortTitle": "Penggunaan token",
"last30Days": "30 hari terakhir",
"viewDetails": "Lihat detail",
"previousPage": "Halaman sebelumnya",
"nextPage": "Halaman berikutnya",
"dailyAverage": "Rata-rata harian",
"inputTokens": "Token input",
"cacheHitRate": "Rasio cache hit",
"requestTrend": "Permintaan harian",
"cacheRateHelp": "Rasio tidak mencakup input dengan status cache yang tidak diketahui.",
"dailyTrend": "Penggunaan token harian",
"systemHelp": "Mencakup pembuatan judul percakapan, tugas internal lainnya, dan panggilan yang sumbernya tidak tercatat.",
"bySource": "Penggunaan berdasarkan sumber",
"byModel": "Penggunaan per model",
"modelTrend": "Tren penggunaan model",
"modelsUnavailable": "Rincian per model tidak tersedia.",
"otherModels": "Lainnya / belum dikategorikan",
"unclassified": "Tidak dikategorikan",
"unavailable": "Data penggunaan tidak tersedia.",
"noActivity": "Tidak ada penggunaan token dalam 30 hari terakhir.",
"cachedInput": "Input tersedia di cache",
"cacheMiss": "Input tidak ada di cache",
"cacheUnknown": "Status cache tidak diketahui",
"outputTokens": "Output",
"otherTokens": "Token lainnya",
"subtitle": "Penggunaan yang dilaporkan penyedia selama 12 bulan terakhir.",
"empty": "Aktivitas token akan muncul setelah balasan model baru.",
"totalTokens": "Total token",
"peakTokens": "Puncak token",
"peakTokens": "Penggunaan token tertinggi",
"thirtyDayTokens": "Token 30 hari",
"currentStreak": "Rentetan saat ini",
"longestStreak": "Rentetan terpanjang",
"daysValue": "{{count}} h",
"currentStreak": "Penggunaan berturut-turut saat ini",
"longestStreak": "Penggunaan berturut-turut terlama",
"daysValue": "{{count}} hari",
"last30": "30 hari",
"activeDays": "Hari aktif",
"requests": "Permintaan",
@@ -355,8 +458,8 @@
"user": "Chat",
"api": "API",
"cron": "Otomasi",
"dream": "Memori",
"system": "Sistem"
"dream": "Penataan memori",
"system": "Panggilan pendukung"
}
},
"providers": {
@@ -372,11 +475,11 @@
"saveAdvancedBeforeSignIn": "Simpan perubahan lanjutan sebelum masuk.",
"apiType": "Jenis API",
"proxy": "Proksi jaringan",
"thinkingStyle": "Gaya penalaran",
"thinkingStyle": "Format parameter penalaran",
"region": "Wilayah",
"profile": "Profil",
"profile": "Profil AWS",
"extraHeaders": "Header tambahan",
"extraBody": "Body tambahan",
"extraBody": "Kolom tambahan pada isi permintaan",
"extraQuery": "Parameter kueri tambahan",
"capabilityFastMode": "Mode cepat",
"capabilityFastModeHelp": "Gunakan tingkat layanan prioritas OpenAI agar respons lebih cepat. Kredit akan terpakai lebih cepat.",
@@ -398,17 +501,17 @@
"missingCredential": "Konfigurasikan penyedia ini sebelum mengaktifkan pembuatan gambar."
},
"capabilities": {
"providerSupport": "Dukungan penyedia",
"providerInstallOnSave": "Dukungan yang diperlukan akan dipasang otomatis saat Anda menyimpan penyedia ini.",
"searchSupport": "Dukungan penyedia pencarian",
"searchInstallOnSave": "Dukungan Olostep akan dipasang otomatis saat Anda menyimpan.",
"installing": "Memasang dukungan..."
"providerSupport": "Dependensi penyedia",
"providerInstallOnSave": "Paket yang diperlukan akan dipasang otomatis saat penyedia ini disimpan.",
"searchSupport": "Dependensi layanan pencarian",
"searchInstallOnSave": "Paket yang diperlukan Olostep akan dipasang otomatis saat disimpan.",
"installing": "Memasang paket yang diperlukan…"
},
"models": {
"selectModel": "Pilih model",
"addConfiguration": "Tambah konfigurasi",
"newConfiguration": "Konfigurasi model baru",
"newConfigurationHelp": "Simpan penyedia dan model sebagai opsi sekali klik.",
"newConfigurationHelp": "Simpan penyedia dan model agar mudah dipilih kembali.",
"configurationName": "Nama konfigurasi",
"configurationNameHelp": "Ganti nama konfigurasi model tersimpan ini.",
"configurationNamePlaceholder": "Menulis cepat",
@@ -422,7 +525,7 @@
"editPreset": "Ubah prasetel",
"presetName": "Nama prasetel",
"presetNameHelp": "Digunakan di antarmuka dan perintah /model. Nama harus unik.",
"presetNameDuplicate": "Preset dengan nama ini sudah ada.",
"presetNameDuplicate": "Prasetel dengan nama ini sudah ada.",
"presetNamePlaceholder": "mis. Menulis cepat",
"advancedOptions": "Opsi lanjutan",
"advancedSummary": "Konteks {{context}} · Maks. {{max}} token",
@@ -441,21 +544,22 @@
"disabled": "Nonaktif",
"noPresets": "Belum ada prasetel model",
"noPresetsHelp": "Buat prasetel, lalu tambahkan ke urutan pemanggilan.",
"removeBeforeDelete": "Hapus prasetel ini dari urutan pemanggilan sebelum menghapusnya.",
"removeBeforeDelete": "Pilih prasetel utama lain sebelum menghapus prasetel ini.",
"providerSetupRequired": "Penyedia perlu dikonfigurasi",
"configureProviderBeforeSaving": "Konfigurasikan penyedia ini sebelum menyimpan prasetel.",
"deletePresetTitle": "Hapus prasetel model?",
"deletePresetHelp": "Prasetel “{{name}}” akan dihapus. Kredensial penyedia tidak terpengaruh.",
"deletePresetHelp": "Prasetel “{{name}}” akan dihapus, termasuk dari urutan pemanggilan. Kredensial penyedia tetap disimpan.",
"searchModels": "Cari atau ketik ID model",
"useCustomModel": "Gunakan",
"loadingModels": "Memuat model...",
"searchCatalog": "Cari katalog penyedia untuk memilih model.",
"searchCatalog": "Cari model di katalog penyedia.",
"availableCount": "Model tersedia: {{count}}",
"modelsAvailable": "tersedia",
"noModelResults": "Tidak ada model yang cocok.",
"loadFailed": "Daftar model tidak tersedia.",
"unsupportedModelList": "Ketik ID model secara manual.",
"providerNotConfigured": "Konfigurasikan penyedia ini sebelum memuat model.",
"autoProviderCustomOnly": "Mode penyedia otomatis memakai ID model kustom."
"autoProviderCustomOnly": "Masukkan ID model untuk memilih penyedia secara otomatis."
},
"timezone": {
"select": "Pilih zona waktu",
@@ -464,7 +568,11 @@
},
"cliApps": {
"allCategories": "Semua kategori",
"availableCount_one": "{{count}} aplikasi",
"availableCount_other": "{{count}} aplikasi",
"availableCount": "{{count}} aplikasi",
"installedCount_one": "{{count}} alat CLI terpasang",
"installedCount_other": "{{count}} alat CLI terpasang",
"installedCount": "{{count}} terpasang",
"summary": "{{installed}} dari {{total}} CLI terpasang",
"filterAll": "Semua",
@@ -473,7 +581,7 @@
"searchPlaceholder": "Cari CLI",
"statusInstalled": "Terpasang",
"statusAvailable": "Tersedia",
"statusMissing": "Dependensi hilang",
"statusMissing": "Dependensi belum terpasang",
"statusUnsupported": "Tidak didukung",
"statusNotInstalled": "Belum terpasang",
"unsupported": "Tidak didukung",
@@ -494,6 +602,9 @@
"noDescription": "Tidak ada deskripsi."
},
"about": {
"documentation": "Dokumentasi",
"sourceCode": "Kode sumber",
"reportIssue": "Laporkan masalah",
"version": "Versi",
"checking": "Memeriksa pembaruan...",
"checkForUpdates": "Periksa pembaruan",
@@ -520,18 +631,20 @@
"authNone": "Tidak ada",
"authHeaders": "Header",
"command": "Perintah",
"args": "Argumen JSON",
"headers": "Header JSON",
"args": "Argumen (JSON)",
"headers": "Header (JSON)",
"oauthAfterSave": "Simpan server, lalu pilih Hubungkan untuk masuk.",
"headersHelp": "Tambahkan header permintaan yang digunakan server ini.",
"env": "Lingkungan JSON",
"timeout": "Batas waktu alat",
"env": "Variabel lingkungan (JSON)",
"timeout": "Batas waktu alat (detik)",
"advancedOptions": "Opsi lanjutan",
"hideAdvanced": "Sembunyikan lanjutan",
"saveCustom": "Simpan MCP",
"hideAdvanced": "Sembunyikan opsi lanjutan",
"saveCustom": "Simpan server",
"configImport": "Impor mcp.json",
"importConfig": "Impor",
"restartRequired": "Mulai ulang nanobot untuk menyambungkan alat MCP yang diperbarui.",
"toolsFound_one": "{{count}} alat",
"toolsFound_other": "{{count}} alat",
"toolsFound": "{{count}} alat",
"loading": "Memuat prasetel MCP...",
"empty": "Tidak ada prasetel MCP yang cocok dengan filter ini.",
@@ -568,7 +681,7 @@
"connectionCancelled": "Koneksi dibatalkan.",
"reloadFailed": "Anda sudah masuk, tetapi nanobot tidak dapat menghubungkan alat. Coba mulai ulang nanobot.",
"oauthFailed": "Tidak dapat terhubung. Coba masuk lagi.",
"statusMissingDependency": "Butuh dependensi",
"statusMissingDependency": "Dependensi belum terpasang",
"statusComingSoon": "Segera hadir",
"comingSoon": "Segera hadir",
"statusNotInstalled": "Tidak aktif",
@@ -596,7 +709,7 @@
"toolScope": "Alat",
"allTools": "Aktifkan semua",
"noTools": "Nonaktifkan semua",
"reloadTools": "Muat ulang alat",
"reloadTools": "Perbarui daftar alat",
"presetDescriptions": {
"browserbase": "Otomatiskan browser cloud dengan Browserbase.",
"playwright": "Periksa dan otomatiskan browser lokal dengan Playwright.",
@@ -623,11 +736,11 @@
"localHelp": "Hanya perangkat ini yang dapat terhubung.", "networkHelp": "Perangkat lain dapat terhubung; kunci API diperlukan.",
"port": "Port", "portHelp": "API menggunakan port lokal ini.", "apiKey": "Kunci API", "apiKeyHelp": "Klien mengirimkannya sebagai token Bearer.",
"apiKeyRequired": "Wajib sebelum membuka API ke jaringan.", "apiKeyPlaceholder": "Masukkan kunci API",
"autoInstall": "Dukungan API akan dipasang otomatis saat dimulai."
"autoInstall": "Paket yang diperlukan server API akan dipasang otomatis saat server dimulai."
},
"observability": {
"title": "Observabilitas", "configured": "Kredensial tracing tersedia untuk nanobot.",
"environment": "Atur LANGFUSE_SECRET_KEY dan LANGFUSE_PUBLIC_KEY, lalu mulai ulang nanobot.", "enable": "Aktifkan dukungan tracing"
"title": "Observabilitas", "configured": "Kredensial pelacakan sudah tersedia untuk nanobot.",
"environment": "Atur LANGFUSE_SECRET_KEY dan LANGFUSE_PUBLIC_KEY, lalu mulai ulang nanobot.", "enable": "Aktifkan pelacakan"
},
"legal": {
"thirdPartyBrands": "Nama produk, logo, dan merek adalah milik pemiliknya masing-masing. Penggunaan hanya untuk identifikasi dan tidak menyiratkan dukungan."
@@ -659,8 +772,8 @@
"restartRequired": "Mulai ulang nanobot untuk menerapkan aplikasi dan alat MCP yang diperbarui."
},
"channels": {
"description": "Hubungkan nanobot ke aplikasi chat. Memasang dukungan hanya menambahkan paket integrasi; sebagian besar kanal tetap memerlukan token atau pengaturan ruang kerja.",
"caption": "{{enabled}} aktif · {{total}} kanal",
"description": "Hubungkan nanobot ke aplikasi chat. Setelah memasang paket integrasi, lengkapi kredensial dan pengaturan untuk setiap platform.",
"caption": "{{enabled}} berjalan · {{total}} kanal",
"searchPlaceholder": "Cari kanal",
"backToChannels": "Semua kanal",
"catalog": "Kanal",
@@ -670,7 +783,7 @@
"requires": "Memerlukan: {{requirements}}",
"setUp": "Siapkan",
"setupGuide": "Panduan penyiapan",
"setupSummary": "Mengaktifkan hanya menyalakan dukungan nanobot. Tambahkan kredensial platform, lalu mulai ulang nanobot.",
"setupSummary": "Aktifkan kanal, tambahkan kredensial platform, lalu mulai ulang nanobot.",
"configKeys": "Kunci konfigurasi",
"enable": "Aktifkan kanal",
"disable": "Nonaktifkan kanal",
@@ -687,15 +800,17 @@
"checkOnly": "Periksa saja",
"commandCopied": "Perintah disalin.",
"commandCopyFailed": "Tidak dapat menyalin perintah.",
"configuredInstances_one": "{{count}} instans dikonfigurasi",
"configuredInstances_other": "{{count}} instans dikonfigurasi",
"configuredInstances": "{{count}} instans dikonfigurasi",
"connectPreview": "Langkah berikutnya adalah koneksi di browser. Untuk saat ini, jalankan perintah di bawah.",
"copyCommand": "Salin perintah",
"filterAll": "Semua",
"filterOff": "Nonaktif",
"filterOn": "Aktif",
"filterOff": "Berhenti",
"filterOn": "Berjalan",
"helperCopied": "{{name}} disalin.",
"helperCopyFailed": "Tidak dapat menyalin {{name}}.",
"hideSecret": "Sembunyikan rahasia",
"hideSecret": "Sembunyikan kredensial",
"instanceConfigured": "Dikonfigurasi",
"instanceNeedsSetup": "Perlu penyiapan",
"runtimeFailed": "Gagal dimulai",
@@ -707,14 +822,14 @@
"providerPreset": "Penyedia",
"requiredSetup": "Penyiapan wajib",
"savedSecret": "Tersimpan",
"savedSecretPlaceholder": "Rahasia tersimpan",
"savedSecretPlaceholder": "Kredensial tersimpan",
"savedSettings": "Pengaturan disimpan.",
"saveSettings": "Simpan pengaturan",
"selectChannel": "Lihat pengaturan {{name}}",
"setupSteps": "Langkah berikutnya",
"showSecret": "Tampilkan rahasia",
"toggleChannel": "Kanal {{name}}",
"toggleInstance": "Instans {{name}}",
"showSecret": "Tampilkan kredensial",
"toggleChannel": "Aktifkan {{name}}",
"toggleInstance": "Aktifkan instans {{name}}",
"tryIt": "Coba",
"validationFailed": "Periksa penyiapan wajib sebelum mengaktifkan.",
"validation": {
@@ -730,10 +845,10 @@
"enable": "Aktifkan",
"disable": "Nonaktifkan",
"ready": "Siap",
"missingDependency": "Dukungan belum terpasang",
"installSupport": "Instal dukungan",
"installConfirmTitle": "Instal dukungan untuk {{name}}?",
"installConfirmDescription": "nanobot akan menambahkan yang dibutuhkan {{name}}, lalu mengaktifkannya. Lanjutkan?",
"missingDependency": "Paket yang diperlukan belum terpasang",
"installSupport": "Pasang paket yang diperlukan",
"installConfirmTitle": "Pasang paket yang diperlukan {{name}}?",
"installConfirmDescription": "nanobot akan memasang paket yang diperlukan, lalu mengaktifkan {{name}}.",
"installConfirmAction": "Instal dan aktifkan",
"websocketRequired": "Wajib untuk WebUI",
"channelDisabled": "Kanal dinonaktifkan",
@@ -748,8 +863,8 @@
"system": "Sistem"
},
"sort": {
"next": "Jalankan berikutnya",
"last": "Jalankan terakhir",
"next": "Waktu eksekusi berikutnya",
"last": "Waktu eksekusi terakhir",
"updated": "Diperbarui",
"name": "Nama"
},
@@ -762,7 +877,7 @@
"emptyAction": "Buka chat",
"clearFilters": "Hapus filter",
"oneShot": "Satu kali",
"systemTask": "Automasi yang dikelola sistem",
"systemTask": "Otomasi yang dikelola sistem",
"localTrigger": "Pemicu lokal",
"labels": {
"schedule": "Jadwal",
@@ -782,7 +897,7 @@
"commandCopied": "Disalin",
"copyCommand": "Salin",
"deleteTitle": "Hapus otomasi",
"deleteDescription": "Ini menghapus {{name}} dari penyimpanan cron. Pesan chat sebelumnya tetap ada di sesi.",
"deleteDescription": "Otomasi “{{name}}” akan dihapus. Pesan sebelumnya tetap tersimpan dalam percakapan.",
"cancel": "Batal",
"status": {
"system": "Sistem",
@@ -821,9 +936,9 @@
"cronWithTz": "Cron {{expr}} · {{tz}}",
"withTz": "{{summary}} · {{tz}}",
"dailyAt": "Setiap hari pukul {{time}}",
"weekdaysAt": "Hari kerja pukul {{time}}",
"hourlyAt": "Setiap jam pada :{{minute}}",
"hourlyWindow": "Setiap jam {{start}}-{{end}} pada :{{minute}}",
"weekdaysAt": "Senin–Jumat pukul {{time}}",
"hourlyAt": "Setiap jam pada menit {{minute}}",
"hourlyWindow": "Setiap jam dari {{start}} hingga {{end}}, pada menit {{minute}}",
"local": "Pemicu lokal",
"custom": "Jadwal khusus"
},
@@ -875,7 +990,7 @@
"signInAgain": "Masuk lagi",
"signOut": "Keluar",
"signedInAs": "Masuk sebagai {{account}}",
"signInHelp": "Masuk dari perangkat ini; kunci API tidak disimpan di config.",
"signInHelp": "Masuk dari perangkat ini. Kunci API tidak disimpan dalam konfigurasi.",
"remoteSignInHelp": "Pilih Masuk untuk membuka xAI di komputer Anda, lalu tempel kode otorisasi yang ditampilkan setelah masuk.",
"codexRemoteSignInHelp": "Masuk melalui browser ini, lalu tempel URL callback localhost lengkap kembali ke nanobot.",
"signInRequired": "Perlu masuk",
@@ -898,7 +1013,7 @@
"finishSignIn": "Selesaikan masuk"
},
"skills": {
"description": "Tinjau keterampilan instruksi yang dapat dimuat agen ini selama percakapan.",
"description": "Kelola keterampilan yang dapat digunakan agen selama percakapan.",
"caption": "{{available}} tersedia · {{total}} total",
"views": "Tampilan keterampilan",
"installedTab": "Terpasang",
@@ -975,11 +1090,11 @@
"noRequirements": "Tidak ada kebutuhan eksplisit.",
"commands": "Perintah",
"environment": "Variabel lingkungan",
"missingCommands": "CLI hilang",
"missingEnvironment": "ENV hilang",
"missingCommands": "Alat baris perintah belum tersedia",
"missingEnvironment": "Variabel lingkungan belum diatur",
"unavailableReasonLabel": "Alasan tidak tersedia",
"rawInstructions": "SKILL.md mentah",
"rawInstructionsEmpty": "Tidak ada instruksi mentah.",
"rawInstructions": "Isi SKILL.md",
"rawInstructionsEmpty": "Tidak ada instruksi.",
"detailDescription": "Detail untuk {{name}}."
},
"voice": {
+209 -94
View File
@@ -25,6 +25,7 @@
"system": {
"section": "システム",
"restartHint": "実行時の変更を適用するには nanobot を再起動します。",
"restartAction": "再起動",
"restart": "nanobot を再起動",
"restarting": "再起動中...",
"restartEngine": "エンジンを再起動",
@@ -60,6 +61,7 @@
"closeAction": "一時チャット「{{title}}」を閉じる"
},
"sidebar": {
"resize": "サイドバーの幅を変更",
"navigation": "サイドバーのナビゲーション",
"collapse": "サイドバーを閉じる",
"newChat": "新しいトピック",
@@ -80,12 +82,92 @@
}
},
"settings": {
"timezoneNoMatches": "一致するタイムゾーンがありません。",
"configure": "設定",
"exit": {
"title": "設定を閉じる前に nanobot を再起動しますか?",
"description": "変更は保存されています。反映するには再起動してください。",
"later": "後で再起動"
},
"runtimeConfig": {
"apiSaved": "保存しました。API サービスを再起動すると反映されます。",
"fields": {
"agents_defaults_timezone_mode": {"label": "システムのタイムゾーンを使用", "help": "オフにすると手動でタイムゾーンを選択できます。"},
"agents_defaults_timezone": {"label": "タイムゾーン", "help": "タイムゾーンを選択します。UTC との時差は現在の日付に基づきます。"},
"agents_defaults_dream_enabled": {"label": "記憶の整理", "help": "会話の有用な情報を自動で整理します。オフにしても既存の記憶は使用できます。"},
"gateway_heartbeat_enabled": {"label": "定期チェック", "help": "HEARTBEAT.md のタスクを定期的に確認します。"},
"gateway_heartbeat_interval_s": {"label": "チェック間隔(秒)", "help": "ゲートウェイの起動時に定期チェックを予約します。"},
"agents_defaults_max_tool_iterations": {"label": "1 ターンのモデル・ツール間のやり取り上限", "help": "1 ターンでモデルとツールがやり取りする回数の上限です。"},
"agents_defaults_max_concurrent_subagents": {"label": "サブエージェントの同時実行上限", "help": "同時に実行するサブエージェントの最大数です。"},
"agents_defaults_max_tool_result_chars": {"label": "ツール結果の長さ(文字)", "help": "モデルのコンテキストに含めるツール出力を制限します。"},
"agents_defaults_provider_retry_mode": {"label": "モデルへのリクエストを継続的に再試行", "help": "モデルへのリクエストが一時的なエラーで失敗した場合、成功するまで再試行します。オフにすると再試行回数を制限します。"},
"agents_defaults_tool_hint_max_length": {"label": "ツールの動作説明の長さ(文字)", "help": "ツールの動作を簡潔に表示する説明文の最大文字数です。"},
"tools_max_session_messages_per_minute": {"label": "ツールのメッセージ上限(毎分)", "help": "ツールが会話にメッセージを送信する頻度を制限します。"},
"agents_defaults_unified_session": {"label": "プラットフォーム間で会話を共有", "help": "1 人のユーザーが複数のチャットプラットフォームで同じ会話を使用します。"},
"tools_exec_enable": {"label": "シェルツール", "help": "エージェントによるシェルコマンドの実行を許可します。"},
"tools_file_enable": {"label": "ファイルツール", "help": "組み込みのファイル読み取り・編集ツールを許可します。"},
"tools_web_enable": {"label": "ウェブツール", "help": "ウェブ検索とページ取得を許可します。"},
"tools_cli_apps_enable": {"label": "CLI アプリツール", "help": "エージェントによる CLI アプリの管理と実行を許可します。"},
"tools_my_enable": {"label": "自己管理ツール", "help": "エージェントが自身の設定を確認できるようにします。"},
"tools_my_allow_set": {"label": "エージェントによる設定変更", "help": "自己管理ツールによる設定の更新を許可します。"},
"tools_exec_timeout": {"label": "コマンドのタイムアウト(秒)", "help": "シェルコマンドの実行時間の上限。0 は無制限です。"},
"tools_exec_path_prepend": {"label": "優先する検索パス", "help": "PATH の先頭に追加するディレクトリです。Windows ではセミコロン、macOS と Linux ではコロンで区切ります。"},
"tools_exec_path_append": {"label": "追加の検索パス", "help": "PATH の末尾に追加するディレクトリです。Windows ではセミコロン、macOS と Linux ではコロンで区切ります。"},
"tools_exec_sandbox": {"label": "コマンドサンドボックス", "help": "Linux では bwrap、macOS では Seatbelt を使用します。ワークスペースの検査だけではプロセスは隔離されません。"},
"tools_exec_sandbox_ro_binds": {"label": "読み取り専用のサンドボックスパス", "help": "読み取り専用で追加マウントするパス。1 行に 1 つ指定します。"},
"tools_exec_sandbox_rw_binds": {"label": "書き込み可能なサンドボックスパス", "help": "書き込み可能で追加マウントするパス。1 行に 1 つ指定します。"},
"tools_exec_allowed_env_keys": {"label": "許可する環境変数", "help": "コマンドに渡す環境変数を追加します。1 行に 1 つ指定してください。動作に必要な基本の環境変数は引き続き渡されます。"},
"tools_exec_allow_patterns": {"label": "許可するコマンドのパターン", "help": "1 行に 1 つ正規表現を指定します。設定すると、コマンドの各部分がいずれかのルールに完全一致する場合のみ実行できます。許可されたコマンドには組み込み・追加の禁止ルールを適用しませんが、ネットワークとワークスペースの制限は適用されます。"},
"tools_exec_deny_patterns": {"label": "禁止するコマンドのパターン", "help": "追加の禁止ルールを正規表現で 1 行に 1 つ指定します。明示的な許可ルールは、組み込み・追加の禁止ルールより優先されます。"},
"tools_web_proxy": {"label": "ウェブプロキシ", "help": "ウェブツール用のプロキシ URL。空欄の場合は既定のネットワークを使用します。"},
"tools_web_user_agent": {"label": "User-Agent ヘッダー", "help": "カスタムの User-Agent ヘッダー。空欄の場合は既定値を使用します。"},
"tools_restrict_to_workspace": {"label": "ツールをワークスペース内に制限", "help": "ツール全体のアクセス方針です。WebUI の会話ごとの権限は別途設定します。"},
"tools_ssrf_whitelist": {"label": "許可するプライベートネットワーク", "help": "送信リクエストの保護から除外する IP/CIDR 範囲。1 行に 1 つ指定します。"},
"tools_webui_allow_remote_package_install": {"label": "リモートでのパッケージインストール", "help": "リモートの WebUI から追加パッケージやスキルをインストールできるようにします。この設定はゲートウェイを実行しているマシン上で変更する必要があります。"},
"tools_cli_apps_install_timeout": {"label": "インストールのタイムアウト(秒)", "help": "CLI アプリのインストール時間の上限です。"},
"tools_cli_apps_run_timeout": {"label": "実行のタイムアウト(秒)", "help": "CLI アプリのコマンド実行時間の上限です。"},
"tools_cli_apps_catalog_ttl_seconds": {"label": "カタログのキャッシュ期間(秒)", "help": "CLI アプリのカタログをキャッシュする期間です。"},
"gateway_host": {"label": "ゲートウェイの待ち受けアドレス", "help": "ゲートウェイの待ち受けアドレスです。WebSocket と WebUI のアドレスは「チャンネル → WebSocket」で設定します。"},
"gateway_port": {"label": "ゲートウェイのポート", "help": "保存するポート番号。コマンドライン引数が優先されます。"},
"gateway_restart_mode": {"label": "再起動モード", "help": "プロセスの再起動方法。自動モードではホスト環境に応じて選択します。"},
"api_host": {"label": "API の待ち受けアドレス", "help": "localhost 以外のアドレスで待ち受けるには API キーが必要です。「システム」でキーを設定し、API サービスを再起動して変更を反映してください。"},
"api_timeout": {"label": "API リクエストのタイムアウト(秒)", "help": "リクエストの時間制限です。API サービスの再起動後に反映されます。"},
"tools_image_generation_save_dir": {"label": "生成画像の保存先", "help": "nanobot のメディアディレクトリ内の相対パス。既存の画像は移動しません。"}
},
"groups": {
"chat": {"title": "WebUI のチャット権限", "help": "ローカルサービスへのアクセスとチャットの既定の権限。"},
"identity": {"title": "タイムゾーン", "help": "予約タスクのタイムゾーンを選択します。"},
"memory": {"title": "記憶", "help": "記憶の自動整理を有効または無効にします。"},
"heartbeat": {"title": "定期チェックのスケジュール", "help": "組み込みの定期タスクチェックを設定します。"},
"execution": {"title": "エージェントの実行制限", "help": "ツールの実行と再試行の動作。"},
"sessions": {"title": "会話", "help": "プラットフォーム間で会話を共有します。"},
"tools": {"title": "組み込みツール", "help": "許可するツールの種類を選択します。"},
"shell": {"title": "シェルとサンドボックス", "help": "時間制限、環境、マウント、コマンドフィルター。"},
"network": {"title": "ウェブ接続", "help": "プロキシとリクエストの識別情報。"},
"safety": {"title": "全体のアクセス方針", "help": "ワークスペース制限、プライベートネットワーク、リモートインストール。"},
"cli": {"title": "CLI アプリの制限", "help": "インストール、実行、カタログキャッシュの時間制限。"},
"gateway": {"title": "ゲートウェイプロセス", "help": "配置とプロセスの再起動設定。"},
"api": {"title": "API サーバーの詳細", "help": "待ち受けアドレスとリクエストの時間制限。"},
"storage": {"title": "画像の保存", "help": "生成画像の保存場所。"},
"maintenance": {"title": "記憶を整理するタイミング", "help": ""},
"web": {"title": "ウェブアクセス", "help": ""},
"applications": {"title": "コマンドラインアプリ", "help": ""}
},
"save": "変更を保存", "saving": "保存中…", "discard": "変更を破棄", "saved": "保存しました。",
"restart": "nanobot を再起動", "restartHelp": "再起動すると反映されます。コマンドライン引数や環境変数の設定が優先される場合があります。",
"search": "詳細設定を検索", "noResults": "一致する設定はありません。", "pending": "未保存の変更",
"numberError": "許可された範囲内の有効な数値を入力してください。", "activeModel": "現在のモデルを使用", "none": "なし",
"auto": "自動", "manual": "手動", "standard": "標準", "persistent": "継続",
"unavailable": "これらの設定を編集するにはゲートウェイを更新してください。", "advancedOptions": "詳細オプション"
},
"backToChat": "チャットに戻る",
"sidebar": {
"title": "設定",
"ariaLabel": "設定セクション"
},
"nav": {
"about": "nanobot について",
"capabilities": "機能",
"general": "一般",
"byok": "BYOK",
"overview": "概要",
@@ -97,7 +179,8 @@
"browser": "ウェブ",
"channels": "チャンネル",
"runtime": "システム",
"advanced": "セキュリティ",
"advanced": "詳細設定",
"memory": "記憶",
"cliApps": "CLI アプリ",
"mcp": "MCP",
"apps": "アプリ",
@@ -108,21 +191,21 @@
"interface": "インターフェース",
"ai": "AI",
"system": "システム",
"about": "情報",
"about": "nanobot について",
"status": "状態",
"localPreferences": "ローカル設定",
"localPreferences": "このブラウザーの設定",
"presets": "プリセット",
"imageGeneration": "画像生成",
"imageDefaults": "既定値",
"webSearch": "ウェブ検索",
"webBehavior": "動作",
"webBehavior": "ウェブページの取得",
"regional": "地域",
"webuiSafety": "WebUI の安全性",
"capabilities": "機能",
"cliApps": "CLI アプリ",
"mcp": "MCP サービス",
"apps": "アプリ",
"nativeHost": "ネイティブホスト",
"nativeHost": "デスクトップアプリ",
"hostSafety": "アプリの安全性",
"voiceInput": "音声入力"
},
@@ -132,28 +215,27 @@
"provider": "プロバイダー",
"model": "モデル",
"restart": "nanobot を再起動",
"configPath": "設定パス",
"configPath": "設定ファイル",
"activePreset": "アクティブなプリセット",
"gateway": "ゲートウェイ",
"restartState": "再起動状態",
"pendingChanges": "保留中の変更",
"selectedPreset": "選択中のプリセット",
"presetModel": "プリセットモデル",
"density": "表示密度",
"activityMode": "アクティビティ詳細",
"fileEditDisplay": "ファイル編集表示",
"activityMode": "動作状況の表示",
"fileEditDisplay": "ファイル変更の表示形式",
"codeWrap": "コードの折り返し",
"maxResults": "最大結果数",
"timeout": "タイムアウト",
"jinaReader": "Jina リーダー",
"jinaReader": "Jina Reader",
"imageGeneration": "画像生成",
"imageProvider": "画像プロバイダー",
"imageProviderStatus": "プロバイダー状態",
"imageProviderBase": "プロバイダー URL",
"imageModel": "画像モデル",
"defaultAspectRatio": "既定の比率",
"defaultAspectRatio": "既定の縦横比",
"defaultImageSize": "既定のサイズ",
"maxImagesPerTurn": "1 ターンの最大画像数",
"maxImagesPerTurn": "1 回のリクエストの最大画像数",
"imageSaveDir": "保存先ディレクトリ",
"timezone": "タイムゾーン",
"workspacePath": "既定のワークスペース",
@@ -181,43 +263,42 @@
"provider": "新しいモデルリクエストに使うプロバイダーを選択します。",
"model": "このプリセットで使用するモデルを選択します。",
"configPath": "現在ゲートウェイが使用している設定ファイルです。",
"selectedPreset": "名前付きプリセットはここでは読み取り専用です。編集するには config.json を変更してください。",
"presetModel": "既定に切り替えると、WebUI からモデルとプロバイダーを編集できます。",
"density": "このブラウザーにのみ保存されます。",
"activityMode": "既定で表示するエージェントアクティビティの詳細量を選択します。",
"fileEditDisplay": "ファイル編集アクティビティを行数または差分で表示します。",
"selectedPreset": "プリセットは「モデル」で管理できます。",
"presetModel": "プロバイダーとモデルは「モデル」で変更できます。",
"activityMode": "エージェントの動作状況をどこまで詳しく表示するか選択します。",
"fileEditDisplay": "ファイルの変更を行数で表示するか、差分で表示するかを選択します。",
"codeWrap": "小さな画面でも長いコード行を読みやすくします。",
"maxResults": "各 web_search 呼び出しで返す結果数です。",
"maxResults": "1 回のウェブ検索で返す結果数の上限です。",
"timeout": "検索プロバイダーのリクエストがタイムアウトするまでの秒数です。",
"jinaReader": "利用可能な場合、web_fetch に Jina Reader を使います。",
"imageGeneration": "画像プロバイダーが設定済みのとき、チャットで generate_image を有効にします。",
"imageProvider": "generate_image で使用する登録済みプロバイダーを選択します。",
"jinaReader": "利用可能な場合、Jina Reader でウェブページの内容を取得します。",
"imageGeneration": "画像プロバイダーを設定すると、エージェントがチャットで画像を生成できるようになります。",
"imageProvider": "画像生成に使用するプロバイダーを選択します。",
"imageProviderStatus": "画像生成はプロバイダー設定の認証情報を再利用します。",
"imageModel": "選択した画像プロバイダーへ送信するモデル名です。",
"defaultAspectRatio": "プロンプトで比率が指定されていない場合に使用します。",
"defaultImageSize": "対応しているプロバイダーへ送信するサイズ指定です。",
"maxImagesPerTurn": "1 回の generate_image リクエストで生成できる画像数の上限です。",
"maxImagesPerTurn": "1 回のリクエストで生成できる画像数の上限です。",
"timezone": "スケジュールと時刻を考慮する返信に使用します。",
"localServiceAccess": "フルアクセスの shell コマンドが localhost サービスにアクセスできるようにします。",
"webuiDefaultAccess": "プロジェクト固有の権限がない Web チャットで使用します。",
"securityManagedControls": "Web 取得は常にローカル、プライベート、メタデータサービスを保護します。コアチャネルの安全性は config.json で管理されます。",
"securityManagedControls": "ウェブツールは、明示的に許可された場合を除き、ローカルサービス、プライベートネットワーク、メタデータサービスへのアクセスをブロックします。その他のチャンネルの安全性に関する設定は config.json で管理します。",
"currentModel": "新しい返信に使用します。",
"selectedModelProvider": "選択したモデルによって設定されます。",
"selectedModelValue": "選択したモデルによって設定されます。",
"brandLogos": "設定で第三者プロバイダーと CLI のロゴを表示します。",
"browserNotifications": "このページがバックグラウンドにある場合のみ通知します。既定ではオフです。",
"cliAppsCatalog": "nanobot がローカルで実行できるアプリ CLI アダプターだけをインストールします。ネイティブアプリは変更しません。",
"cliAppsCatalog": "nanobot がこのマシンで使用できるコマンドラインツールをインストールします。デスクトップアプリは変更しません。",
"cliAppsFilter": "アプリ、カテゴリ、機能で検索します。",
"logs": "ネイティブエンジンのログフォルダーを開きます。",
"diagnostics": "サポート用の小さなランタイムレポートを書き出します。",
"logs": "デスクトップアプリのログフォルダーを開きます。",
"diagnostics": "サポートに送るための診断レポートを書き出します。",
"localServiceAccessNative": "フルアクセスの shell コマンドがこの Mac 上のサービスにアクセスできるようにします。",
"webuiDefaultAccessNative": "プロジェクト固有の権限がないネイティブチャットで使用します。",
"contextWindow": "このモデル設定で使う既定のコンテキスト予算を選択します。",
"transcription": "マイク入力を送信前に文字起こしします。チャネルの音声メッセージも同じ設定を使います。",
"contextWindow": "このモデル設定で使用するコンテキストの上限を選択します。",
"transcription": "マイク入力を送信前に文字起こしします。チャンネルの音声メッセージにも同じ設定を使います。",
"transcriptionProvider": "プロバイダー設定にある対応する認証情報を使います。",
"transcriptionProviderStatus": "APIキーは文字起こし設定ではなくプロバイダー側に保存されます。",
"transcriptionModel": "プロバイダーがカスタムモデルIDを必要としない限り、解決済みのデフォルトのままにします。",
"transcriptionLanguage": "en、zh、ja、ko などの任意の ISO-639 ヒント。"
"transcriptionModel": "通常は既定のモデルを使用します。プロバイダーから別のモデル ID を指定されている場合は変更してください。",
"transcriptionLanguage": "en、zh、ja、ko などの ISO-639 言語コードを指定できます。空欄の場合は自動判定します。"
},
"values": {
"light": "ライト",
@@ -230,8 +311,6 @@
"privateEngine": "プライベートエンジン",
"unixSocket": "Unix ソケット",
"defaultWorkspace": "既定のワークスペース",
"comfortable": "標準",
"compact": "コンパクト",
"auto": "自動",
"expanded": "展開",
"default": "既定",
@@ -241,7 +320,7 @@
"on": "オン",
"off": "オフ",
"defaultPermission": "既定の権限",
"fullAccess": "完全アクセス",
"fullAccess": "フルアクセス",
"configured": "設定済み",
"notConfigured": "未設定",
"pending": "保留中",
@@ -257,11 +336,11 @@
"upToDate": "最新です。",
"savedRestart": "保存しました。反映するには nanobot を再起動してください。",
"restartAfterSaving": "変更を保存してから、準備ができたら再起動してください。",
"savedRestartApply": "保存しました。準備ができたら再起動してください。",
"imageProviderRestart": "画像プロバイダーの変更を保存しました。準備ができたら再起動してください。",
"savedRestartApply": "保存しました。変更を反映するには nanobot を再起動してください。",
"imageProviderRestart": "画像プロバイダーの変更を保存しました。反映するには nanobot を再起動してください。",
"hostRestartAfterSaving": "保存すると nanobot がエンジンを再起動します。",
"hostRestartPending": "保存しました。準備ができたらエンジンを再起動します。",
"hostApiUnavailable": "ホスト操作はネイティブアプリ内でのみ利用できます。",
"hostApiUnavailable": "この操作はデスクトップアプリでのみ利用できます。",
"logsOpened": "ログフォルダーを開きました。",
"logsOpenFailed": "ログフォルダーを開けませんでした。",
"diagnosticsExported": "診断を {{path}} に書き出しました。",
@@ -291,17 +370,17 @@
"showMore": "さらに {{count}} 件表示",
"showLess": "折りたたむ",
"apiKey": "API キー",
"apiBase": "API ベース",
"apiBase": "API のベース URL",
"apiKeyPlaceholder": "API キーを入力",
"apiKeyConfiguredPlaceholder": "空欄のままなら現在の key を保持",
"configuredKeyHint": "設定済み key",
"apiKeyConfiguredPlaceholder": "空欄の場合は現在のキーを保持",
"configuredKeyHint": "キー設定済み",
"apiBasePlaceholder": "プロバイダーの既定値を使用",
"apiKeyRequired": "このプロバイダーを設定するには API キーが必要です。",
"showApiKey": "API キーを表示",
"hideApiKey": "API キーを隠す",
"noConfiguredProviders": "設定済みプロバイダーがありません",
"configureFirst": "先に BYOK でプロバイダーを設定してください。",
"openByok": "BYOK を開く",
"configureFirst": "先に「プロバイダー」で接続先を設定してください。",
"openByok": "プロバイダーを設定",
"tabs": {
"ariaLabel": "BYOK 認証情報タイプ",
"llm": "LLM",
@@ -309,12 +388,12 @@
},
"webSearch": {
"provider": "検索プロバイダー",
"providerHelp": "Web 検索ツールで使うバックエンドを選択します。",
"providerHelp": "ウェブ検索に使用するサービスを選択します。",
"selectProvider": "プロバイダーを選択",
"credentials": "認証情報",
"noCredentialRequired": "key は不要",
"noCredentialRequired": "API キーは不要",
"noCredentialHelp": "DuckDuckGo は API キーを保存せずに使えます。",
"apiKeyHelp": "config に保存され、保存後はマスク表示されます。",
"apiKeyHelp": "設定に保存され、保存後は伏せ字で表示されます。",
"baseUrl": "ベース URL",
"baseUrlHelp": "SearXNG には自分のインスタンス URL が必要です。",
"baseUrlPlaceholder": "https://search.example.com",
@@ -337,6 +416,30 @@
"usage": {
"title": "トークンアクティビティ",
"shortTitle": "トークン使用量",
"last30Days": "過去30日間",
"viewDetails": "詳細を見る",
"previousPage": "前のページ",
"nextPage": "次のページ",
"dailyAverage": "1日平均",
"inputTokens": "入力トークン",
"cacheHitRate": "キャッシュヒット率",
"requestTrend": "日別リクエスト",
"cacheRateHelp": "キャッシュ状態が不明な入力はヒット率の計算から除外します。",
"dailyTrend": "日別トークン使用量",
"systemHelp": "チャットのタイトル生成などの内部処理や、呼び出し元が記録されていないモデル呼び出しの使用量です。",
"bySource": "利用元別の使用量",
"byModel": "モデル別使用量",
"modelTrend": "モデル別使用量の推移",
"modelsUnavailable": "モデル別の内訳はありません。",
"otherModels": "その他 / 未分類",
"unclassified": "未分類",
"unavailable": "使用量データを取得できません。",
"noActivity": "過去30日間のトークン使用はありません。",
"cachedInput": "キャッシュヒット",
"cacheMiss": "キャッシュミス",
"cacheUnknown": "キャッシュ不明",
"outputTokens": "出力",
"otherTokens": "その他のトークン",
"subtitle": "直近 12 か月にプロバイダーが報告したトークン使用量。",
"empty": "新しいモデル返信の後にトークンアクティビティが表示されます。",
"totalTokens": "累計トークン数",
@@ -356,7 +459,7 @@
"api": "API",
"cron": "自動タスク",
"dream": "メモリ整理",
"system": "システム"
"system": "補助処理"
}
},
"providers": {
@@ -372,12 +475,12 @@
"saveAdvancedBeforeSignIn": "サインインする前に詳細オプションを保存してください。",
"apiType": "API タイプ",
"proxy": "ネットワークプロキシ",
"thinkingStyle": "思考スタイル",
"thinkingStyle": "推論パラメーターの形式",
"region": "リージョン",
"profile": "プロファイル",
"profile": "AWS プロファイル",
"extraHeaders": "追加ヘッダー",
"extraBody": "追加ボディ",
"extraQuery": "追加クエリ",
"extraBody": "リクエスト本文の追加項目",
"extraQuery": "追加クエリパラメーター",
"capabilityFastMode": "高速モード",
"capabilityFastModeHelp": "OpenAI の優先サービス階層を使用して応答を高速化します。クレジットの消費も速くなります。",
"capabilityDeepSeekSearch": "DeepSeek ウェブ検索",
@@ -398,20 +501,20 @@
"missingCredential": "画像生成を有効にする前に、このプロバイダーを設定してください。"
},
"capabilities": {
"providerSupport": "プロバイダーサポート",
"providerInstallOnSave": "このプロバイダーを保存すると、必要なサポートが自動的にインストールされます。",
"searchSupport": "検索プロバイダーサポート",
"searchInstallOnSave": "保存時に Olostep のサポートが自動的にインストールされます。",
"installing": "サポートをインストール中..."
"providerSupport": "プロバイダーの依存パッケージ",
"providerInstallOnSave": "このプロバイダーを保存すると、必要なパッケージが自動的にインストールされます。",
"searchSupport": "検索サービスの依存パッケージ",
"searchInstallOnSave": "保存時に Olostep に必要なパッケージを自動的にインストールします。",
"installing": "必要なパッケージをインストール中…"
},
"models": {
"selectModel": "モデルを選択",
"addConfiguration": "設定を追加",
"newConfiguration": "新しいモデル設定",
"newConfigurationHelp": "プロバイダーとモデルをワンクリックの選択肢として保存します。",
"newConfigurationHelp": "プロバイダーとモデルの組み合わせを保存し、すぐに切り替えられるようにします。",
"configurationName": "設定名",
"configurationNameHelp": "保存済みのモデル設定の名前を変更します。",
"configurationNamePlaceholder": "高速執筆",
"configurationNamePlaceholder": "文章作成用",
"callOrder": "モデル呼び出し順序",
"primary": "プライマリ",
"fallbackNumber": "フォールバック {{number}}",
@@ -423,7 +526,7 @@
"presetName": "プリセット名",
"presetNameHelp": "画面と /model コマンドで使用します。名前は一意である必要があります。",
"presetNameDuplicate": "同じ名前のプリセットがすでに存在します。",
"presetNamePlaceholder": "例:高速執筆",
"presetNamePlaceholder": "例:文章作成用",
"advancedOptions": "詳細オプション",
"advancedSummary": "コンテキスト {{context}} · 最大 {{max}} トークン",
"maxTokens": "最大出力トークン",
@@ -441,21 +544,22 @@
"disabled": "無効",
"noPresets": "モデルプリセットはまだありません",
"noPresetsHelp": "プリセットを作成してから呼び出し順序に追加してください。",
"removeBeforeDelete": "削除する前に、このプリセットを呼び出し順序から外してください。",
"removeBeforeDelete": "削除する前に、別のプリセットをメインに設定してください。",
"providerSetupRequired": "プロバイダーの設定が必要です",
"configureProviderBeforeSaving": "プリセットを保存する前に、このプロバイダーを設定してください。",
"deletePresetTitle": "モデルプリセットを削除しますか?",
"deletePresetHelp": "プリセット「{{name}}」を削除します。プロバイダーの認証情報には影響しません。",
"deletePresetHelp": "プリセット「{{name}}」を削除し、呼び出し順序からも除外します。プロバイダーの認証情報は保持されます。",
"searchModels": "モデル ID を検索または入力",
"useCustomModel": "使用",
"loadingModels": "モデルを読み込んでいます...",
"searchCatalog": "プロバイダーのカタログからモデルを選択します。",
"availableCount": "利用可能なモデル:{{count}}",
"modelsAvailable": "利用可能",
"noModelResults": "一致するモデルはありません。",
"loadFailed": "モデル一覧を利用できません。",
"unsupportedModelList": "モデル ID を手動で入力してください。",
"providerNotConfigured": "モデルを読み込む前にこのプロバイダーを設定してください。",
"autoProviderCustomOnly": "自動プロバイダーモードではカスタムモデル ID を使用します。"
"autoProviderCustomOnly": "プロバイダーを自動で選ぶ場合は、モデル ID を直接入力してください。"
},
"timezone": {
"select": "タイムゾーンを選択",
@@ -464,7 +568,11 @@
},
"cliApps": {
"allCategories": "すべてのカテゴリ",
"availableCount_one": "アプリ {{count}} 件",
"availableCount_other": "アプリ {{count}} 件",
"availableCount": "{{count}} 個のアプリ",
"installedCount_one": "インストール済み CLI:{{count}} 件",
"installedCount_other": "インストール済み CLI:{{count}} 件",
"installedCount": "{{count}} 個インストール済み",
"summary": "{{total}} 個中 {{installed}} 個の CLI がインストール済み",
"filterAll": "すべて",
@@ -494,6 +602,9 @@
"noDescription": "説明はありません。"
},
"about": {
"documentation": "公式ドキュメント",
"sourceCode": "ソースコード",
"reportIssue": "問題を報告",
"version": "バージョン",
"checking": "確認中...",
"checkForUpdates": "アップデートを確認",
@@ -505,7 +616,7 @@
"summary": "{{total}} 個中 {{installed}} 個のプリセットが有効",
"filterAll": "すべて",
"filterInstalled": "有効",
"filterNotInstalled": "未有効",
"filterNotInstalled": "無効",
"searchPlaceholder": "MCP プリセットを検索",
"moreOptions": "MCP サーバーを追加",
"moreOptionsSubtitle": "カスタム MCP サーバーを接続するか、既存の設定をインポートします。",
@@ -520,18 +631,20 @@
"authNone": "なし",
"authHeaders": "ヘッダー",
"command": "コマンド",
"args": "引数 JSON",
"headers": "ヘッダー JSON",
"args": "引数(JSON)",
"headers": "ヘッダー(JSON)",
"oauthAfterSave": "サーバーを保存してから、[接続]を選択してサインインします。",
"headersHelp": "このサーバーで使用するリクエストヘッダーを追加します。",
"env": "環境変数 JSON",
"timeout": "ツールのタイムアウト",
"env": "環境変数(JSON)",
"timeout": "ツールのタイムアウト(秒)",
"advancedOptions": "詳細オプション",
"hideAdvanced": "詳細を隠す",
"saveCustom": "MCP を保存",
"saveCustom": "サーバーを保存",
"configImport": "mcp.json をインポート",
"importConfig": "インポート",
"restartRequired": "更新された MCP ツールに接続するには nanobot を再起動してください。",
"toolsFound_one": "ツール {{count}} 件",
"toolsFound_other": "ツール {{count}} 件",
"toolsFound": "{{count}} 個のツール",
"loading": "MCP プリセットを読み込み中...",
"empty": "この条件に一致する MCP プリセットはありません。",
@@ -571,7 +684,7 @@
"statusMissingDependency": "依存関係が必要",
"statusComingSoon": "近日公開",
"comingSoon": "近日公開",
"statusNotInstalled": "未有効",
"statusNotInstalled": "無効",
"manage": "管理",
"manageTitle": "{{name}} を管理",
"fixConnection": "接続を修復",
@@ -596,7 +709,7 @@
"toolScope": "ツール",
"allTools": "すべて有効化",
"noTools": "すべて無効化",
"reloadTools": "ツールを再読込",
"reloadTools": "ツール一覧を更新",
"presetDescriptions": {
"browserbase": "Browserbase でクラウドブラウザーを自動操作します。",
"playwright": "Playwright でローカルブラウザーを検査・自動操作します。",
@@ -623,11 +736,11 @@
"localHelp": "このデバイスだけが接続できます。", "networkHelp": "他のデバイスも接続できるため API キーが必要です。",
"port": "ポート", "portHelp": "API が使用するローカルポートです。", "apiKey": "API キー", "apiKeyHelp": "クライアントは Bearer トークンとして送信します。",
"apiKeyRequired": "ネットワークに公開する前に必要です。", "apiKeyPlaceholder": "API キーを入力",
"autoInstall": "起動時に API サポートを自動インストールします。"
"autoInstall": "起動時に API サーバーに必要なパッケージを自動的にインストールします。"
},
"observability": {
"title": "可観測性", "configured": "nanobot がトレース認証情報を利用できます。",
"environment": "LANGFUSE_SECRET_KEY と LANGFUSE_PUBLIC_KEY を設定して nanobot を再起動してください。", "enable": "トレースサポートを有効化"
"environment": "LANGFUSE_SECRET_KEY と LANGFUSE_PUBLIC_KEY を設定して nanobot を再起動してください。", "enable": "トレースを有効化"
},
"legal": {
"thirdPartyBrands": "製品名、ロゴ、ブランドはそれぞれの所有者に帰属します。使用は識別のみを目的とし、承認を意味するものではありません。"
@@ -659,8 +772,8 @@
"restartRequired": "更新したアプリと MCP ツールを反映するには nanobot を再起動してください。"
},
"channels": {
"description": "nanobot をチャットアプリに接続します。サポートのインストールは統合パッケージを追加するだけで、多くのチャンネルでは引き続きトークンやワークスペース設定が必要です。",
"caption": "{{enabled}} 件有効 · 全 {{total}} チャンネル",
"description": "nanobot をチャットアプリに接続します。必要なパッケージをインストールした後、各プラットフォームの認証情報やワークスペースを設定してください。",
"caption": "実行中 {{enabled}} 件 · 全 {{total}} チャンネル",
"searchPlaceholder": "チャンネルを検索",
"backToChannels": "すべてのチャンネル",
"catalog": "チャンネル",
@@ -670,7 +783,7 @@
"requires": "必要: {{requirements}}",
"setUp": "設定",
"setupGuide": "設定ガイド",
"setupSummary": "有効化は nanobot 側のサポートをオンにするだけです。プラットフォームの認証情報を追加してから nanobot を再起動してください。",
"setupSummary": "チャンネルを有効にしてプラットフォームの認証情報を設定し、nanobot を再起動してください。",
"configKeys": "設定キー",
"enable": "チャンネルを有効化",
"disable": "チャンネルを無効化",
@@ -687,12 +800,14 @@
"checkOnly": "確認のみ",
"commandCopied": "コマンドをコピーしました。",
"commandCopyFailed": "コマンドをコピーできませんでした。",
"configuredInstances_one": "設定済みインスタンス:{{count}} 件",
"configuredInstances_other": "設定済みインスタンス:{{count}} 件",
"configuredInstances": "{{count}} 個のインスタンスを設定済み",
"connectPreview": "次の手順でブラウザー内接続を行います。今は下のコマンドを実行してください。",
"copyCommand": "コマンドをコピー",
"filterAll": "すべて",
"filterOff": "オフ",
"filterOn": "オン",
"filterOff": "停止中",
"filterOn": "実行中",
"helperCopied": "{{name}} をコピーしました。",
"helperCopyFailed": "{{name}} をコピーできませんでした。",
"hideSecret": "シークレットを隠す",
@@ -713,8 +828,8 @@
"selectChannel": "{{name}} の設定を表示",
"setupSteps": "次の手順",
"showSecret": "シークレットを表示",
"toggleChannel": "{{name}} チャンネル",
"toggleInstance": "{{name}} インスタンス",
"toggleChannel": "{{name}} を有効にする",
"toggleInstance": "インスタンス {{name}} を有効にする",
"tryIt": "試してみる",
"validationFailed": "有効化する前に必要な設定を確認してください。",
"validation": {
@@ -730,19 +845,19 @@
"enable": "有効化",
"disable": "無効化",
"ready": "準備完了",
"missingDependency": "サポート不足",
"installSupport": "サポートをインストール",
"installConfirmTitle": "{{name}} のサポートをインストールしますか?",
"installConfirmDescription": "nanobot が {{name}} に必要なものを追加し、その後有効化します。続けますか?",
"missingDependency": "必要なパッケージが未インストール",
"installSupport": "必要なパッケージをインストール",
"installConfirmTitle": "{{name}} に必要なパッケージをインストールしますか?",
"installConfirmDescription": "nanobot が必要なパッケージをインストールし、{{name}} を有効にします。",
"installConfirmAction": "インストールして有効化",
"websocketRequired": "WebUI に必須",
"channelDisabled": "チャンネルは無効",
"notEnabled": "未有効"
"notEnabled": "無効"
},
"automations": {
"filters": {
"all": "すべて",
"active": "実行中",
"active": "有効",
"paused": "一時停止",
"failed": "要対応",
"system": "システム"
@@ -758,7 +873,7 @@
"loading": "自動タスクを読み込み中...",
"noMatches": "この表示に一致する自動タスクはありません。",
"empty": "自動タスクはまだありません。",
"emptyHint": "正しいコンテキストを保持するには、チャットで自動化を作成してください。",
"emptyHint": "チャットで自動タスクを作成すると、その会話の内容を引き継いで実行できます。",
"emptyAction": "チャットを開く",
"clearFilters": "フィルターをクリア",
"oneShot": "一回限り",
@@ -782,7 +897,7 @@
"commandCopied": "コピーしました",
"copyCommand": "コピー",
"deleteTitle": "自動タスクを削除",
"deleteDescription": "{{name}} を cron ストアから削除します。過去のチャットメッセージはセッションに残ります。",
"deleteDescription": "自動タスク「{{name}}」を削除します。これまでのメッセージはチャットに残ります。",
"cancel": "キャンセル",
"status": {
"system": "システム",
@@ -791,7 +906,7 @@
"failed": "失敗",
"completed": "完了",
"noSchedule": "スケジュールなし",
"active": "実行中"
"active": "有効"
},
"origin": {
"system": "システム",
@@ -821,9 +936,9 @@
"cronWithTz": "Cron {{expr}} · {{tz}}",
"withTz": "{{summary}} · {{tz}}",
"dailyAt": "毎日 {{time}}",
"weekdaysAt": "平日 {{time}}",
"hourlyAt": "毎時 :{{minute}}",
"hourlyWindow": "{{start}}-{{end}} の毎時 :{{minute}}",
"weekdaysAt": "月曜日〜金曜日 {{time}}",
"hourlyAt": "毎時 {{minute}} 分",
"hourlyWindow": "{{start}}〜{{end}} の毎時 {{minute}} 分",
"local": "ローカルトリガー",
"custom": "カスタムスケジュール"
},
@@ -898,7 +1013,7 @@
"finishSignIn": "サインインを完了"
},
"skills": {
"description": "このエージェントが会話中に読み込める指示スキルを確認します。",
"description": "エージェントが会話中に使用できるスキルを管理します。",
"caption": "{{available}} 利用可能 · 合計 {{total}}",
"views": "スキル表示",
"installedTab": "インストール済み",
@@ -975,11 +1090,11 @@
"noRequirements": "明示的な要件はありません。",
"commands": "コマンド",
"environment": "環境変数",
"missingCommands": "CLI 不足",
"missingEnvironment": "ENV 不足",
"missingCommands": "不足しているコマンドラインツール",
"missingEnvironment": "未設定の環境変数",
"unavailableReasonLabel": "利用不可の理由",
"rawInstructions": "元の SKILL.md",
"rawInstructionsEmpty": "元の説明はありません。",
"rawInstructions": "SKILL.md の内容",
"rawInstructionsEmpty": "指示はありません。",
"detailDescription": "{{name}} の詳細。"
},
"voice": {
+270 -155
View File
@@ -25,6 +25,7 @@
"system": {
"section": "시스템",
"restartHint": "런타임 변경 사항을 적용하려면 nanobot을 다시 시작하세요.",
"restartAction": "다시 시작",
"restart": "nanobot 다시 시작",
"restarting": "다시 시작 중...",
"restartEngine": "엔진 다시 시작",
@@ -60,6 +61,7 @@
"closeAction": "임시 채팅 닫기: {{title}}"
},
"sidebar": {
"resize": "사이드바 너비 조절",
"navigation": "사이드바 탐색",
"collapse": "사이드바 접기",
"newChat": "새 주제",
@@ -80,24 +82,105 @@
}
},
"settings": {
"timezoneNoMatches": "일치하는 시간대가 없습니다.",
"configure": "설정",
"exit": {
"title": "설정을 닫기 전에 nanobot을 다시 시작할까요?",
"description": "변경 사항이 저장되었습니다. 적용하려면 다시 시작하세요.",
"later": "나중에 다시 시작"
},
"runtimeConfig": {
"apiSaved": "저장했습니다. API 서비스를 다시 시작하면 적용됩니다.",
"fields": {
"agents_defaults_timezone_mode": {"label": "시스템 시간대 사용", "help": "끄면 시간대를 직접 선택할 수 있습니다."},
"agents_defaults_timezone": {"label": "시간대", "help": "시간대를 선택하세요. UTC 시차는 현재 날짜를 기준으로 표시됩니다."},
"agents_defaults_dream_enabled": {"label": "기억 정리", "help": "대화의 유용한 정보를 자동으로 정리합니다. 꺼도 기존 기억은 계속 사용합니다."},
"gateway_heartbeat_enabled": {"label": "주기적 확인", "help": "HEARTBEAT.md의 작업을 주기적으로 확인합니다."},
"gateway_heartbeat_interval_s": {"label": "확인 간격(초)", "help": "게이트웨이가 시작될 때 기본 주기적 확인을 예약합니다."},
"agents_defaults_max_tool_iterations": {"label": "턴당 도구 반복 한도", "help": "한 턴에서 모델과 도구가 상호작용하는 최대 횟수입니다."},
"agents_defaults_max_concurrent_subagents": {"label": "동시 하위 에이전트 한도", "help": "동시에 실행할 수 있는 하위 에이전트 수입니다."},
"agents_defaults_max_tool_result_chars": {"label": "도구 결과 길이(문자)", "help": "모델 컨텍스트에 포함되는 도구 출력의 길이를 제한합니다."},
"agents_defaults_provider_retry_mode": {"label": "모델 요청 계속 재시도", "help": "일시적인 오류로 모델 요청이 실패하면 계속 재시도합니다. 끄면 재시도 횟수를 제한합니다."},
"agents_defaults_tool_hint_max_length": {"label": "도구 안내 길이(문자)", "help": "도구 활동을 나타내는 짧은 안내의 최대 길이입니다."},
"tools_max_session_messages_per_minute": {"label": "도구 메시지 한도(분당)", "help": "도구가 대화에 메시지를 보내는 빈도를 제한합니다."},
"agents_defaults_unified_session": {"label": "플랫폼 간 대화 공유", "help": "한 사용자가 여러 채팅 플랫폼에서 같은 대화를 사용합니다."},
"tools_exec_enable": {"label": "셸 도구", "help": "에이전트의 셸 명령 실행을 허용합니다."},
"tools_file_enable": {"label": "파일 도구", "help": "기본 파일 읽기 및 편집 도구를 허용합니다."},
"tools_web_enable": {"label": "웹 도구", "help": "웹 검색과 페이지 가져오기를 허용합니다."},
"tools_cli_apps_enable": {"label": "CLI 앱 도구", "help": "에이전트의 CLI 앱 관리와 실행을 허용합니다."},
"tools_my_enable": {"label": "자체 관리 도구", "help": "에이전트가 자신의 설정을 확인하도록 허용합니다."},
"tools_my_allow_set": {"label": "에이전트의 설정 변경", "help": "자체 관리 도구의 설정 수정을 허용합니다."},
"tools_exec_timeout": {"label": "명령 제한 시간(초)", "help": "셸 명령의 최대 실행 시간입니다. 0은 무제한입니다."},
"tools_exec_path_prepend": {"label": "우선 검색 경로", "help": "PATH 앞에 추가할 디렉터리입니다. Windows에서는 세미콜론, macOS와 Linux에서는 콜론으로 구분하세요."},
"tools_exec_path_append": {"label": "추가 검색 경로", "help": "PATH 뒤에 추가할 디렉터리입니다. Windows에서는 세미콜론, macOS와 Linux에서는 콜론으로 구분하세요."},
"tools_exec_sandbox": {"label": "명령 샌드박스", "help": "Linux에서는 bwrap, macOS에서는 Seatbelt를 사용합니다. 작업 공간 검사만으로는 프로세스가 격리되지 않습니다."},
"tools_exec_sandbox_ro_binds": {"label": "샌드박스 읽기 전용 경로", "help": "읽기 전용으로 추가 마운트할 경로를 한 줄에 하나씩 입력하세요."},
"tools_exec_sandbox_rw_binds": {"label": "샌드박스 쓰기 가능 경로", "help": "쓰기를 허용하여 추가 마운트할 경로를 한 줄에 하나씩 입력하세요."},
"tools_exec_allowed_env_keys": {"label": "허용할 환경 변수", "help": "명령에 전달할 환경 변수를 추가합니다. 한 줄에 하나씩 입력하세요. 실행에 필요한 기본 환경 변수는 계속 전달됩니다."},
"tools_exec_allow_patterns": {"label": "허용할 명령 패턴", "help": "정규식을 한 줄에 하나씩 입력하세요. 규칙을 추가하면 명령의 각 부분이 규칙 중 하나와 완전히 일치해야 실행됩니다. 허용된 명령에는 기본 및 추가 차단 규칙이 적용되지 않지만, 네트워크와 작업 공간 제한은 유지됩니다."},
"tools_exec_deny_patterns": {"label": "차단할 명령 패턴", "help": "추가 차단 정규식을 한 줄에 하나씩 입력하세요. 명시적 허용 규칙이 기본 및 추가 차단 규칙보다 우선합니다."},
"tools_web_proxy": {"label": "웹 프록시", "help": "웹 도구의 프록시 URL입니다. 비워 두면 기본 네트워크를 사용합니다."},
"tools_web_user_agent": {"label": "User-Agent 헤더", "help": "사용자 지정 User-Agent 헤더입니다. 비워 두면 기본값을 사용합니다."},
"tools_restrict_to_workspace": {"label": "도구를 작업 공간으로 제한", "help": "전체 도구 접근 정책입니다. WebUI의 대화별 권한은 별도로 설정합니다."},
"tools_ssrf_whitelist": {"label": "허용할 사설 네트워크 범위", "help": "외부 요청 보호에서 제외할 IP/CIDR 범위를 한 줄에 하나씩 입력하세요."},
"tools_webui_allow_remote_package_install": {"label": "원격 패키지 설치", "help": "원격 WebUI에서 추가 패키지와 스킬을 설치하도록 허용합니다. 이 설정은 게이트웨이를 실행하는 컴퓨터에서 변경해야 합니다."},
"tools_cli_apps_install_timeout": {"label": "설치 제한 시간(초)", "help": "CLI 앱 설치에 허용되는 최대 시간입니다."},
"tools_cli_apps_run_timeout": {"label": "실행 제한 시간(초)", "help": "CLI 앱 명령의 최대 실행 시간입니다."},
"tools_cli_apps_catalog_ttl_seconds": {"label": "카탈로그 캐시 유지 시간(초)", "help": "CLI 앱 카탈로그를 캐시에 보관하는 시간입니다."},
"gateway_host": {"label": "게이트웨이 수신 주소", "help": "게이트웨이가 연결을 수신하는 주소입니다. WebSocket과 WebUI 주소는 채널 → WebSocket에서 설정합니다."},
"gateway_port": {"label": "게이트웨이 포트", "help": "저장할 포트입니다. 명령줄 인수가 우선 적용됩니다."},
"gateway_restart_mode": {"label": "다시 시작 방식", "help": "프로세스를 다시 시작하는 방식입니다. 자동 모드는 호스트 환경에 따라 선택합니다."},
"api_host": {"label": "API 수신 주소", "help": "localhost 이외의 주소에서 연결을 받으려면 API 키가 필요합니다. 시스템에서 키를 설정하고 API 서비스를 다시 시작해 변경 사항을 적용하세요."},
"api_timeout": {"label": "API 요청 제한 시간(초)", "help": "요청에 허용되는 최대 시간입니다. API 서비스를 다시 시작하면 적용됩니다."},
"tools_image_generation_save_dir": {"label": "생성 이미지 폴더", "help": "nanobot 미디어 폴더 아래의 상대 경로입니다. 기존 이미지는 이동하지 않습니다."}
},
"groups": {
"chat": {"title": "WebUI 채팅 권한", "help": "로컬 서비스 접근 및 기본 채팅 권한입니다."},
"identity": {"title": "시간대", "help": "예약 작업의 시간대를 선택하세요."},
"memory": {"title": "기억", "help": "자동 기억 정리를 켜거나 끕니다."},
"heartbeat": {"title": "주기적 확인 일정", "help": "기본 주기적 작업 확인을 설정합니다."},
"execution": {"title": "에이전트 실행 제한", "help": "도구 실행 및 재시도 방식입니다."},
"sessions": {"title": "대화", "help": "플랫폼 간에 대화를 공유합니다."},
"tools": {"title": "기본 도구", "help": "허용할 도구 종류를 선택하세요."},
"shell": {"title": "셸 및 샌드박스", "help": "제한 시간, 환경, 마운트 및 명령 필터입니다."},
"network": {"title": "웹 연결", "help": "웹 프록시 및 요청 식별 정보입니다."},
"safety": {"title": "전체 접근 정책", "help": "작업 공간 제한, 사설 네트워크 및 원격 설치입니다."},
"cli": {"title": "CLI 앱 제한", "help": "설치, 실행 및 카탈로그 캐시의 시간 제한입니다."},
"gateway": {"title": "게이트웨이 프로세스", "help": "배포 및 프로세스 다시 시작 설정입니다."},
"api": {"title": "API 서버 세부 설정", "help": "수신 주소 및 요청 제한 시간입니다."},
"storage": {"title": "이미지 저장", "help": "생성 이미지를 저장할 위치입니다."},
"maintenance": {"title": "기억 정리 일정", "help": ""},
"web": {"title": "웹 접근", "help": ""},
"applications": {"title": "명령줄 앱", "help": ""}
},
"save": "변경 사항 저장", "saving": "저장 중…", "discard": "변경 사항 취소", "saved": "저장했습니다.",
"restart": "nanobot 다시 시작", "restartHelp": "다시 시작하면 적용됩니다. 명령줄 인수와 환경 변수 설정이 우선 적용될 수 있습니다.",
"search": "고급 설정 검색", "noResults": "일치하는 설정이 없습니다.", "pending": "저장하지 않은 변경 사항",
"numberError": "허용 범위 내의 유효한 숫자를 입력하세요.", "activeModel": "현재 모델 사용", "none": "없음",
"auto": "자동", "manual": "수동", "standard": "표준", "persistent": "계속",
"unavailable": "이 설정을 편집하려면 게이트웨이를 업데이트하세요.", "advancedOptions": "고급 옵션"
},
"backToChat": "채팅으로 돌아가기",
"sidebar": {
"title": "설정",
"ariaLabel": "설정 섹션"
},
"nav": {
"about": "정보",
"capabilities": "기능",
"general": "일반",
"byok": "BYOK",
"overview": "개요",
"appearance": "외관",
"models": "모델",
"providers": "제공자",
"providers": "제공업체",
"image": "이미지",
"voice": "음성",
"browser": "웹",
"channels": "채널",
"runtime": "시스템",
"advanced": "보안",
"advanced": "고급",
"memory": "기억",
"cliApps": "CLI 앱",
"mcp": "MCP",
"apps": "앱",
@@ -110,56 +193,55 @@
"system": "시스템",
"about": "정보",
"status": "상태",
"localPreferences": "로컬 환경설정",
"localPreferences": "이 브라우저의 설정",
"presets": "프리셋",
"imageGeneration": "이미지 생성",
"imageDefaults": "기본값",
"webSearch": "웹 검색",
"webBehavior": "동작",
"webBehavior": "웹 페이지 접근",
"regional": "지역",
"webuiSafety": "WebUI 보안",
"capabilities": "기능",
"cliApps": "CLI 앱",
"mcp": "MCP 서비스",
"apps": "앱",
"nativeHost": "네이티브 호스트",
"nativeHost": "데스크톱 앱",
"hostSafety": "앱 보안",
"voiceInput": "음성 입력"
},
"rows": {
"theme": "테마",
"language": "언어",
"provider": "제공자",
"provider": "제공업체",
"model": "모델",
"restart": "nanobot 재시작",
"configPath": "설정 경로",
"restart": "nanobot 다시 시작",
"configPath": "설정 파일",
"activePreset": "활성 프리셋",
"gateway": "게이트웨이",
"restartState": "재시작 상태",
"restartState": "다시 시작 상태",
"pendingChanges": "대기 중인 변경",
"selectedPreset": "선택한 프리셋",
"presetModel": "프리셋 모델",
"density": "밀도",
"activityMode": "활동 상세",
"activityMode": "활동 표시 수준",
"fileEditDisplay": "파일 편집 표시",
"codeWrap": "코드 줄바꿈",
"maxResults": "최대 결과 수",
"timeout": "타임아웃",
"jinaReader": "Jina 리더",
"timeout": "제한 시간",
"jinaReader": "Jina Reader",
"imageGeneration": "이미지 생성",
"imageProvider": "이미지 제공자",
"imageProviderStatus": "제공자 상태",
"imageProviderBase": "제공자 주소",
"imageProvider": "이미지 제공업체",
"imageProviderStatus": "제공업체 상태",
"imageProviderBase": "제공업체 주소",
"imageModel": "이미지 모델",
"defaultAspectRatio": "기본 비율",
"defaultImageSize": "기본 크기",
"maxImagesPerTurn": "턴당 최대 이미지 수",
"maxImagesPerTurn": "요청당 최대 이미지 수",
"imageSaveDir": "저장 디렉터리",
"timezone": "시간대",
"workspacePath": "기본 작업공간",
"workspacePath": "기본 작업 공간",
"localServiceAccess": "로컬 서비스",
"webuiDefaultAccess": "기본 권한",
"currentModel": "현재 구성",
"currentModel": "현재 설정",
"brandLogos": "브랜드 로고",
"browserNotifications": "작업 알림",
"cliAppsCatalog": "카탈로그",
@@ -168,9 +250,9 @@
"logs": "로그",
"diagnostics": "진단",
"contextWindow": "컨텍스트 창",
"transcription": "전사",
"transcriptionProvider": "제공자",
"transcriptionProviderStatus": "제공자 상태",
"transcription": "음성 텍스트 변환",
"transcriptionProvider": "제공업체",
"transcriptionProviderStatus": "제공업체 상태",
"transcriptionModel": "모델",
"transcriptionLanguage": "언어",
"voiceLimits": "제한"
@@ -178,46 +260,45 @@
"help": {
"theme": "밝은 모드와 어두운 모드를 전환합니다.",
"language": "WebUI에서 사용할 언어를 선택합니다.",
"provider": "새 모델 요청을 처리할 제공자를 선택합니다.",
"provider": "새 모델 요청을 처리할 제공업체를 선택합니다.",
"model": "이 프리셋에서 사용할 모델을 선택하세요.",
"configPath": "현재 게이트웨이가 사용하는 설정 파일입니다.",
"selectedPreset": "이름 있는 프리셋은 여기서 읽기 전용입니다. config.json에서 편집하세요.",
"presetModel": "기본값으로 전환하면 WebUI에서 모델과 제공자를 편집할 수 있습니다.",
"density": "이 브라우저에만 저장됩니다.",
"selectedPreset": "모델 섹션에서 프리셋을 관리할 수 있습니다.",
"presetModel": "모델 섹션에서 제공업체와 모델을 변경할 수 있습니다.",
"activityMode": "기본으로 표시할 에이전트 활동 세부 수준을 선택합니다.",
"fileEditDisplay": "파일 편집 활동을 줄 수 또는 변경 사항으로 표시할지 선택합니다.",
"codeWrap": "작은 화면에서도 긴 코드 줄을 읽기 쉽게 유지합니다.",
"maxResults": "각 web_search 호출에서 반환되는 결과 수입니다.",
"timeout": "검색 제공자 요청이 타임아웃되기 전의 초입니다.",
"jinaReader": "가능할 때 web_fetch에 Jina Reader를 사용합니다.",
"imageGeneration": "구성된 이미지 제공자가 있을 때 채팅에서 generate_image를 노출합니다.",
"imageProvider": "generate_image에 사용할 등록 제공자를 선택합니다.",
"imageProviderStatus": "이미지 생성은 제공자 자격 증명을 재사용합니다.",
"imageModel": "선택한 이미지 제공자에 보낼 모델 이름입니다.",
"defaultAspectRatio": "프롬프트가 비율을 선택하지 않을 때 사용됩니다.",
"defaultImageSize": "지원하는 제공자에 보낼 크기 힌트입니다.",
"maxImagesPerTurn": "한 번의 generate_image 요청에서 생성할 수 있는 이미지 상한입니다.",
"maxResults": "웹 검색 한 번에 반환할 최대 결과 수입니다.",
"timeout": "검색 요청의 응답을 기다릴 최대 시간(초)입니다.",
"jinaReader": "사용 가능한 경우 Jina Reader로 웹 페이지 내용을 가져옵니다.",
"imageGeneration": "이미지 제공업체를 설정하면 에이전트가 채팅에서 이미지를 생성할 수 있습니다.",
"imageProvider": "이미지 생성에 사용할 제공업체를 선택합니다.",
"imageProviderStatus": "이미지 생성은 제공업체 인증 정보을 재사용합니다.",
"imageModel": "선택한 이미지 제공업체에 보낼 모델 이름입니다.",
"defaultAspectRatio": "요청에 이미지 비율이 지정되지 않았을 때 사용합니다.",
"defaultImageSize": "지원하는 제공업체에 보낼 크기 힌트입니다.",
"maxImagesPerTurn": "요청 한 번에 생성할 수 있는 최대 이미지 수입니다.",
"timezone": "일정과 시간 인식 답변에 사용됩니다.",
"localServiceAccess": "전체 접근 권한 shell 명령이 localhost 서비스에 접근할 수 있게 합니다.",
"localServiceAccess": "전체 접근 권한 셸 명령이 localhost 서비스에 접근할 수 있게 합니다.",
"webuiDefaultAccess": "프로젝트별 권한이 없는 웹 채팅에 사용됩니다.",
"securityManagedControls": "웹 가져오기는 항상 로컬, 사설, 메타데이터 서비스를 보호합니다. 핵심 채널 보안은 config.json에서 관리됩니다.",
"securityManagedControls": "웹 도구는 명시적으로 허용된 경우를 제외하고 로컬 서비스, 사설 네트워크 및 메타데이터 서비스 접근을 차단합니다. 그 밖의 채널 보안 설정은 config.json에서 관리합니다.",
"currentModel": "새 응답에 사용됩니다.",
"selectedModelProvider": "선택한 모델에 의해 설정됩니다.",
"selectedModelValue": "선택한 모델에 의해 설정됩니다.",
"brandLogos": "설정에서 타사 제공자와 CLI 로고를 표시합니다.",
"brandLogos": "설정에서 타사 제공업체와 CLI 로고를 표시합니다.",
"browserNotifications": "이 페이지가 백그라운드에 있을 때만 알립니다. 기본값은 꺼짐입니다.",
"cliAppsCatalog": "nanobot이 로컬에서 실행할 수 있는 앱 CLI 어댑터만 설치합니다. 네이티브 앱은 변경하지 않습니다.",
"cliAppsCatalog": "nanobot이 이 컴퓨터에서 사용할 수 있는 명령줄 도구를 설치합니다. 데스크톱 앱은 변경하지 않습니다.",
"cliAppsFilter": "앱, 카테고리 또는 기능으로 검색합니다.",
"logs": "네이티브 엔진 로그 폴더를 엽니다.",
"diagnostics": "지원용 작은 런타임 보고서를 내보냅니다.",
"localServiceAccessNative": "전체 접근 권한 shell 명령이 이 Mac의 서비스에 접근할 수 있게 합니다.",
"logs": "데스크톱 앱의 로그 폴더를 엽니다.",
"diagnostics": "문제 해결을 위해 지원팀에 보낼 진단 보고서를 내보냅니다.",
"localServiceAccessNative": "전체 접근 권한 셸 명령이 이 Mac의 서비스에 접근할 수 있게 합니다.",
"webuiDefaultAccessNative": "프로젝트별 권한이 없는 네이티브 채팅에 사용됩니다.",
"contextWindow": "이 모델 구성의 기본 컨텍스트 예산을 선택합니다.",
"contextWindow": "이 모델 설정에서 사용할 기본 컨텍스트 한도를 선택합니다.",
"transcription": "마이크 입력을 보내기 전에 텍스트로 변환합니다. 채널 음성 메시지도 같은 설정을 사용합니다.",
"transcriptionProvider": "제공자 설정에 저장된 해당 제공자의 인증 정보를 사용합니다.",
"transcriptionProviderStatus": "API 키는 음성 변환 설정이 아니라 제공자 설정에 유지됩니다.",
"transcriptionModel": "제공자가 사용자 지정 모델 ID를 요구하지 않으면 해석된 기본값을 사용하세요.",
"transcriptionLanguage": "en, zh, ja, ko 같은 선택적 ISO-639 힌트입니다."
"transcriptionProvider": "제공업체 설정에 저장된 해당 제공업체의 인증 정보를 사용합니다.",
"transcriptionProviderStatus": "API 키는 음성 변환 설정이 아니라 제공업체 설정에 유지됩니다.",
"transcriptionModel": "기본 모델을 사용합니다. 제공업체에서 별도의 모델 ID를 요구하는 경우에만 변경하세요.",
"transcriptionLanguage": "en, zh, ja, ko 등의 ISO-639 언어 코드를 입력할 수 있습니다. 비워 두면 자동으로 감지합니다."
},
"values": {
"light": "라이트",
@@ -225,13 +306,11 @@
"notAvailable": "사용 불가",
"enabled": "활성화됨",
"disabled": "비활성화됨",
"restartPending": "재시작 대기",
"restartPending": "다시 시작 대기",
"ready": "준비됨",
"privateEngine": "비공개 엔진",
"unixSocket": "Unix 소켓",
"defaultWorkspace": "기본 작업 공간",
"comfortable": "편안함",
"compact": "컴팩트",
"auto": "자동",
"expanded": "펼침",
"default": "기본값",
@@ -242,10 +321,10 @@
"off": "꺼짐",
"defaultPermission": "기본 권한",
"fullAccess": "전체 접근",
"configured": "구성됨",
"notConfigured": "미구성",
"configured": "설정됨",
"notConfigured": "설정 안 됨",
"pending": "대기 중",
"restartingEngine": "재시작 중",
"restartingEngine": "다시 시작 중",
"checking": "확인 중",
"running": "실행 중",
"needsSetup": "설정 필요"
@@ -255,13 +334,13 @@
"loadError": "설정을 불러올 수 없습니다",
"unsaved": "저장되지 않은 변경 사항이 있습니다.",
"upToDate": "최신 상태입니다.",
"savedRestart": "저장했습니다. 적용하려면 nanobot을 재시작하세요.",
"restartAfterSaving": "변경 사항을 저장한 뒤 준비되면 재시작하세요.",
"savedRestartApply": "저장했습니다. 준비되면 재시작하세요.",
"imageProviderRestart": "이미지 제공자 변경 사항을 저장했습니다. 준비되면 재시작하세요.",
"hostRestartAfterSaving": "저장하면 nanobot이 엔진을 재시작합니다.",
"hostRestartPending": "저장했습니다. 준비되면 엔진을 재시작합니다.",
"hostApiUnavailable": "호스트 작업은 네이티브 앱 안에서만 사용할 수 있습니다.",
"savedRestart": "저장했습니다. 적용하려면 nanobot을 다시 시작하세요.",
"restartAfterSaving": "변경 사항을 저장한 뒤 준비되면 다시 시작하세요.",
"savedRestartApply": "저장했습니다. 변경 사항을 적용하려면 nanobot을 다시 시작하세요.",
"imageProviderRestart": "이미지 제공업체 변경 사항을 저장했습니다. 적용하려면 nanobot을 다시 시작하세요.",
"hostRestartAfterSaving": "저장하면 nanobot이 엔진을 다시 시작합니다.",
"hostRestartPending": "저장했습니다. 준비되면 엔진을 다시 시작합니다.",
"hostApiUnavailable": "이 작업은 데스크톱 앱에서만 사용할 수 있습니다.",
"logsOpened": "로그 폴더를 열었습니다.",
"logsOpenFailed": "로그 폴더를 열 수 없습니다.",
"diagnosticsExported": "진단을 {{path}}에 내보냈습니다.",
@@ -283,7 +362,7 @@
"exporting": "내보내는 중..."
},
"byok": {
"description": "직접 제공자 키를 사용합니다. Nanobot은 현재 구성에서 값을 읽고, 설정된 제공자만 모델 프리셋에서 사용할 수 있습니다.",
"description": "직접 제공업체 키를 사용합니다. Nanobot은 현재 설정에서 값을 읽고, 설정된 제공업체만 모델 프리셋에서 사용할 수 있습니다.",
"configured": "설정됨",
"notConfigured": "설정 안 됨",
"configuredSection": "설정됨",
@@ -293,51 +372,75 @@
"apiKey": "API 키",
"apiBase": "API 기본 주소",
"apiKeyPlaceholder": "API 키 입력",
"apiKeyConfiguredPlaceholder": "비워 두면 현재 key 유지",
"configuredKeyHint": "설정된 key",
"apiBasePlaceholder": "제공자 기본값 사용",
"apiKeyRequired": "이 제공자를 설정하려면 API 키가 필요합니다.",
"apiKeyConfiguredPlaceholder": "비워 두면 현재 키 유지",
"configuredKeyHint": "키 설정됨",
"apiBasePlaceholder": "제공업체 기본값 사용",
"apiKeyRequired": "이 제공업체를 설정하려면 API 키가 필요합니다.",
"showApiKey": "API 키 표시",
"hideApiKey": "API 키 숨기기",
"noConfiguredProviders": "설정된 제공자가 없습니다",
"configureFirst": "먼저 BYOK에서 제공자를 설정하세요.",
"openByok": "BYOK 열기",
"noConfiguredProviders": "설정된 제공업체가 없습니다",
"configureFirst": "먼저 제공업체 섹션에서 연결을 설정하세요.",
"openByok": "제공업체 설정",
"tabs": {
"ariaLabel": "BYOK 자격 증명 유형",
"ariaLabel": "BYOK 인증 정보 유형",
"llm": "LLM",
"webSearch": "웹 검색"
},
"webSearch": {
"provider": "검색 제공자",
"providerHelp": "웹 검색 도구가 사용할 백엔드를 선택합니다.",
"selectProvider": "제공자 선택",
"credentials": "자격 증명",
"noCredentialRequired": "key 필요 없음",
"provider": "검색 제공업체",
"providerHelp": "웹 검색에 사용할 서비스를 선택합니다.",
"selectProvider": "제공업체 선택",
"credentials": "인증 정보",
"noCredentialRequired": "API 키 필요 없음",
"noCredentialHelp": "DuckDuckGo는 API 키를 저장하지 않고 사용할 수 있습니다.",
"apiKeyHelp": "config에 저장되며 저장 후에는 마스킹되어 표시됩니다.",
"apiKeyHelp": "설정에 저장되며 저장 후에는 값이 가려집니다.",
"baseUrl": "기본 URL",
"baseUrlHelp": "SearXNG에는 자체 인스턴스 URL이 필요합니다.",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "이 검색 제공자에는 API 키가 필요합니다.",
"apiKeyRequired": "이 검색 제공업체에는 API 키가 필요합니다.",
"baseUrlRequired": "SearXNG에는 기본 URL이 필요합니다.",
"missingCredential": "저장하기 전에 필요한 자격 증명을 입력하세요.",
"missingCredential": "저장하기 전에 필요한 인증 정보을 입력하세요.",
"saveHint": "변경 사항은 새 웹 검색 요청에 적용됩니다."
}
},
"overview": {
"model": "현재 모델",
"providers": "제공자",
"configuredCount": "{{count}}개 구성됨",
"providers": "제공업체",
"configuredCount": "{{count}}개 설정됨",
"totalProviders": "{{count}}개 사용 가능",
"webSearch": "웹 검색",
"imageGeneration": "이미지 생성",
"voiceInput": "음성 입력",
"workspace": "작업공간"
"workspace": "작업 공간"
},
"usage": {
"title": "토큰 활동",
"shortTitle": "토큰 사용량",
"subtitle": "최근 12개월 동안 제공자가 보고한 사용량입니다.",
"last30Days": "최근 30일",
"viewDetails": "자세히 보기",
"previousPage": "이전 페이지",
"nextPage": "다음 페이지",
"dailyAverage": "일평균 사용량",
"inputTokens": "입력 토큰",
"cacheHitRate": "캐시 적중률",
"requestTrend": "일별 요청",
"cacheRateHelp": "캐시 상태가 알려진 입력만 적중률 계산에 포함됩니다.",
"dailyTrend": "일별 토큰 사용량",
"systemHelp": "채팅 제목 생성 등의 내부 작업과 출처가 기록되지 않은 모델 호출에 사용된 토큰입니다.",
"bySource": "출처별 사용량",
"byModel": "모델별 사용량",
"modelTrend": "모델별 사용량 추이",
"modelsUnavailable": "모델별 내역이 없습니다.",
"otherModels": "기타 / 미분류",
"unclassified": "미분류",
"unavailable": "사용량 데이터를 사용할 수 없습니다.",
"noActivity": "최근 30일 동안 토큰 사용량이 없습니다.",
"cachedInput": "캐시 적중",
"cacheMiss": "캐시 미스",
"cacheUnknown": "캐시 상태 알 수 없음",
"outputTokens": "출력",
"otherTokens": "기타 토큰",
"subtitle": "최근 12개월 동안 제공업체가 보고한 사용량입니다.",
"empty": "새 모델 응답 이후 토큰 활동이 표시됩니다.",
"totalTokens": "누적 토큰 수",
"peakTokens": "최고 토큰 수",
@@ -355,14 +458,14 @@
"user": "채팅",
"api": "API",
"cron": "자동화",
"dream": "메모리 정리",
"system": "시스템"
"dream": "기억 정리",
"system": "보조 호출"
}
},
"providers": {
"title": "모델 제공업체",
"searchPlaceholder": "제공자 검색",
"noMatches": "일치하는 제공자가 없습니다.",
"searchPlaceholder": "제공업체 검색",
"noMatches": "일치하는 제공업체가 없습니다.",
"addOwnProvider": "내 모델 제공업체 추가",
"customProvider": "사용자 지정 제공업체",
"customProviderName": "제공업체 이름",
@@ -372,12 +475,12 @@
"saveAdvancedBeforeSignIn": "로그인하기 전에 고급 옵션을 저장하세요.",
"apiType": "API 유형",
"proxy": "네트워크 프록시",
"thinkingStyle": "추론 방식",
"thinkingStyle": "추론 매개변수 형식",
"region": "리전",
"profile": "프로필",
"profile": "AWS 프로필",
"extraHeaders": "추가 헤더",
"extraBody": "추가 본문",
"extraQuery": "추가 쿼리",
"extraBody": "요청 본문 추가 항목",
"extraQuery": "추가 쿼리 매개변수",
"capabilityFastMode": "고속 모드",
"capabilityFastModeHelp": "OpenAI 우선 서비스 등급을 사용해 더 빠르게 응답합니다. 크레딧도 더 빠르게 소모됩니다.",
"capabilityDeepSeekSearch": "DeepSeek 웹 검색",
@@ -388,29 +491,29 @@
"capabilityOpenAISearchHelp": "Responses API 호환 모델이 웹을 검색하도록 허용합니다. 검색 활동은 채팅에 표시됩니다."
},
"image": {
"selectProvider": "제공자 선택",
"selectProvider": "제공업체 선택",
"selectAspect": "비율 선택",
"selectSize": "크기 선택",
"selectModel": "이미지 모델 선택",
"searchOrTypeModel": "모델 ID 검색 또는 입력",
"typeModelId": "이 제공자가 지원하는 모델 ID를 입력하세요.",
"configureProvider": "제공자 구성",
"missingCredential": "이미지 생성을 활성화하기 전에 이 제공자를 구성하세요."
"typeModelId": "이 제공업체가 지원하는 모델 ID를 입력하세요.",
"configureProvider": "제공업체 설정",
"missingCredential": "이미지 생성을 활성화하기 전에 이 제공업체를 설정하세요."
},
"capabilities": {
"providerSupport": "제공자 지원",
"providerInstallOnSave": "이 제공자를 저장하면 필요한 지원이 자동으로 설치됩니다.",
"searchSupport": "검색 제공자 지원",
"searchInstallOnSave": "저장하면 Olostep 지원이 자동으로 설치됩니다.",
"installing": "지원 설치 중..."
"providerSupport": "제공업체 필수 패키지",
"providerInstallOnSave": "이 제공업체를 저장하면 필요한 패키지가 자동으로 설치됩니다.",
"searchSupport": "검색 서비스 필수 패키지",
"searchInstallOnSave": "저장하면 Olostep에 필요한 패키지가 자동으로 설치됩니다.",
"installing": "필수 패키지 설치 중…"
},
"models": {
"selectModel": "모델 선택",
"addConfiguration": "구성 추가",
"newConfiguration": "새 모델 구성",
"newConfigurationHelp": "제공자와 모델을 원클릭 옵션으로 저장합니다.",
"configurationName": "구성 이름",
"configurationNameHelp": "저장된 모델 구성의 이름을 변경합니다.",
"addConfiguration": "설정 추가",
"newConfiguration": "새 모델 설정",
"newConfigurationHelp": "제공업체와 모델의 조합을 저장해 빠르게 선택할 수 있습니다.",
"configurationName": "설정 이름",
"configurationNameHelp": "저장된 모델 설정의 이름을 변경합니다.",
"configurationNamePlaceholder": "빠른 작성",
"callOrder": "모델 호출 순서",
"primary": "기본",
@@ -441,21 +544,22 @@
"disabled": "비활성화됨",
"noPresets": "아직 모델 프리셋이 없습니다",
"noPresetsHelp": "프리셋을 만든 다음 호출 순서에 추가하세요.",
"removeBeforeDelete": "삭제하기 전에 이 프리셋을 호출 순서에서 제거하세요.",
"providerSetupRequired": "제공자 설정 필요",
"configureProviderBeforeSaving": "프리셋을 저장하기 전에 이 제공자를 설정하세요.",
"removeBeforeDelete": "삭제하기 전에 다른 프리셋을 기본으로 선택하세요.",
"providerSetupRequired": "제공업체 설정 필요",
"configureProviderBeforeSaving": "프리셋을 저장하기 전에 이 제공업체를 설정하세요.",
"deletePresetTitle": "모델 프리셋을 삭제할까요?",
"deletePresetHelp": "프리셋 “{{name}}”을 삭제합니다. 제공자 인증 정보에는 영향을 주지 않습니다.",
"deletePresetHelp": "프리셋 ‘{{name}}’을 삭제하고 호출 순서에서도 제거합니다. 제공업체 인증 정보는 유지됩니다.",
"searchModels": "모델 ID 검색 또는 입력",
"useCustomModel": "사용",
"loadingModels": "모델 불러오는 중...",
"searchCatalog": "제공자 카탈로그에서 모델을 선택합니다.",
"searchCatalog": "제공업체 카탈로그에서 모델을 선택합니다.",
"availableCount": "사용 가능한 모델: {{count}}개",
"modelsAvailable": "사용 가능",
"noModelResults": "일치하는 모델이 없습니다.",
"loadFailed": "모델 목록을 사용할 수 없습니다.",
"unsupportedModelList": "모델 ID를 직접 입력하세요.",
"providerNotConfigured": "모델을 불러오기 전에 이 제공자를 설정하세요.",
"autoProviderCustomOnly": "자동 제공자 모드는 사용자 지정 모델 ID를 사용합니다."
"providerNotConfigured": "모델을 불러오기 전에 이 제공업체를 설정하세요.",
"autoProviderCustomOnly": "제공업체를 자동으로 선택하려면 모델 ID를 직접 입력하세요."
},
"timezone": {
"select": "시간대 선택",
@@ -464,7 +568,11 @@
},
"cliApps": {
"allCategories": "모든 카테고리",
"availableCount_one": "앱 {{count}}개",
"availableCount_other": "앱 {{count}}개",
"availableCount": "앱 {{count}}개",
"installedCount_one": "설치된 CLI 도구 {{count}}개",
"installedCount_other": "설치된 CLI 도구 {{count}}개",
"installedCount": "{{count}}개 설치됨",
"summary": "CLI {{total}}개 중 {{installed}}개 설치됨",
"filterAll": "전체",
@@ -481,7 +589,7 @@
"empty": "이 필터와 일치하는 CLI 앱이 없습니다.",
"readyTitle": "@{{name}} 준비됨",
"readyStatus": "준비됨",
"readyPrompt": "@{{name}}을 사용해 이 CLI가 무엇을 할 수 있는지 확인하세요.",
"readyPrompt": "채팅에서 @{{name}} 명령으로 이 도구의 기능을 확인하세요.",
"readyTry": "@{{name}} 사용해 보기",
"readyCopied": "복사됨",
"openChat": "채팅 열기",
@@ -494,6 +602,9 @@
"noDescription": "설명이 없습니다."
},
"about": {
"documentation": "공식 문서",
"sourceCode": "소스 코드",
"reportIssue": "문제 신고",
"version": "버전",
"checking": "확인 중...",
"checkForUpdates": "업데이트 확인",
@@ -508,7 +619,7 @@
"filterNotInstalled": "비활성",
"searchPlaceholder": "MCP 프리셋 검색",
"moreOptions": "MCP 서버 추가",
"moreOptionsSubtitle": "사용자 지정 MCP 서버를 연결하거나 기존 구성을 가져옵니다.",
"moreOptionsSubtitle": "사용자 지정 MCP 서버를 연결하거나 기존 설정을 가져옵니다.",
"customTitle": "사용자 지정 MCP",
"customSubtitle": "stdio, HTTP 또는 SSE MCP 서버를 추가합니다.",
"customAction": "사용자 지정",
@@ -520,18 +631,20 @@
"authNone": "없음",
"authHeaders": "헤더",
"command": "명령",
"args": "인자 JSON",
"headers": "헤더 JSON",
"args": "인수(JSON)",
"headers": "헤더(JSON)",
"oauthAfterSave": "서버를 저장한 다음 연결을 선택하여 로그인하세요.",
"headersHelp": "이 서버에서 사용하는 요청 헤더를 추가하세요.",
"env": "환경 변수 JSON",
"timeout": "도구 제한 시간",
"env": "환경 변수(JSON)",
"timeout": "도구 제한 시간(초)",
"advancedOptions": "고급 옵션",
"hideAdvanced": "고급 숨기기",
"saveCustom": "MCP 저장",
"saveCustom": "서버 저장",
"configImport": "mcp.json 가져오기",
"importConfig": "가져오기",
"restartRequired": "업데이트된 MCP 도구를 연결하려면 nanobot을 다시 시작하세요.",
"toolsFound_one": "도구 {{count}}개",
"toolsFound_other": "도구 {{count}}개",
"toolsFound": "도구 {{count}}개",
"loading": "MCP 프리셋 로드 중...",
"empty": "이 필터와 일치하는 MCP 프리셋이 없습니다.",
@@ -549,9 +662,9 @@
"connectHint": "계정 설정에서 키를 추가하세요.",
"saveAndEnable": "저장 후 활성화",
"updateSetup": "설정 업데이트",
"configured": "구성됨",
"configured": "설정됨",
"keepExisting": "기존 값을 유지하려면 비워 두세요",
"statusConfigured": "구성됨",
"statusConfigured": "설정됨",
"statusMissingCredentials": "키 필요",
"connectingAccount": "{{name}} 연결 중",
"connectingLabel": "연결 중…",
@@ -596,7 +709,7 @@
"toolScope": "도구",
"allTools": "모두 활성화",
"noTools": "모두 비활성화",
"reloadTools": "도구 다시 불러오기",
"reloadTools": "도구 목록 새로고침",
"presetDescriptions": {
"browserbase": "Browserbase로 클라우드 브라우저를 자동화합니다.",
"playwright": "Playwright로 로컬 브라우저를 검사하고 자동화합니다.",
@@ -623,11 +736,11 @@
"localHelp": "이 기기만 연결할 수 있습니다.", "networkHelp": "다른 기기도 연결할 수 있으므로 API 키가 필요합니다.",
"port": "포트", "portHelp": "API가 사용할 로컬 포트입니다.", "apiKey": "API 키", "apiKeyHelp": "클라이언트는 Bearer 토큰으로 전송합니다.",
"apiKeyRequired": "네트워크에 공개하기 전에 필요합니다.", "apiKeyPlaceholder": "API 키 입력",
"autoInstall": "시작할 때 API 지원을 자동으로 설치합니다."
"autoInstall": "서버를 시작할 때 필요한 패키지를 자동으로 설치합니다."
},
"observability": {
"title": "관측성", "configured": "nanobot이 추적 자격 증명을 사용할 수 있습니다.",
"environment": "LANGFUSE_SECRET_KEY와 LANGFUSE_PUBLIC_KEY를 설정한 뒤 nanobot을 다시 시작하세요.", "enable": "추적 지원 활성화"
"title": "관측성", "configured": "nanobot이 추적 인증 정보을 사용할 수 있습니다.",
"environment": "LANGFUSE_SECRET_KEY와 LANGFUSE_PUBLIC_KEY를 설정한 뒤 nanobot을 다시 시작하세요.", "enable": "추적 활성화"
},
"legal": {
"thirdPartyBrands": "제품 이름, 로고 및 브랜드는 각 소유자의 자산입니다. 사용은 식별 목적일 뿐 보증이나 제휴를 의미하지 않습니다."
@@ -659,8 +772,8 @@
"restartRequired": "업데이트된 앱과 MCP 도구를 적용하려면 nanobot을 다시 시작하세요."
},
"channels": {
"description": "nanobot을 채팅 앱에 연결합니다. 지원 설치는 통합 패키지만 추가하며, 대부분의 채널은 여전히 토큰이나 워크스페이스 설정이 필요합니다.",
"caption": "{{enabled}}개 활성화됨 · 총 {{total}}개 채널",
"description": "nanobot을 채팅 앱에 연결합니다. 필요한 패키지를 설치한 후 각 플랫폼의 인증 정보와 작업 공간을 설정하세요.",
"caption": "실행 중 {{enabled}}개 · 총 {{total}}개 채널",
"searchPlaceholder": "채널 검색",
"backToChannels": "모든 채널",
"catalog": "채널",
@@ -670,7 +783,7 @@
"requires": "필요: {{requirements}}",
"setUp": "설정",
"setupGuide": "설정 가이드",
"setupSummary": "활성화는 nanobot 지원만 켭니다. 플랫폼 자격 증명을 추가한 뒤 nanobot을 다시 시작하세요.",
"setupSummary": "채널을 활성화하고 플랫폼 인증 정보를 입력한 후 nanobot을 다시 시작하세요.",
"configKeys": "설정 키",
"enable": "채널 활성화",
"disable": "채널 비활성화",
@@ -687,16 +800,18 @@
"checkOnly": "확인만",
"commandCopied": "명령을 복사했습니다.",
"commandCopyFailed": "명령을 복사하지 못했습니다.",
"configuredInstances": "인스턴스 {{count}}개 구성됨",
"configuredInstances_one": "설정된 인스턴스 {{count}}개",
"configuredInstances_other": "설정된 인스턴스 {{count}}개",
"configuredInstances": "인스턴스 {{count}}개 설정됨",
"connectPreview": "다음 단계에서 브라우저 내 연결을 진행합니다. 지금은 아래 명령을 실행하세요.",
"copyCommand": "명령 복사",
"filterAll": "전체",
"filterOff": "꺼짐",
"filterOn": "켜짐",
"filterOff": "중지됨",
"filterOn": "실행 중",
"helperCopied": "{{name}}을(를) 복사했습니다.",
"helperCopyFailed": "{{name}}을(를) 복사하지 못했습니다.",
"hideSecret": "비밀 값 숨기기",
"instanceConfigured": "구성됨",
"instanceConfigured": "설정됨",
"instanceNeedsSetup": "설정 필요",
"runtimeFailed": "시작 실패",
"runtimeStarting": "시작 중",
@@ -704,7 +819,7 @@
"managedByWebui": "WebUI에서 관리",
"officialGuide": "공식 가이드",
"optional": "선택 사항",
"providerPreset": "제공자",
"providerPreset": "제공업체",
"requiredSetup": "필수 설정",
"savedSecret": "저장됨",
"savedSecretPlaceholder": "저장된 비밀 값",
@@ -713,13 +828,13 @@
"selectChannel": "{{name}} 설정 보기",
"setupSteps": "다음 단계",
"showSecret": "비밀 값 표시",
"toggleChannel": "{{name}} 채널",
"toggleInstance": "{{name}} 인스턴스",
"toggleChannel": "{{name}} 활성화",
"toggleInstance": "{{name}} 인스턴스 활성화",
"tryIt": "사용해 보기",
"validationFailed": "활성화하기 전에 필수 설정을 확인하세요.",
"validation": {
"connected": "연결됨",
"configured": "수동 구성됨",
"configured": "수동 설정됨",
"needs_setup": "설정 필요",
"invalid": "잘못됨",
"unsupported": "수동 설정"
@@ -732,8 +847,8 @@
"ready": "준비됨",
"missingDependency": "지원 패키지 없음",
"installSupport": "지원 패키지 설치",
"installConfirmTitle": "{{name}} 지원을 설치할까요?",
"installConfirmDescription": "nanobot이 {{name}}에 필요한 것을 추가한 뒤 활성화합니다. 계속할까요?",
"installConfirmTitle": "{{name}}에 필요한 패키지를 설치할까요?",
"installConfirmDescription": "nanobot이 필요한 패키지를 설치한 뒤 {{name}} 기능을 활성화합니다.",
"installConfirmAction": "설치하고 활성화",
"websocketRequired": "WebUI 필수",
"channelDisabled": "채널이 비활성화됨",
@@ -758,7 +873,7 @@
"loading": "자동화를 불러오는 중...",
"noMatches": "이 보기와 일치하는 자동화가 없습니다.",
"empty": "아직 자동화가 없습니다.",
"emptyHint": "올바른 컨텍스트를 유지하려면 채팅에서 자동화를 만드세요.",
"emptyHint": "채팅에서 자동화를 만들면 해당 대화의 맥락을 활용할 수 있습니다.",
"emptyAction": "채팅 열기",
"clearFilters": "필터 지우기",
"oneShot": "일회성",
@@ -782,7 +897,7 @@
"commandCopied": "복사됨",
"copyCommand": "복사",
"deleteTitle": "자동화 삭제",
"deleteDescription": "{{name}}을 cron 저장소에서 삭제합니다. 이전 채팅 메시지는 세션에 남습니다.",
"deleteDescription": "자동화 ‘{{name}}’을 삭제합니다. 기존 메시지는 채팅에 남습니다.",
"cancel": "취소",
"status": {
"system": "시스템",
@@ -821,9 +936,9 @@
"cronWithTz": "Cron {{expr}} · {{tz}}",
"withTz": "{{summary}} · {{tz}}",
"dailyAt": "매일 {{time}}",
"weekdaysAt": "평일 {{time}}",
"hourlyAt": "매시간 :{{minute}}",
"hourlyWindow": "{{start}}-{{end}} 사이 매시간 :{{minute}}",
"weekdaysAt": "월요일~금요일 {{time}}",
"hourlyAt": "매시 {{minute}}분",
"hourlyWindow": "{{start}}~{{end}} 사이 매시 {{minute}}분",
"local": "로컬 트리거",
"custom": "사용자 지정 일정"
},
@@ -875,11 +990,11 @@
"signInAgain": "다시 로그인",
"signOut": "로그아웃",
"signedInAs": "{{account}}로 로그인됨",
"signInHelp": "이 기기에서 로그인합니다. API 키는 구성에 저장되지 않습니다.",
"signInHelp": "이 기기에서 로그인합니다. API 키는 설정에 저장되지 않습니다.",
"remoteSignInHelp": "로그인을 선택하여 사용자 컴퓨터에서 xAI를 연 다음, 로그인 후 표시되는 인증 코드를 붙여 넣으세요.",
"codexRemoteSignInHelp": "이 브라우저에서 로그인한 다음 전체 localhost 콜백 URL을 nanobot에 붙여 넣으세요.",
"signInRequired": "로그인이 필요합니다",
"signInBeforeSaving": "프리셋을 저장하기 전에 이 제공자에 로그인하세요.",
"signInBeforeSaving": "프리셋을 저장하기 전에 이 제공업체에 로그인하세요.",
"signedIn": "로그인됨",
"notSignedIn": "로그인 안 됨",
"proxyLabel": "네트워크 프록시",
@@ -898,7 +1013,7 @@
"finishSignIn": "로그인 완료"
},
"skills": {
"description": "이 에이전트가 대화 중에 불러올 수 있는 지시 스킬을 확인합니다.",
"description": "에이전트가 대화 중에 사용할 수 있는 스킬을 관리합니다.",
"caption": "{{available}}개 사용 가능 · 총 {{total}}개",
"views": "스킬 보기",
"installedTab": "설치됨",
@@ -917,20 +1032,20 @@
"showLess": "접기",
"showMore": "더 보기",
"enabledControl": "이 스킬 사용",
"enabledDescription": "요구 사항이 준비되면 에이전트가 이 스킬을 불러오도록 허용합니다.",
"enabledDescription": "필요한 조건이 충족되면 에이전트가 이 스킬을 사용할 수 있습니다.",
"enableSkill": "{{name}} 활성화",
"disableSkill": "{{name}} 비활성화",
"updateFailed": "이 스킬을 업데이트할 수 없습니다.",
"deleteTitle": "스킬 삭제",
"deleteDescription": "현재 워크스페이스에서 이 스킬을 제거합니다.",
"deleteDescription": "현재 작업 공간에서 이 스킬을 제거합니다.",
"deleteAction": "삭제",
"deleteFailed": "이 스킬을 삭제할 수 없습니다.",
"deleteConfirmTitle": "{{name}}을(를) 삭제하시겠습니까?",
"deleteConfirmDescription": "현재 워크스페이스에서 스킬 파일을 제거합니다. 이 작업은 되돌릴 수 없습니다.",
"deleteConfirmDescription": "현재 작업 공간에서 스킬 파일을 제거합니다. 이 작업은 되돌릴 수 없습니다.",
"deleteConfirmAction": "스킬 삭제",
"instructionsTitle": "스킬 안내",
"setupRequired": "설정 필요",
"setupDescription": "nanobot을 실행하는 컴퓨터에 누락된 종속성을 설치한 후 다시 확인하세요.",
"setupDescription": "nanobot을 실행하는 컴퓨터에 필요한 패키지를 설치한 후 다시 확인하세요.",
"copySetupCommand": "설정 명령 복사",
"checkAgain": "다시 확인",
"marketplaceSearchFailed": "스킬 마켓을 검색할 수 없습니다.",
@@ -975,16 +1090,16 @@
"noRequirements": "명시된 요구 사항이 없습니다.",
"commands": "명령",
"environment": "환경 변수",
"missingCommands": "CLI 누락",
"missingEnvironment": "ENV 누락",
"missingCommands": "필요한 명령줄 도구",
"missingEnvironment": "설정되지 않은 환경 변수",
"unavailableReasonLabel": "사용 불가 이유",
"rawInstructions": "원본 SKILL.md",
"rawInstructionsEmpty": "원본 지침이 없습니다.",
"rawInstructions": "SKILL.md 내용",
"rawInstructionsEmpty": "지침이 없습니다.",
"detailDescription": "{{name}} 세부 정보."
},
"voice": {
"selectProvider": "제공자 선택",
"configureProvider": "제공자 설정",
"selectProvider": "제공업체 선택",
"configureProvider": "제공업체 설정",
"languageAuto": "자동"
}
},
+219 -104
View File
@@ -25,6 +25,7 @@
"system": {
"section": "Sistema",
"restartHint": "Reinicie o nanobot para aplicar as alterações de tempo de execução.",
"restartAction": "Reiniciar",
"restart": "Reiniciar nanobot",
"restarting": "Reiniciando nanobot...",
"restartEngine": "Reiniciar motor",
@@ -60,6 +61,7 @@
"closeAction": "Fechar chat temporário: {{title}}"
},
"sidebar": {
"resize": "Redimensionar a barra lateral",
"navigation": "Navegação da barra lateral",
"collapse": "Recolher barra lateral",
"newChat": "Novo tópico",
@@ -80,12 +82,92 @@
}
},
"settings": {
"timezoneNoMatches": "Nenhum fuso horário encontrado.",
"configure": "Configurar",
"exit": {
"title": "Reiniciar o nanobot antes de sair das configurações?",
"description": "As alterações foram salvas. Reinicie para aplicá-las.",
"later": "Reiniciar mais tarde"
},
"runtimeConfig": {
"apiSaved": "Salvo. Reinicie o serviço de API para aplicar as alterações.",
"fields": {
"agents_defaults_timezone_mode": {"label": "Usar o fuso horário do sistema", "help": "Desative para escolher o fuso horário manualmente."},
"agents_defaults_timezone": {"label": "Fuso horário", "help": "Escolha um fuso horário. A diferença em relação ao UTC considera a data atual."},
"agents_defaults_dream_enabled": {"label": "Consolidação de memória", "help": "Organiza informações úteis das conversas. A memória existente continua disponível após desativar."},
"gateway_heartbeat_enabled": {"label": "Verificação periódica", "help": "Verifica periodicamente as tarefas em HEARTBEAT.md."},
"gateway_heartbeat_interval_s": {"label": "Intervalo de verificação (segundos)", "help": "O gateway agenda as verificações ao iniciar."},
"agents_defaults_max_tool_iterations": {"label": "Iterações de ferramentas por turno", "help": "Número máximo de interações entre o modelo e as ferramentas em um turno."},
"agents_defaults_max_concurrent_subagents": {"label": "Subagentes simultâneos", "help": "Número máximo de subagentes executados ao mesmo tempo."},
"agents_defaults_max_tool_result_chars": {"label": "Tamanho dos resultados das ferramentas (caracteres)", "help": "Limita a saída das ferramentas incluída no contexto do modelo."},
"agents_defaults_provider_retry_mode": {"label": "Repetir solicitações ao modelo continuamente", "help": "Tenta novamente quando uma solicitação ao modelo falha por um erro temporário. Desative para limitar o número de tentativas."},
"agents_defaults_tool_hint_max_length": {"label": "Tamanho das indicações das ferramentas (caracteres)", "help": "Tamanho máximo das indicações breves de atividade."},
"tools_max_session_messages_per_minute": {"label": "Mensagens das ferramentas por minuto", "help": "Limita a frequência das mensagens enviadas pelas ferramentas à conversa."},
"agents_defaults_unified_session": {"label": "Compartilhar conversas entre plataformas", "help": "Usa a mesma conversa para um usuário em diferentes plataformas de chat."},
"tools_exec_enable": {"label": "Ferramenta de shell", "help": "Permite que o agente execute comandos de shell."},
"tools_file_enable": {"label": "Ferramentas de arquivos", "help": "Permite as ferramentas integradas de leitura e edição de arquivos."},
"tools_web_enable": {"label": "Ferramentas web", "help": "Permite pesquisar na web e obter páginas."},
"tools_cli_apps_enable": {"label": "Ferramenta de aplicativos CLI", "help": "Permite que o agente gerencie e execute aplicativos de linha de comando."},
"tools_my_enable": {"label": "Ferramenta de autogerenciamento", "help": "Permite que o agente consulte sua própria configuração."},
"tools_my_allow_set": {"label": "Alterações de configuração pelo agente", "help": "Permite que a ferramenta de autogerenciamento atualize a configuração."},
"tools_exec_timeout": {"label": "Tempo limite de comandos (segundos)", "help": "Duração máxima dos comandos de shell. 0 significa sem limite."},
"tools_exec_path_prepend": {"label": "Caminhos prioritários", "help": "Diretórios adicionados ao início de PATH. Separe-os com ponto e vírgula no Windows ou com dois-pontos no macOS e no Linux."},
"tools_exec_path_append": {"label": "Caminhos adicionais", "help": "Diretórios adicionados ao final de PATH. Separe-os com ponto e vírgula no Windows ou com dois-pontos no macOS e no Linux."},
"tools_exec_sandbox": {"label": "Sandbox de comandos", "help": "Use bwrap no Linux ou Seatbelt no macOS. As verificações do espaço de trabalho, por si só, não isolam processos."},
"tools_exec_sandbox_ro_binds": {"label": "Caminhos de somente leitura do sandbox", "help": "Montagens adicionais de somente leitura, uma por linha."},
"tools_exec_sandbox_rw_binds": {"label": "Caminhos graváveis do sandbox", "help": "Montagens adicionais com permissão de escrita, uma por linha."},
"tools_exec_allowed_env_keys": {"label": "Variáveis de ambiente permitidas", "help": "Variáveis adicionais passadas aos comandos, uma por linha. As variáveis básicas necessárias continuam disponíveis."},
"tools_exec_allow_patterns": {"label": "Padrões de comandos permitidos", "help": "Uma expressão regular por linha. Se houver regras, cada trecho do comando deve corresponder por completo a uma delas. Os comandos permitidos ignoram as regras de bloqueio integradas e personalizadas, mas continuam sujeitos às restrições de rede e do espaço de trabalho."},
"tools_exec_deny_patterns": {"label": "Padrões de comandos bloqueados", "help": "Expressões regulares de bloqueio adicionais, uma por linha. As regras de permissão explícitas têm prioridade sobre as regras de bloqueio integradas e personalizadas."},
"tools_web_proxy": {"label": "Proxy web", "help": "URL do proxy das ferramentas web. Deixe vazio para usar a rede padrão."},
"tools_web_user_agent": {"label": "Cabeçalho User-Agent", "help": "Cabeçalho User-Agent personalizado. Deixe vazio para usar o valor padrão."},
"tools_restrict_to_workspace": {"label": "Restringir ferramentas ao espaço de trabalho", "help": "Política global das ferramentas. As permissões de cada conversa WebUI são configuradas separadamente."},
"tools_ssrf_whitelist": {"label": "Faixas de rede privada permitidas", "help": "Endereços IP ou faixas CIDR isentos da proteção de solicitações de saída, um por linha."},
"tools_webui_allow_remote_package_install": {"label": "Instalação remota de pacotes", "help": "Permite instalar pacotes e habilidades pela WebUI remota. Esta configuração precisa ser alterada no computador que executa o gateway."},
"tools_cli_apps_install_timeout": {"label": "Tempo limite de instalação (segundos)", "help": "Duração máxima da instalação de aplicativos CLI."},
"tools_cli_apps_run_timeout": {"label": "Tempo limite de execução (segundos)", "help": "Duração máxima dos comandos de aplicativos CLI."},
"tools_cli_apps_catalog_ttl_seconds": {"label": "Duração do cache do catálogo (segundos)", "help": "Tempo de armazenamento do catálogo de aplicativos CLI em cache."},
"gateway_host": {"label": "Endereço de escuta do gateway", "help": "Endereço em que o gateway recebe conexões. Os endereços de WebSocket e WebUI são configurados em Canais → WebSocket."},
"gateway_port": {"label": "Porta do gateway", "help": "Porta salva. Os argumentos de linha de comando têm prioridade."},
"gateway_restart_mode": {"label": "Modo de reinicialização", "help": "Método de reinicialização do processo. O modo automático depende do ambiente do host."},
"api_host": {"label": "Endereço de escuta da API", "help": "É necessária uma chave de API para receber conexões em um endereço diferente de localhost. Configure a chave em Sistema e reinicie o serviço de API para aplicar as alterações."},
"api_timeout": {"label": "Tempo limite das solicitações API (segundos)", "help": "Duração máxima das solicitações. Reinicie o serviço de API para aplicar as alterações."},
"tools_image_generation_save_dir": {"label": "Pasta das imagens geradas", "help": "Caminho relativo dentro da pasta de mídia do nanobot. As imagens existentes não são movidas."}
},
"groups": {
"chat": {"title": "Permissões de chat WebUI", "help": "Acesso a serviços locais e permissões padrão das conversas."},
"identity": {"title": "Fuso horário", "help": "Escolha o fuso horário das tarefas agendadas."},
"memory": {"title": "Memória", "help": "Ative ou desative a consolidação automática de memória."},
"heartbeat": {"title": "Verificações periódicas", "help": "Configure a verificação periódica integrada de tarefas."},
"execution": {"title": "Limites do agente", "help": "Execução de ferramentas e novas tentativas."},
"sessions": {"title": "Conversas", "help": "Compartilhe conversas entre plataformas."},
"tools": {"title": "Ferramentas integradas", "help": "Escolha as categorias de ferramentas permitidas."},
"shell": {"title": "Shell e sandbox", "help": "Tempos limite, ambiente, montagens e filtros de comandos."},
"network": {"title": "Conexão web", "help": "Proxy e identificação das solicitações web."},
"safety": {"title": "Políticas globais de acesso", "help": "Restrições do espaço de trabalho, redes privadas e instalações remotas."},
"cli": {"title": "Limites dos aplicativos CLI", "help": "Tempos de instalação, execução e cache do catálogo."},
"gateway": {"title": "Processo do gateway", "help": "Configuração de implantação e reinicialização do processo."},
"api": {"title": "Detalhes do servidor API", "help": "Endereço de escuta e tempo limite das solicitações."},
"storage": {"title": "Armazenamento de imagens", "help": "Local das imagens geradas."},
"maintenance": {"title": "Agendamento de memória", "help": ""},
"web": {"title": "Acesso web", "help": ""},
"applications": {"title": "Aplicativos de linha de comando", "help": ""}
},
"save": "Salvar alterações", "saving": "Salvando…", "discard": "Descartar alterações", "saved": "Salvo.",
"restart": "Reiniciar nanobot", "restartHelp": "Reinicie para aplicar as alterações. Os argumentos de linha de comando e as variáveis de ambiente podem ter prioridade.",
"search": "Buscar uma configuração avançada", "noResults": "Nenhuma configuração correspondente.", "pending": "Alterações não salvas",
"numberError": "Digite um número válido dentro do intervalo permitido.", "activeModel": "Usar o modelo ativo", "none": "Nenhum",
"auto": "Automático", "manual": "Manual", "standard": "Padrão", "persistent": "Contínuo",
"unavailable": "Atualize o gateway para editar estas configurações.", "advancedOptions": "Opções avançadas"
},
"backToChat": "Voltar para a conversa",
"sidebar": {
"title": "Configurações",
"ariaLabel": "Seções de configurações"
},
"nav": {
"about": "Sobre",
"capabilities": "Recursos",
"general": "Geral",
"byok": "BYOK",
"overview": "Visão geral",
@@ -99,7 +181,8 @@
"cliApps": "Aplicativos CLI",
"mcp": "MCP",
"runtime": "Sistema",
"advanced": "Segurança",
"advanced": "Avançado",
"memory": "Memória",
"apps": "Aplicativos",
"automations": "Automações",
"skills": "Habilidades"
@@ -110,19 +193,19 @@
"system": "Sistema",
"about": "Sobre",
"status": "Status",
"localPreferences": "Preferências locais",
"localPreferences": "Preferências do navegador",
"presets": "Predefinições",
"imageGeneration": "Geração de imagens",
"imageDefaults": "Padrões",
"webSearch": "Busca na web",
"webBehavior": "Comportamento",
"webBehavior": "Acesso a páginas web",
"cliApps": "Aplicativos CLI",
"mcp": "Servidores MCP",
"regional": "Regional",
"regional": "Região e idioma",
"webuiSafety": "Segurança da WebUI",
"capabilities": "Capacidades",
"capabilities": "Recursos",
"apps": "Aplicativos",
"nativeHost": "Host nativo",
"nativeHost": "Aplicativo para desktop",
"hostSafety": "Segurança do app",
"voiceInput": "Entrada de voz"
},
@@ -130,7 +213,7 @@
"selectModel": "Selecionar modelo",
"addConfiguration": "Adicionar configuração",
"newConfiguration": "Nova configuração de modelo",
"newConfigurationHelp": "Salve um provedor e um modelo como uma opção de um clique.",
"newConfigurationHelp": "Salve um provedor e um modelo para selecioná-los rapidamente.",
"configurationName": "Nome da configuração",
"configurationNameHelp": "Renomeie esta configuração de modelo.",
"configurationNamePlaceholder": "Escrita rápida",
@@ -163,21 +246,22 @@
"disabled": "Desabilitado",
"noPresets": "Ainda não há predefinições de modelo",
"noPresetsHelp": "Crie uma predefinição e adicione-a à ordem de chamada.",
"removeBeforeDelete": "Remova esta predefinição da ordem de chamada antes de excluí-la.",
"removeBeforeDelete": "Escolha outra predefinição principal antes de excluir esta.",
"providerSetupRequired": "Configuração do provedor necessária",
"configureProviderBeforeSaving": "Configure este provedor antes de salvar a predefinição.",
"deletePresetTitle": "Excluir predefinição de modelo?",
"deletePresetHelp": "A predefinição “{{name}}” será removida. As credenciais do provedor não serão afetadas.",
"deletePresetHelp": "A predefinição “{{name}}” será excluída e removida da ordem de chamada. As credenciais do provedor serão mantidas.",
"searchModels": "Buscar ou digitar ID do modelo",
"useCustomModel": "Usar",
"loadingModels": "Carregando modelos...",
"searchCatalog": "Pesquise o catálogo do provedor para escolher um modelo.",
"availableCount": "Modelos disponíveis: {{count}}",
"modelsAvailable": "disponíveis",
"noModelResults": "Nenhum modelo correspondente.",
"loadFailed": "Lista de modelos indisponível.",
"unsupportedModelList": "Digite o ID do modelo manualmente.",
"providerNotConfigured": "Configure este provedor antes de carregar modelos.",
"autoProviderCustomOnly": "O modo de provedor automático usa IDs de modelo personalizados."
"autoProviderCustomOnly": "Digite um ID de modelo para usar a seleção automática de provedor."
},
"rows": {
"theme": "Tema",
@@ -185,7 +269,7 @@
"provider": "Provedor",
"model": "Modelo",
"restart": "Reiniciar nanobot",
"configPath": "Caminho da configuração",
"configPath": "Arquivo de configuração",
"activePreset": "Predefinição ativa",
"gateway": "Gateway",
"restartState": "Estado do reinício",
@@ -193,9 +277,8 @@
"currentModel": "Configuração atual",
"selectedPreset": "Predefinição selecionada",
"presetModel": "Modelo da predefinição",
"density": "Densidade",
"activityMode": "Detalhe de atividade",
"fileEditDisplay": "Exibição de edição de arquivo",
"activityMode": "Detalhes da atividade",
"fileEditDisplay": "Exibição das alterações em arquivos",
"codeWrap": "Quebra de linha no código",
"brandLogos": "Logos de marca",
"browserNotifications": "Notificações de tarefas",
@@ -205,11 +288,11 @@
"imageGeneration": "Geração de imagens",
"imageProvider": "Provedor de imagem",
"imageProviderStatus": "Status do provedor",
"imageProviderBase": "Base do provedor",
"imageProviderBase": "URL base do provedor",
"imageModel": "Modelo de imagem",
"defaultAspectRatio": "Proporção padrão",
"defaultImageSize": "Tamanho padrão",
"maxImagesPerTurn": "Máx. de imagens por turno",
"maxImagesPerTurn": "Máx. de imagens por solicitação",
"imageSaveDir": "Diretório de salvamento",
"timezone": "Fuso horário",
"workspacePath": "Espaço de trabalho padrão",
@@ -237,40 +320,39 @@
"currentModel": "Usado para novas respostas.",
"selectedModelProvider": "Definido pelo modelo selecionado.",
"selectedModelValue": "Definido pelo modelo selecionado.",
"selectedPreset": "As predefinições nomeadas são somente leitura aqui; edite-as em config.json.",
"presetModel": "Mude para Padrão para editar o modelo e o provedor pela WebUI.",
"density": "Armazenado apenas neste navegador.",
"selectedPreset": "Gerencie as predefinições na seção Modelos.",
"presetModel": "Altere o provedor e o modelo na seção Modelos.",
"activityMode": "Escolha quanto detalhe de atividade do agente é exibido por padrão.",
"fileEditDisplay": "Escolha se a atividade de edição de arquivo é exibida como contagem de linhas ou como diferenças.",
"codeWrap": "Mantém linhas longas de código legíveis em telas menores.",
"brandLogos": "Mostra logotipos de provedores terceiros e de CLIs em Configurações.",
"browserNotifications": "Notifica somente quando esta página está em segundo plano. Desativado por padrão.",
"maxResults": "Resultados retornados por cada chamada de web_search.",
"maxResults": "Número máximo de resultados por busca na web.",
"timeout": "Segundos antes de uma requisição de busca expirar.",
"jinaReader": "Usa o Jina Reader para web_fetch quando disponível.",
"imageGeneration": "Expõe generate_image nas conversas quando há um provedor de imagem configurado.",
"imageProvider": "Escolha o provedor do registro usado por generate_image.",
"jinaReader": "Usa o Jina Reader para ler páginas web quando disponível.",
"imageGeneration": "Permite que o agente gere imagens nas conversas quando há um provedor configurado.",
"imageProvider": "Escolha o provedor usado para gerar imagens.",
"imageProviderStatus": "A geração de imagens reaproveita as credenciais dos provedores.",
"imageModel": "Nome do modelo enviado ao provedor de imagem selecionado.",
"defaultAspectRatio": "Usado quando a instrução não escolhe uma proporção.",
"defaultImageSize": "Dica de tamanho enviada a provedores compatíveis.",
"maxImagesPerTurn": "Limite superior para uma requisição de generate_image.",
"defaultAspectRatio": "Usado quando a solicitação não especifica as proporções da imagem.",
"defaultImageSize": "Tamanho de imagem solicitado aos provedores compatíveis.",
"maxImagesPerTurn": "Número máximo de imagens geradas por solicitação.",
"timezone": "Usado para agendamentos e respostas sensíveis ao horário.",
"cliAppsCatalog": "Instale apenas os adaptadores CLI de aplicativos que o nanobot pode executar localmente; aplicativos nativos permanecem intactos.",
"cliAppsCatalog": "Instala as ferramentas de linha de comando que o nanobot pode usar neste computador. Os aplicativos para desktop não são alterados.",
"cliAppsFilter": "Busque por aplicativo, categoria ou capacidade.",
"localServiceAccess": "Permite que comandos shell com acesso completo alcancem serviços locais.",
"webuiDefaultAccess": "Usado por chats web sem permissão específica de projeto.",
"securityManagedControls": "As buscas na web sempre protegem serviços locais, privados e de metadados. A segurança essencial dos canais fica em config.json.",
"logs": "Abre a pasta de logs do motor nativo.",
"diagnostics": "Exporta um pequeno relatório de tempo de execução para o suporte.",
"securityManagedControls": "As ferramentas web bloqueiam o acesso a serviços locais, redes privadas e serviços de metadados, exceto quando há permissão explícita. As demais configurações de segurança dos canais são gerenciadas em config.json.",
"logs": "Abre a pasta de logs do aplicativo para desktop.",
"diagnostics": "Exporta um relatório de diagnóstico para a equipe de suporte.",
"localServiceAccessNative": "Permite que comandos shell com acesso completo alcancem serviços neste Mac.",
"webuiDefaultAccessNative": "Usado por chats nativos sem permissão específica de projeto.",
"contextWindow": "Escolha o orçamento de contexto padrão para esta configuração de modelo.",
"contextWindow": "Escolha o limite de contexto padrão para esta configuração de modelo.",
"transcription": "Transcreve a entrada do microfone antes de enviá-la. Mensagens de voz dos canais de chat usam as mesmas configurações.",
"transcriptionProvider": "Usa as credenciais do provedor correspondente em Provedores.",
"transcriptionProviderStatus": "As chaves de API ficam em provedores, não nas configurações de transcrição.",
"transcriptionModel": "Deixe como o padrão resolvido, a menos que seu provedor precise de um id de modelo personalizado.",
"transcriptionLanguage": "Dica ISO-639 opcional, como en, zh, ja ou ko."
"transcriptionModel": "Use o modelo padrão, a menos que o provedor exija um ID de modelo específico.",
"transcriptionLanguage": "Código de idioma ISO-639 opcional, como en, zh, ja ou ko. Deixe em branco para detectar o idioma automaticamente."
},
"timezone": {
"select": "Selecionar fuso horário",
@@ -279,25 +361,29 @@
},
"cliApps": {
"allCategories": "Todas as categorias",
"availableCount_one": "{{count}} aplicativo",
"availableCount_other": "{{count}} aplicativos",
"availableCount": "{{count}} aplicativos",
"installedCount": "{{count}} CLIs instaladas",
"summary": "{{installed}} de {{total}} CLIs instaladas",
"installedCount_one": "{{count}} ferramenta CLI instalada",
"installedCount_other": "{{count}} ferramentas CLI instaladas",
"installedCount": "{{count}} ferramentas CLI instaladas",
"summary": "{{installed}} de {{total}} ferramentas CLI instaladas",
"filterAll": "Todos",
"filterInstalled": "CLIs instaladas",
"filterInstalled": "Ferramentas CLI instaladas",
"filterNotInstalled": "Não instaladas",
"searchPlaceholder": "Buscar CLIs",
"searchPlaceholder": "Buscar ferramentas CLI",
"loading": "Carregando aplicativos CLI...",
"empty": "Nenhum aplicativo CLI corresponde a este filtro.",
"statusInstalled": "Aplicativo pronto",
"statusMissing": "Faltando",
"statusInstalled": "Instalado",
"statusMissing": "Dependência ausente",
"statusAvailable": "Disponível",
"statusUnsupported": "Não compatível",
"statusNotInstalled": "Aplicativo não instalado",
"statusNotInstalled": "Não instalado",
"requires": "Requer",
"test": "Testar aplicativo",
"update": "Atualizar aplicativo",
"uninstall": "Desinstalar aplicativo",
"install": "Instalar aplicativo",
"test": "Testar ferramenta CLI",
"update": "Atualizar ferramenta CLI",
"uninstall": "Desinstalar ferramenta CLI",
"install": "Instalar ferramenta CLI",
"readyTitle": "@{{name}} está pronto",
"readyStatus": "Pronto",
"readyTry": "Experimentar @{{name}}",
@@ -309,10 +395,13 @@
"noDescription": "Nenhuma descrição disponível."
},
"about": {
"documentation": "Documentação",
"sourceCode": "Código-fonte",
"reportIssue": "Relatar um problema",
"version": "Versão",
"checking": "Verificando...",
"checkForUpdates": "Verificar atualizações",
"upToDate": "Você está atualizado",
"upToDate": "O nanobot está atualizado",
"updateAvailable": "Atualização disponível v{{version}}"
},
"mcp": {
@@ -335,18 +424,20 @@
"authNone": "Nenhuma",
"authHeaders": "Cabeçalhos",
"command": "Comando",
"args": "Argumentos JSON",
"headers": "Cabeçalhos JSON",
"args": "Argumentos (JSON)",
"headers": "Cabeçalhos (JSON)",
"oauthAfterSave": "Salve o servidor e selecione Conectar para entrar.",
"headersHelp": "Adicione os cabeçalhos de solicitação usados por este servidor.",
"env": "Ambiente JSON",
"timeout": "Tempo limite da ferramenta",
"env": "Variáveis de ambiente (JSON)",
"timeout": "Tempo limite das ferramentas (segundos)",
"advancedOptions": "Opções avançadas",
"hideAdvanced": "Ocultar avançado",
"saveCustom": "Salvar MCP",
"hideAdvanced": "Ocultar opções avançadas",
"saveCustom": "Salvar servidor",
"configImport": "Importar mcp.json",
"importConfig": "Importar",
"restartRequired": "Reinicie o nanobot para conectar as ferramentas MCP atualizadas.",
"toolsFound_one": "{{count}} ferramenta",
"toolsFound_other": "{{count}} ferramentas",
"toolsFound": "{{count}} ferramentas",
"loading": "Carregando predefinições MCP...",
"empty": "Nenhuma predefinição MCP corresponde a este filtro.",
@@ -383,7 +474,7 @@
"connectionCancelled": "Conexão cancelada.",
"reloadFailed": "Login concluído, mas o nanobot não conseguiu conectar as ferramentas. Tente reiniciar o nanobot.",
"oauthFailed": "Não foi possível conectar. Tente fazer login novamente.",
"statusMissingDependency": "Precisa de dependência",
"statusMissingDependency": "Dependência necessária",
"statusComingSoon": "Em breve",
"comingSoon": "Em breve",
"statusNotInstalled": "Não habilitado",
@@ -411,14 +502,14 @@
"toolScope": "Ferramentas",
"allTools": "Ativar todas",
"noTools": "Desativar todas",
"reloadTools": "Recarregar ferramentas",
"reloadTools": "Atualizar lista de ferramentas",
"presetDescriptions": {
"browserbase": "Automatize navegadores na nuvem com o Browserbase.",
"playwright": "Inspecione e automatize navegadores locais com o Playwright.",
"context7": "Obtenha documentação atualizada e exemplos de código.",
"firecrawl": "Rastreie, pesquise e extraia conteúdo da web.",
"parallel-search": "Pesquise na web e leia páginas relevantes.",
"exa": "Pesquise na web e extraia conteúdo limpo das páginas.",
"exa": "Pesquise na web e extraia o conteúdo das páginas.",
"microsoft-learn": "Pesquise e leia a documentação do Microsoft Learn.",
"aws-docs": "Pesquise a documentação e os guias de serviços da AWS.",
"brave-search": "Pesquise web, notícias, imagens, vídeos e resultados locais com o Brave Search.",
@@ -442,8 +533,6 @@
"privateEngine": "Motor privado",
"unixSocket": "Socket Unix",
"defaultWorkspace": "Espaço de trabalho padrão",
"comfortable": "Confortável",
"compact": "Compacto",
"auto": "Automático",
"expanded": "Expandido",
"default": "Padrão",
@@ -467,13 +556,13 @@
"loadError": "Não foi possível carregar as configurações",
"unsaved": "Alterações não salvas.",
"upToDate": "Atualizado.",
"savedRestart": "Salvo. Reinicie o nanobot para aplicar.",
"savedRestart": "Salvo. Reinicie o nanobot para aplicar as alterações.",
"restartAfterSaving": "Salve as alterações e reinicie quando estiver pronto.",
"savedRestartApply": "Salvo. Reinicie quando estiver pronto.",
"imageProviderRestart": "Alterações do provedor de imagem salvas. Reinicie quando estiver pronto.",
"savedRestartApply": "Salvo. Reinicie o nanobot para aplicar as alterações.",
"imageProviderRestart": "Provedor de imagens salvo. Reinicie o nanobot para aplicar as alterações.",
"hostRestartAfterSaving": "Ao salvar, o nanobot reiniciará o motor.",
"hostRestartPending": "Salvo. O motor será reiniciado quando estiver pronto.",
"hostApiUnavailable": "As ações do host só estão disponíveis dentro do app nativo.",
"hostApiUnavailable": "Estas ações estão disponíveis apenas no aplicativo para desktop.",
"logsOpened": "Pasta de logs aberta.",
"logsOpenFailed": "Não foi possível abrir a pasta de logs.",
"diagnosticsExported": "Diagnóstico exportado para {{path}}.",
@@ -495,7 +584,7 @@
"exporting": "Exportando..."
},
"byok": {
"description": "Traga suas próprias chaves de provedor. O nanobot lê esses valores da configuração atual e apenas provedores configurados podem ser usados nas predefinições de modelo.",
"description": "Use suas próprias chaves de API. Apenas provedores configurados podem ser usados nas predefinições de modelo.",
"configured": "Configurado",
"notConfigured": "Não configurado",
"configuredSection": "Configurados",
@@ -503,7 +592,7 @@
"showMore": "Mostrar mais {{count}}",
"showLess": "Mostrar menos",
"apiKey": "Chave de API",
"apiBase": "Base da API",
"apiBase": "URL base da API",
"apiKeyPlaceholder": "Informe a chave de API",
"apiKeyConfiguredPlaceholder": "Deixe em branco para manter a chave atual",
"configuredKeyHint": "Chave configurada",
@@ -512,8 +601,8 @@
"showApiKey": "Mostrar chave de API",
"hideApiKey": "Ocultar chave de API",
"noConfiguredProviders": "Nenhum provedor configurado",
"configureFirst": "Configure primeiro um provedor em BYOK.",
"openByok": "Abrir BYOK",
"configureFirst": "Configure primeiro um provedor na seção Provedores.",
"openByok": "Configurar provedor",
"tabs": {
"ariaLabel": "Tipo de credencial BYOK",
"llm": "LLM",
@@ -521,12 +610,12 @@
},
"webSearch": {
"provider": "Provedor de busca",
"providerHelp": "Escolha o backend usado pela ferramenta de busca na web.",
"providerHelp": "Escolha o serviço usado para buscar na web.",
"selectProvider": "Selecionar provedor",
"credentials": "Credenciais",
"noCredentialRequired": "Não requer chave",
"noCredentialHelp": "DuckDuckGo funciona sem uma chave de API salva.",
"apiKeyHelp": "Armazenado em config e mascarado após salvar.",
"apiKeyHelp": "A chave é salva na configuração e fica oculta após salvar.",
"baseUrl": "URL base",
"baseUrlHelp": "O SearXNG precisa da URL da sua própria instância.",
"baseUrlPlaceholder": "https://search.example.com",
@@ -549,6 +638,30 @@
"usage": {
"title": "Atividade de tokens",
"shortTitle": "Uso de tokens",
"last30Days": "Últimos 30 dias",
"viewDetails": "Ver detalhes",
"previousPage": "Página anterior",
"nextPage": "Próxima página",
"dailyAverage": "Média diária",
"inputTokens": "Tokens de entrada",
"cacheHitRate": "Taxa de acertos de cache",
"requestTrend": "Solicitações diárias",
"cacheRateHelp": "A taxa exclui entradas com estado de cache desconhecido.",
"dailyTrend": "Uso diário de tokens",
"systemHelp": "Inclui a geração de títulos de conversas, outras tarefas internas e chamadas sem origem registrada.",
"bySource": "Uso por origem",
"byModel": "Uso por modelo",
"modelTrend": "Tendência de uso por modelo",
"modelsUnavailable": "Sem detalhamento por modelo.",
"otherModels": "Outros / não atribuídos",
"unclassified": "Não classificado",
"unavailable": "Os dados de uso estão indisponíveis.",
"noActivity": "Nenhum token usado nos últimos 30 dias.",
"cachedInput": "Entrada em cache",
"cacheMiss": "Entrada fora do cache",
"cacheUnknown": "Estado do cache desconhecido",
"outputTokens": "Saída",
"otherTokens": "Outros tokens",
"subtitle": "Uso reportado pelo provedor nos últimos 12 meses.",
"empty": "A atividade de tokens aparecerá após novas respostas do modelo.",
"totalTokens": "Total de tokens",
@@ -567,8 +680,8 @@
"user": "Chat",
"api": "API",
"cron": "Automações",
"dream": "Memória",
"system": "Sistema"
"dream": "Consolidação de memória",
"system": "Chamadas auxiliares"
}
},
"providers": {
@@ -584,11 +697,11 @@
"saveAdvancedBeforeSignIn": "Salve as alterações avançadas antes de entrar.",
"apiType": "Tipo de API",
"proxy": "Proxy de rede",
"thinkingStyle": "Estilo de raciocínio",
"thinkingStyle": "Formato dos parâmetros de raciocínio",
"region": "Região",
"profile": "Perfil",
"profile": "Perfil da AWS",
"extraHeaders": "Cabeçalhos adicionais",
"extraBody": "Corpo adicional",
"extraBody": "Campos adicionais do corpo da solicitação",
"extraQuery": "Parâmetros de consulta adicionais",
"capabilityFastMode": "Modo rápido",
"capabilityFastModeHelp": "Usa o nível de serviço prioritário da OpenAI para respostas mais rápidas. Isso consome créditos mais rapidamente.",
@@ -613,11 +726,11 @@
"missingCredential": "Configure o provedor antes de habilitar a geração de imagens."
},
"capabilities": {
"providerSupport": "Suporte do provedor",
"providerInstallOnSave": "O suporte necessário será instalado automaticamente ao salvar este provedor.",
"searchSupport": "Suporte do provedor de pesquisa",
"searchInstallOnSave": "O suporte ao Olostep será instalado automaticamente ao salvar.",
"installing": "Instalando suporte..."
"providerSupport": "Dependências do provedor",
"providerInstallOnSave": "As dependências necessárias serão instaladas automaticamente ao salvar este provedor.",
"searchSupport": "Dependências do serviço de busca",
"searchInstallOnSave": "As dependências do Olostep serão instaladas automaticamente ao salvar.",
"installing": "Instalando dependências…"
},
"api": {
"title": "Servidor de API",
@@ -635,16 +748,16 @@
"port": "Porta",
"portHelp": "A API usa esta porta local.",
"apiKey": "Chave de API",
"apiKeyHelp": "Os clientes enviam isto como um token Bearer.",
"apiKeyHelp": "Os clientes enviam a chave como um token Bearer.",
"apiKeyRequired": "Obrigatória antes de expor a API na rede.",
"apiKeyPlaceholder": "Informe uma chave de API",
"autoInstall": "O suporte à API será instalado automaticamente quando você iniciá-lo."
"autoInstall": "As dependências do servidor de API serão instaladas automaticamente ao iniciá-lo."
},
"observability": {
"title": "Observabilidade",
"configured": "Credenciais de tracing estão disponíveis para o nanobot.",
"configured": "As credenciais de rastreamento estão disponíveis para o nanobot.",
"environment": "Defina LANGFUSE_SECRET_KEY e LANGFUSE_PUBLIC_KEY e reinicie o nanobot.",
"enable": "Habilitar suporte a tracing"
"enable": "Ativar rastreamento"
},
"apps": {
"description": "Adicione ferramentas ao nanobot e mencione-as com @ na conversa.",
@@ -652,11 +765,11 @@
"mcpLabel": "MCP",
"channelLabel": "Canal",
"featureLabel": "Recurso",
"filterAll": "Prontos",
"filterAll": "Disponíveis",
"filterPlugins": "Complementos",
"filterCli": "Aplicativos",
"filterMcp": "MCP",
"enabledSummary": "{{count}} prontos",
"enabledSummary": "{{count}} disponíveis",
"caption": "{{cli}} aplicativos · {{mcp}} ferramentas MCP",
"searchPlaceholder": "Buscar ferramentas",
"featured": "Ferramentas",
@@ -674,7 +787,7 @@
},
"channels": {
"description": "Conecte aplicativos de chat, e-mail e WebUI ao nanobot.",
"caption": "{{enabled}} habilitados · {{total}} canais",
"caption": "{{enabled}} em execução · {{total}} canais",
"searchPlaceholder": "Buscar canais",
"backToChannels": "Todos os canais",
"catalog": "Canais",
@@ -684,7 +797,7 @@
"requires": "Requer: {{requirements}}",
"setUp": "Configurar",
"setupGuide": "Guia de configuração",
"setupSummary": "Habilitar apenas ativa o suporte no nanobot. Adicione as credenciais da plataforma e reinicie o nanobot.",
"setupSummary": "Ative o canal, adicione as credenciais da plataforma e reinicie o nanobot.",
"configKeys": "Chaves de configuração",
"enable": "Habilitar canal",
"disable": "Desabilitar canal",
@@ -701,12 +814,14 @@
"checkOnly": "Apenas verificar",
"commandCopied": "Comando copiado.",
"commandCopyFailed": "Não foi possível copiar o comando.",
"configuredInstances_one": "{{count}} instância configurada",
"configuredInstances_other": "{{count}} instâncias configuradas",
"configuredInstances": "{{count}} instâncias configuradas",
"connectPreview": "A próxima etapa é a conexão no navegador. Por enquanto, execute o comando abaixo.",
"copyCommand": "Copiar comando",
"filterAll": "Todos",
"filterOff": "Desativados",
"filterOn": "Ativados",
"filterOff": "Parados",
"filterOn": "Em execução",
"helperCopied": "{{name}} copiado.",
"helperCopyFailed": "Não foi possível copiar {{name}}.",
"hideSecret": "Ocultar segredo",
@@ -727,8 +842,8 @@
"selectChannel": "Ver configurações de {{name}}",
"setupSteps": "Próximas etapas",
"showSecret": "Mostrar segredo",
"toggleChannel": "Canal {{name}}",
"toggleInstance": "Instância {{name}}",
"toggleChannel": "Ativar {{name}}",
"toggleInstance": "Ativar a instância {{name}}",
"tryIt": "Experimente",
"validationFailed": "Verifique a configuração obrigatória antes de ativar.",
"validation": {
@@ -744,10 +859,10 @@
"enable": "Habilitar",
"disable": "Desabilitar",
"ready": "Pronto",
"missingDependency": "Suporte ausente",
"installSupport": "Instalar suporte",
"installConfirmTitle": "Instalar suporte para {{name}}?",
"installConfirmDescription": "O nanobot adicionará o que {{name}} precisa e depois o ativará. Continuar?",
"missingDependency": "Dependências ausentes",
"installSupport": "Instalar dependências",
"installConfirmTitle": "Instalar as dependências de {{name}}?",
"installConfirmDescription": "O nanobot instalará as dependências necessárias e ativará {{name}}.",
"installConfirmAction": "Instalar e habilitar",
"websocketRequired": "Necessário para a WebUI",
"channelDisabled": "Canal desabilitado",
@@ -796,7 +911,7 @@
"commandCopied": "Copiado",
"copyCommand": "Copiar",
"deleteTitle": "Excluir automação",
"deleteDescription": "Isso remove {{name}} do armazenamento do cron. As mensagens anteriores da conversa permanecem na sessão.",
"deleteDescription": "A automação “{{name}}” será excluída. As mensagens anteriores serão mantidas na conversa.",
"cancel": "Cancelar",
"status": {
"system": "Sistema",
@@ -835,9 +950,9 @@
"cronWithTz": "Cron {{expr}} · {{tz}}",
"withTz": "{{summary}} · {{tz}}",
"dailyAt": "Diariamente às {{time}}",
"weekdaysAt": "Dias úteis às {{time}}",
"hourlyAt": "A cada hora em :{{minute}}",
"hourlyWindow": "A cada hora {{start}}-{{end}} em :{{minute}}",
"weekdaysAt": "De segunda a sexta às {{time}}",
"hourlyAt": "A cada hora, no minuto {{minute}}",
"hourlyWindow": "A cada hora de {{start}} a {{end}}, no minuto {{minute}}",
"local": "Gatilho local",
"custom": "Agendamento personalizado"
},
@@ -889,7 +1004,7 @@
"signInAgain": "Entrar novamente",
"signOut": "Sair",
"signedInAs": "Conectado como {{account}}",
"signInHelp": "Entre por este dispositivo; nenhuma chave de API é armazenada em config.",
"signInHelp": "Entre por este dispositivo. Nenhuma chave de API é salva na configuração.",
"remoteSignInHelp": "Selecione Entrar para abrir a xAI no seu computador e depois cole o código de autorização exibido após o login.",
"codexRemoteSignInHelp": "Entre por este navegador e cole no nanobot a URL completa de callback do localhost.",
"signInRequired": "Login necessário",
@@ -912,7 +1027,7 @@
"finishSignIn": "Concluir login"
},
"skills": {
"description": "Revise as habilidades de instrução que este agente pode carregar durante uma conversa.",
"description": "Gerencie as habilidades que o agente pode usar durante uma conversa.",
"caption": "{{available}} disponíveis · {{total}} no total",
"views": "Visualizações de habilidades",
"installedTab": "Instaladas",
@@ -931,7 +1046,7 @@
"showLess": "Mostrar menos",
"showMore": "Mostrar mais",
"enabledControl": "Usar esta habilidade",
"enabledDescription": "Permite que o agente carregue esta habilidade quando os requisitos estiverem prontos.",
"enabledDescription": "Permite que o agente use esta habilidade quando os requisitos forem atendidos.",
"enableSkill": "Ativar {{name}}",
"disableSkill": "Desativar {{name}}",
"updateFailed": "Não foi possível atualizar esta habilidade.",
@@ -975,7 +1090,7 @@
"featured": "Habilidades do agente",
"empty": "Nenhuma habilidade disponível.",
"sourceWorkspace": "Personalizada",
"sourceBuiltin": "Embutida",
"sourceBuiltin": "Integrada",
"statusAvailable": "Disponível",
"statusUnavailable": "Indisponível",
"unavailableReason": "Faltando: {{reason}}",
@@ -989,11 +1104,11 @@
"noRequirements": "Sem requisitos explícitos.",
"commands": "Comandos",
"environment": "Variáveis de ambiente",
"missingCommands": "CLI ausente",
"missingEnvironment": "ENV ausente",
"missingCommands": "Ferramentas de linha de comando ausentes",
"missingEnvironment": "Variáveis de ambiente não configuradas",
"unavailableReasonLabel": "Motivo da indisponibilidade",
"rawInstructions": "SKILL.md bruto",
"rawInstructionsEmpty": "Sem instruções brutas.",
"rawInstructions": "Conteúdo de SKILL.md",
"rawInstructionsEmpty": "Nenhuma instrução disponível.",
"detailDescription": "Detalhes de {{name}}."
},
"voice": {
+215 -100
View File
@@ -25,6 +25,7 @@
"system": {
"section": "Hệ thống",
"restartHint": "Khởi động lại nanobot để áp dụng thay đổi thời gian chạy.",
"restartAction": "Khởi động lại",
"restart": "Khởi động lại nanobot",
"restarting": "Đang khởi động lại...",
"restartEngine": "Khởi động lại bộ máy",
@@ -60,6 +61,7 @@
"closeAction": "Đóng trò chuyện tạm thời: {{title}}"
},
"sidebar": {
"resize": "Điều chỉnh độ rộng thanh bên",
"navigation": "Điều hướng thanh bên",
"collapse": "Thu gọn thanh bên",
"newChat": "Chủ đề mới",
@@ -80,12 +82,92 @@
}
},
"settings": {
"timezoneNoMatches": "Không tìm thấy múi giờ phù hợp.",
"configure": "Cấu hình",
"exit": {
"title": "Khởi động lại nanobot trước khi rời phần cài đặt?",
"description": "Thay đổi đã được lưu. Khởi động lại để áp dụng.",
"later": "Khởi động lại sau"
},
"runtimeConfig": {
"apiSaved": "Đã lưu. Khởi động lại dịch vụ API để áp dụng thay đổi.",
"fields": {
"agents_defaults_timezone_mode": {"label": "Dùng múi giờ hệ thống", "help": "Tắt để chọn múi giờ thủ công."},
"agents_defaults_timezone": {"label": "Múi giờ", "help": "Chọn múi giờ. Độ lệch UTC được tính theo ngày hiện tại."},
"agents_defaults_dream_enabled": {"label": "Sắp xếp bộ nhớ", "help": "Tự động sắp xếp thông tin hữu ích từ cuộc trò chuyện. Bộ nhớ hiện có vẫn được sử dụng khi tắt."},
"gateway_heartbeat_enabled": {"label": "Kiểm tra định kỳ", "help": "Kiểm tra các tác vụ trong HEARTBEAT.md định kỳ."},
"gateway_heartbeat_interval_s": {"label": "Chu kỳ kiểm tra (giây)", "help": "Gateway lên lịch kiểm tra định kỳ khi khởi động."},
"agents_defaults_max_tool_iterations": {"label": "Giới hạn vòng lặp công cụ mỗi lượt", "help": "Số lần trao đổi tối đa giữa mô hình và công cụ trong một lượt."},
"agents_defaults_max_concurrent_subagents": {"label": "Giới hạn tác nhân phụ đồng thời", "help": "Số tác nhân phụ tối đa chạy cùng lúc."},
"agents_defaults_max_tool_result_chars": {"label": "Độ dài kết quả công cụ (ký tự)", "help": "Giới hạn đầu ra công cụ được đưa vào ngữ cảnh mô hình."},
"agents_defaults_provider_retry_mode": {"label": "Liên tục thử lại yêu cầu mô hình", "help": "Tự động thử lại khi yêu cầu gửi đến mô hình gặp lỗi tạm thời. Tắt tùy chọn này để giới hạn số lần thử lại."},
"agents_defaults_tool_hint_max_length": {"label": "Độ dài gợi ý công cụ (ký tự)", "help": "Độ dài tối đa của gợi ý ngắn về hoạt động công cụ."},
"tools_max_session_messages_per_minute": {"label": "Giới hạn tin nhắn công cụ mỗi phút", "help": "Giới hạn tần suất công cụ gửi tin nhắn vào cuộc trò chuyện."},
"agents_defaults_unified_session": {"label": "Chia sẻ cuộc trò chuyện giữa các nền tảng", "help": "Dùng chung một cuộc trò chuyện cho một người dùng trên nhiều nền tảng."},
"tools_exec_enable": {"label": "Công cụ shell", "help": "Cho phép tác nhân chạy lệnh shell."},
"tools_file_enable": {"label": "Công cụ tệp", "help": "Cho phép dùng công cụ đọc và chỉnh sửa tệp tích hợp."},
"tools_web_enable": {"label": "Công cụ web", "help": "Cho phép tìm kiếm và tải nội dung trang web."},
"tools_cli_apps_enable": {"label": "Công cụ ứng dụng CLI", "help": "Cho phép tác nhân quản lý và chạy ứng dụng dòng lệnh."},
"tools_my_enable": {"label": "Công cụ tự quản lý", "help": "Cho phép tác nhân xem cấu hình của mình."},
"tools_my_allow_set": {"label": "Cho phép tác nhân sửa cấu hình", "help": "Cho phép công cụ tự quản lý cập nhật cấu hình."},
"tools_exec_timeout": {"label": "Giới hạn thời gian chạy lệnh (giây)", "help": "Thời gian chạy tối đa của lệnh shell. 0 nghĩa là không giới hạn."},
"tools_exec_path_prepend": {"label": "Đường dẫn ưu tiên", "help": "Các thư mục thêm vào đầu PATH. Phân cách bằng dấu chấm phẩy trên Windows hoặc dấu hai chấm trên macOS và Linux."},
"tools_exec_path_append": {"label": "Đường dẫn bổ sung", "help": "Các thư mục thêm vào cuối PATH. Phân cách bằng dấu chấm phẩy trên Windows hoặc dấu hai chấm trên macOS và Linux."},
"tools_exec_sandbox": {"label": "Hộp cát lệnh", "help": "Dùng bwrap trên Linux hoặc Seatbelt trên macOS. Chỉ kiểm tra không gian làm việc không thể cô lập tiến trình."},
"tools_exec_sandbox_ro_binds": {"label": "Đường dẫn chỉ đọc trong sandbox", "help": "Đường dẫn gắn thêm ở chế độ chỉ đọc, mỗi dòng một đường dẫn."},
"tools_exec_sandbox_rw_binds": {"label": "Đường dẫn có thể ghi trong sandbox", "help": "Đường dẫn gắn thêm cho phép ghi, mỗi dòng một đường dẫn."},
"tools_exec_allowed_env_keys": {"label": "Biến môi trường được phép", "help": "Các biến môi trường bổ sung được truyền cho lệnh, mỗi dòng một tên. Các biến cơ bản cần cho hoạt động vẫn được truyền."},
"tools_exec_allow_patterns": {"label": "Mẫu lệnh được phép", "help": "Mỗi dòng một biểu thức chính quy. Khi có quy tắc, từng phần của lệnh phải khớp hoàn toàn với ít nhất một quy tắc. Lệnh được phép sẽ bỏ qua quy tắc chặn tích hợp và bổ sung, nhưng vẫn chịu giới hạn mạng và không gian làm việc."},
"tools_exec_deny_patterns": {"label": "Mẫu lệnh bị chặn", "help": "Quy tắc chặn bổ sung dưới dạng biểu thức chính quy, mỗi dòng một quy tắc. Quy tắc cho phép được ưu tiên hơn cả quy tắc chặn tích hợp và bổ sung."},
"tools_web_proxy": {"label": "Proxy web", "help": "URL proxy cho công cụ web. Để trống để dùng mạng mặc định."},
"tools_web_user_agent": {"label": "Header User-Agent", "help": "Header User-Agent tùy chỉnh cho yêu cầu web. Để trống để dùng giá trị mặc định."},
"tools_restrict_to_workspace": {"label": "Giới hạn công cụ trong không gian làm việc", "help": "Chính sách công cụ toàn cục. Quyền của từng cuộc trò chuyện WebUI được đặt riêng."},
"tools_ssrf_whitelist": {"label": "Dải mạng riêng được phép", "help": "IP hoặc dải CIDR được miễn bảo vệ yêu cầu ra ngoài, mỗi dòng một mục."},
"tools_webui_allow_remote_package_install": {"label": "Cài đặt gói từ xa", "help": "Cho phép cài gói và kỹ năng từ WebUI từ xa. Cài đặt này phải được thay đổi trên máy chạy gateway."},
"tools_cli_apps_install_timeout": {"label": "Giới hạn thời gian cài đặt (giây)", "help": "Thời gian tối đa để cài ứng dụng CLI."},
"tools_cli_apps_run_timeout": {"label": "Giới hạn thời gian thực thi (giây)", "help": "Thời gian chạy tối đa của lệnh ứng dụng CLI."},
"tools_cli_apps_catalog_ttl_seconds": {"label": "Thời gian lưu đệm danh mục (giây)", "help": "Thời gian giữ danh mục ứng dụng CLI trong bộ nhớ đệm."},
"gateway_host": {"label": "Địa chỉ lắng nghe của gateway", "help": "Địa chỉ gateway dùng để nhận kết nối. Địa chỉ WebSocket và WebUI được cấu hình trong Kênh → WebSocket."},
"gateway_port": {"label": "Cổng gateway", "help": "Cổng được lưu. Tham số dòng lệnh được ưu tiên."},
"gateway_restart_mode": {"label": "Chế độ khởi động lại", "help": "Cách khởi động lại tiến trình. Chế độ tự động chọn theo môi trường máy chủ."},
"api_host": {"label": "Địa chỉ lắng nghe của API", "help": "Cần khóa API khi nhận kết nối trên địa chỉ khác localhost. Đặt khóa trong Hệ thống rồi khởi động lại dịch vụ API để áp dụng thay đổi."},
"api_timeout": {"label": "Thời gian chờ yêu cầu API (giây)", "help": "Thời gian tối đa của yêu cầu. Khởi động lại dịch vụ API để áp dụng."},
"tools_image_generation_save_dir": {"label": "Thư mục ảnh được tạo", "help": "Đường dẫn tương đối trong thư mục phương tiện của nanobot. Ảnh hiện có không bị di chuyển."}
},
"groups": {
"chat": {"title": "Quyền trò chuyện WebUI", "help": "Truy cập dịch vụ cục bộ và quyền trò chuyện mặc định."},
"identity": {"title": "Múi giờ", "help": "Chọn múi giờ cho tác vụ đã lên lịch."},
"memory": {"title": "Bộ nhớ", "help": "Bật hoặc tắt tính năng tự động sắp xếp bộ nhớ."},
"heartbeat": {"title": "Lịch kiểm tra định kỳ", "help": "Cấu hình kiểm tra tác vụ định kỳ tích hợp."},
"execution": {"title": "Giới hạn tác nhân", "help": "Thực thi công cụ và cách thử lại."},
"sessions": {"title": "Cuộc trò chuyện", "help": "Chia sẻ cuộc trò chuyện giữa các nền tảng."},
"tools": {"title": "Công cụ tích hợp", "help": "Chọn nhóm công cụ được phép sử dụng."},
"shell": {"title": "Shell và sandbox", "help": "Thời gian chờ, môi trường, đường dẫn gắn và bộ lọc lệnh."},
"network": {"title": "Kết nối web", "help": "Proxy và thông tin nhận dạng yêu cầu web."},
"safety": {"title": "Chính sách truy cập toàn cục", "help": "Giới hạn không gian làm việc, mạng riêng và cài đặt từ xa."},
"cli": {"title": "Giới hạn ứng dụng CLI", "help": "Giới hạn thời gian cài đặt, thực thi và lưu đệm danh mục."},
"gateway": {"title": "Tiến trình gateway", "help": "Cấu hình triển khai và khởi động lại tiến trình."},
"api": {"title": "Chi tiết máy chủ API", "help": "Địa chỉ lắng nghe và thời gian chờ yêu cầu."},
"storage": {"title": "Lưu trữ ảnh", "help": "Vị trí lưu ảnh được tạo."},
"maintenance": {"title": "Lịch sắp xếp bộ nhớ", "help": ""},
"web": {"title": "Truy cập web", "help": ""},
"applications": {"title": "Ứng dụng dòng lệnh", "help": ""}
},
"save": "Lưu thay đổi", "saving": "Đang lưu…", "discard": "Hủy thay đổi", "saved": "Đã lưu.",
"restart": "Khởi động lại nanobot", "restartHelp": "Khởi động lại để áp dụng thay đổi. Tham số dòng lệnh và biến môi trường có thể được ưu tiên.",
"search": "Tìm cài đặt nâng cao", "noResults": "Không có cài đặt phù hợp.", "pending": "Thay đổi chưa lưu",
"numberError": "Nhập số hợp lệ trong phạm vi cho phép.", "activeModel": "Dùng mô hình hiện tại", "none": "Không có",
"auto": "Tự động", "manual": "Thủ công", "standard": "Tiêu chuẩn", "persistent": "Liên tục",
"unavailable": "Cập nhật gateway để chỉnh sửa các cài đặt này.", "advancedOptions": "Tùy chọn nâng cao"
},
"backToChat": "Quay lại chat",
"sidebar": {
"title": "Cài đặt",
"ariaLabel": "Mục cài đặt"
},
"nav": {
"about": "Giới thiệu",
"capabilities": "Tính năng",
"general": "Chung",
"byok": "BYOK",
"overview": "Tổng quan",
@@ -97,7 +179,8 @@
"browser": "Trang web",
"channels": "Kênh",
"runtime": "Hệ thống",
"advanced": "Bảo mật",
"advanced": "Nâng cao",
"memory": "Bộ nhớ",
"cliApps": "Ứng dụng CLI",
"mcp": "MCP",
"apps": "Ứng dụng",
@@ -110,19 +193,19 @@
"system": "Hệ thống",
"about": "Giới thiệu",
"status": "Trạng thái",
"localPreferences": "Tùy chọn cục bộ",
"localPreferences": "Tùy chọn trình duyệt",
"presets": "Cấu hình đặt trước",
"imageGeneration": "Tạo hình ảnh",
"imageDefaults": "Mặc định",
"webSearch": "Tìm kiếm web",
"webBehavior": "Hành vi",
"webBehavior": "Truy cập trang web",
"regional": "Khu vực",
"webuiSafety": "An toàn WebUI",
"capabilities": "Khả năng",
"capabilities": "Tính năng",
"cliApps": "Ứng dụng CLI",
"mcp": "Dịch vụ MCP",
"apps": "Ứng dụng",
"nativeHost": "Máy chủ gốc",
"nativeHost": "Ứng dụng trên máy tính",
"hostSafety": "An toàn ứng dụng",
"voiceInput": "Nhập bằng giọng nói"
},
@@ -132,28 +215,27 @@
"provider": "Nhà cung cấp",
"model": "Mô hình",
"restart": "Khởi động lại nanobot",
"configPath": "Đường dẫn cấu hình",
"configPath": "Tệp cấu hình",
"activePreset": "Cấu hình đặt trước đang dùng",
"gateway": "Cổng",
"gateway": "Gateway",
"restartState": "Trạng thái khởi động lại",
"pendingChanges": "Thay đổi chờ áp dụng",
"selectedPreset": "Cấu hình đặt trước đã chọn",
"presetModel": "Mô hình cấu hình đặt trước",
"density": "Mật độ",
"presetModel": "Mô hình của cấu hình đặt trước",
"activityMode": "Chi tiết hoạt động",
"fileEditDisplay": "Hiển thị sửa tệp",
"codeWrap": "Xuống dòng mã",
"maxResults": "Kết quả tối đa",
"timeout": "Thời gian chờ",
"jinaReader": "Trình đọc Jina",
"jinaReader": "Jina Reader",
"imageGeneration": "Tạo hình ảnh",
"imageProvider": "Nhà cung cấp hình ảnh",
"imageProviderStatus": "Trạng thái nhà cung cấp",
"imageProviderBase": "Địa chỉ nhà cung cấp",
"imageProviderBase": "URL cơ sở của nhà cung cấp",
"imageModel": "Mô hình hình ảnh",
"defaultAspectRatio": "Tỷ lệ mặc định",
"defaultImageSize": "Kích thước mặc định",
"maxImagesPerTurn": "Ảnh tối đa mỗi lượt",
"maxImagesPerTurn": "Số ảnh tối đa mỗi yêu cầu",
"imageSaveDir": "Thư mục lưu",
"timezone": "Múi giờ",
"workspacePath": "Không gian làm việc mặc định",
@@ -181,43 +263,42 @@
"provider": "Chọn nhà cung cấp cho các yêu cầu mô hình mới.",
"model": "Chọn mô hình mà cấu hình sẵn này sử dụng.",
"configPath": "Tệp cấu hình gateway hiện đang dùng.",
"selectedPreset": "Cấu hình đặt trước có tên chỉ đọc tại đây; hãy chỉnh sửa trong config.json.",
"presetModel": "Chuyển sang Mặc định để chỉnh sửa mô hình và nhà cung cấp trong WebUI.",
"density": "Chỉ lưu trong trình duyệt này.",
"selectedPreset": "Quản lý cấu hình đặt trước trong mục Mô hình.",
"presetModel": "Thay đổi nhà cung cấp và mô hình trong mục Mô hình.",
"activityMode": "Chọn mức chi tiết hoạt động của tác nhân hiển thị mặc định.",
"fileEditDisplay": "Chọn hoạt động sửa tệp hiển thị số dòng hay khác biệt.",
"fileEditDisplay": "Chọn hiển thị số dòng thay đổi hoặc nội dung thay đổi khi chỉnh sửa tệp.",
"codeWrap": "Giữ các dòng mã dài dễ đọc trên màn hình nhỏ.",
"maxResults": "Số kết quả được trả về sau mỗi lần gọi web_search.",
"maxResults": "Số kết quả tối đa cho mỗi lần tìm kiếm web.",
"timeout": "Số giây trước khi yêu cầu của nhà cung cấp tìm kiếm hết thời gian.",
"jinaReader": "Dùng Jina Reader cho web_fetch khi có thể.",
"imageGeneration": "Hiển thị generate_image trong chat khi đã cấu hình nhà cung cấp hình ảnh.",
"imageProvider": "Chọn nhà cung cấp registry được generate_image sử dụng.",
"jinaReader": "Dùng Jina Reader để đọc nội dung trang web khi dịch vụ khả dụng.",
"imageGeneration": "Cho phép tác nhân tạo ảnh trong cuộc trò chuyện khi đã cấu hình nhà cung cấp.",
"imageProvider": "Chọn nhà cung cấp dùng để tạo ảnh.",
"imageProviderStatus": "Tạo ảnh dùng lại thông tin xác thực từ mục Nhà cung cấp.",
"imageModel": "Tên mô hình gửi tới nhà cung cấp ảnh đã chọn.",
"defaultAspectRatio": "Được dùng khi lời nhắc không chọn tỷ lệ khung hình.",
"defaultAspectRatio": "Dùng khi yêu cầu không chỉ định tỷ lệ khung hình.",
"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": "Số ảnh tối đa được tạo trong một yêu cầu.",
"timezone": "Dùng cho lịch và các câu trả lời có yếu tố thời gian.",
"localServiceAccess": "Cho phép lệnh shell có quyền truy cập đầy đủ truy cập các dịch vụ cục bộ.",
"webuiDefaultAccess": "Dùng cho chat web không có quyền riêng theo dự án.",
"securityManagedControls": "Việc tải nội dung web luôn bảo vệ các dịch vụ cục bộ, riêng tư và siêu dữ liệu. Tính an toàn của các kênh cốt lõi vẫn do config.json quản lý.",
"securityManagedControls": "Công cụ web mặc định chặn truy cập dịch vụ cục bộ, mạng riêng và dịch vụ siêu dữ liệu, trừ khi được cho phép rõ ràng. Các cài đặt bảo mật khác của kênh được quản lý trong config.json.",
"currentModel": "Dùng cho các phản hồi mới.",
"selectedModelProvider": "Được đặt bởi mô hình đã chọn.",
"selectedModelValue": "Được đặt bởi mô hình đã chọn.",
"brandLogos": "Hiển thị logo nhà cung cấp bên thứ ba và CLI trong Cài đặt.",
"browserNotifications": "Chỉ thông báo khi trang này ở nền. Mặc định tắt.",
"cliAppsCatalog": "Chỉ cài đặt các bộ chuyển đổi CLI ứng dụng mà nanobot có thể chạy cục bộ; ứng dụng gốc không bị thay đổi.",
"cliAppsCatalog": "Cài các công cụ dòng lệnh mà nanobot có thể dùng trên máy này. Các ứng dụng trên máy tính không bị thay đổi.",
"cliAppsFilter": "Tìm theo ứng dụng, danh mục hoặc khả năng.",
"logs": "Mở thư mục nhật ký của bộ máy gốc.",
"diagnostics": "Xuất báo cáo thời gian chạy ngắn để hỗ trợ.",
"logs": "Mở thư mục nhật ký của ứng dụng trên máy tính.",
"diagnostics": "Xuất báo cáo chẩn đoán để gửi cho bộ phận hỗ trợ.",
"localServiceAccessNative": "Cho phép lệnh shell có quyền truy cập đầy đủ truy cập các dịch vụ trên máy Mac này.",
"webuiDefaultAccessNative": "Dùng cho chat gốc không có quyền riêng theo dự án.",
"contextWindow": "Chọn ngân sách ngữ cảnh mặc định cho cấu hình mô hình này.",
"webuiDefaultAccessNative": "Dùng cho cuộc trò chuyện trong ứng dụng khi dự án chưa có quyền riêng.",
"contextWindow": "Chọn giới hạn ngữ cảnh mặc định cho cấu hình mô hình này.",
"transcription": "Chuyển giọng nói từ micrô thành văn bản trước khi gửi. Tin nhắn thoại từ các kênh chat cũng dùng cùng cài đặt.",
"transcriptionProvider": "Dùng thông tin xác thực của nhà cung cấp tương ứng trong mục Nhà cung cấp.",
"transcriptionProviderStatus": "Khóa API nằm trong mục nhà cung cấp, không nằm trong cài đặt chuyển giọng nói.",
"transcriptionModel": "Giữ mô hình mặc định đã phân giải, trừ khi nhà cung cấp yêu cầu ID mô hình tùy chỉnh.",
"transcriptionLanguage": "Gợi ý ISO-639 tùy chọn, chẳng hạn en, zh, ja hoặc ko."
"transcriptionModel": "Dùng mô hình mặc định, trừ khi nhà cung cấp yêu cầu một ID mô hình cụ thể.",
"transcriptionLanguage": "Mã ngôn ngữ ISO-639 tùy chọn, như en, zh, ja hoặc ko. Để trống để tự động nhận diện ngôn ngữ."
},
"values": {
"light": "Sáng",
@@ -230,14 +311,12 @@
"privateEngine": "Bộ máy riêng",
"unixSocket": "Socket Unix",
"defaultWorkspace": "Không gian làm việc mặc định",
"comfortable": "Thoải mái",
"compact": "Gọn",
"auto": "Tự động",
"expanded": "Mở rộng",
"default": "Mặc định",
"summary": "Tóm tắt",
"diff": "Khác biệt",
"collapsedDiff": "Khác biệt đã thu gọn",
"diff": "Nội dung thay đổi",
"collapsedDiff": "Thu gọn nội dung thay đổi",
"on": "Bật",
"off": "Tắt",
"defaultPermission": "Quyền mặc định",
@@ -257,11 +336,11 @@
"upToDate": "Đã cập nhật.",
"savedRestart": "Đã lưu. Khởi động lại nanobot để áp dụng.",
"restartAfterSaving": "Lưu thay đổi, rồi khởi động lại khi sẵn sàng.",
"savedRestartApply": "Đã lưu. Khởi động lại khi sẵn sàng.",
"imageProviderRestart": "Đã lưu thay đổi nhà cung cấp ảnh. Khởi động lại khi sẵn sàng.",
"savedRestartApply": "Đã lưu. Khởi động lại nanobot để áp dụng thay đổi.",
"imageProviderRestart": "Đã lưu thay đổi nhà cung cấp ảnh. Khởi động lại nanobot để áp dụng.",
"hostRestartAfterSaving": "Sau khi lưu, nanobot sẽ khởi động lại bộ máy.",
"hostRestartPending": "Đã lưu. Bộ máy sẽ khởi động lại khi sẵn sàng.",
"hostApiUnavailable": "Các thao tác máy chủ chỉ khả dụng trong ứng dụng gốc.",
"hostApiUnavailable": "Các thao tác này chỉ có trong ứng dụng trên máy tính.",
"logsOpened": "Đã mở thư mục nhật ký.",
"logsOpenFailed": "Không thể mở thư mục nhật ký.",
"diagnosticsExported": "Đã xuất chẩn đoán tới {{path}}.",
@@ -291,7 +370,7 @@
"showMore": "Hiển thị thêm {{count}}",
"showLess": "Thu gọn",
"apiKey": "Khóa API",
"apiBase": "Cơ sở API",
"apiBase": "URL cơ sở của API",
"apiKeyPlaceholder": "Nhập khóa API",
"apiKeyConfiguredPlaceholder": "Để trống để giữ khóa hiện tại",
"configuredKeyHint": "Khóa đã cấu hình",
@@ -300,8 +379,8 @@
"showApiKey": "Hiển thị khóa API",
"hideApiKey": "Ẩn khóa API",
"noConfiguredProviders": "Chưa có nhà cung cấp nào được cấu hình",
"configureFirst": "Hãy cấu hình nhà cung cấp trong BYOK trước.",
"openByok": "Mở BYOK",
"configureFirst": "Hãy thiết lập nhà cung cấp trong mục Nhà cung cấp trước.",
"openByok": "Thiết lập nhà cung cấp",
"tabs": {
"ariaLabel": "Loại thông tin xác thực BYOK",
"llm": "LLM",
@@ -309,14 +388,14 @@
},
"webSearch": {
"provider": "Nhà cung cấp tìm kiếm",
"providerHelp": "Chọn hệ thống phụ trợ mà công cụ tìm kiếm web sẽ dùng.",
"providerHelp": "Chọn dịch vụ dùng để tìm kiếm web.",
"selectProvider": "Chọn nhà cung cấp",
"credentials": "Thông tin xác thực",
"noCredentialRequired": "Không cần khóa",
"noCredentialHelp": "DuckDuckGo hoạt động mà không cần lưu khóa API.",
"apiKeyHelp": "Được lưu trong config và chỉ hiện dạng che sau khi lưu.",
"apiKeyHelp": "Khóa được lưu trong cấu hình và ẩn sau khi lưu.",
"baseUrl": "URL cơ sở",
"baseUrlHelp": "SearXNG cần URL instance của bạn.",
"baseUrlHelp": "Nhập URL của máy chủ SearXNG do bạn quản lý.",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "Nhà cung cấp tìm kiếm này cần khóa API.",
"baseUrlRequired": "SearXNG cần URL cơ sở.",
@@ -337,13 +416,37 @@
"usage": {
"title": "Hoạt động token",
"shortTitle": "Mức dùng token",
"last30Days": "30 ngày qua",
"viewDetails": "Xem chi tiết",
"previousPage": "Trang trước",
"nextPage": "Trang sau",
"dailyAverage": "Trung bình mỗi ngày",
"inputTokens": "Token đầu vào",
"cacheHitRate": "Tỷ lệ trúng bộ nhớ đệm",
"requestTrend": "Yêu cầu hằng ngày",
"cacheRateHelp": "Tỷ lệ không tính đầu vào có trạng thái bộ nhớ đệm không rõ.",
"dailyTrend": "Mức dùng token hằng ngày",
"systemHelp": "Bao gồm các lượt gọi để tạo tiêu đề cuộc trò chuyện, thực hiện tác vụ nội bộ và các lượt gọi chưa được ghi nhận nguồn.",
"bySource": "Mức dùng theo nguồn",
"byModel": "Mức dùng theo mô hình",
"modelTrend": "Xu hướng sử dụng mô hình",
"modelsUnavailable": "Chưa có chi tiết theo mô hình.",
"otherModels": "Khác / chưa phân loại",
"unclassified": "Chưa phân loại",
"unavailable": "Không có dữ liệu sử dụng.",
"noActivity": "Không có token nào được sử dụng trong 30 ngày qua.",
"cachedInput": "Đầu vào có trong bộ nhớ đệm",
"cacheMiss": "Không trúng bộ nhớ đệm",
"cacheUnknown": "Không rõ trạng thái bộ nhớ đệm",
"outputTokens": "Đầu ra",
"otherTokens": "Token khác",
"subtitle": "Mức dùng do nhà cung cấp báo cáo trong 12 tháng gần nhất.",
"empty": "Hoạt động token sẽ xuất hiện sau các phản hồi mô hình mới.",
"totalTokens": "Tổng token",
"peakTokens": "Đỉnh token",
"peakTokens": "Mức dùng token cao nhất",
"thirtyDayTokens": "Token 30 ngày",
"currentStreak": "Chuỗi hiện tại",
"longestStreak": "Chuỗi dài nhất",
"currentStreak": "Số ngày dùng liên tiếp hiện tại",
"longestStreak": "Số ngày dùng liên tiếp dài nhất",
"daysValue": "{{count}} ngày",
"last30": "30 ngày",
"activeDays": "Ngày hoạt động",
@@ -355,8 +458,8 @@
"user": "Trò chuyện",
"api": "API",
"cron": "Tự động hóa",
"dream": "Bộ nhớ",
"system": "Hệ thống"
"dream": "Sắp xếp bộ nhớ",
"system": "Lượt gọi phụ trợ"
}
},
"providers": {
@@ -372,11 +475,11 @@
"saveAdvancedBeforeSignIn": "Lưu các thay đổi nâng cao trước khi đăng nhập.",
"apiType": "Loại API",
"proxy": "Proxy mạng",
"thinkingStyle": "Kiểu suy luận",
"thinkingStyle": "Định dạng tham số suy luận",
"region": "Khu vực",
"profile": "Hồ sơ",
"profile": "Hồ sơ AWS",
"extraHeaders": "Header bổ sung",
"extraBody": "Body bổ sung",
"extraBody": "Trường bổ sung trong nội dung yêu cầu",
"extraQuery": "Tham số truy vấn bổ sung",
"capabilityFastMode": "Chế độ nhanh",
"capabilityFastModeHelp": "Dùng tầng dịch vụ ưu tiên của OpenAI để phản hồi nhanh hơn. Tín dụng cũng sẽ được tiêu thụ nhanh hơn.",
@@ -398,11 +501,11 @@
"missingCredential": "Cấu hình nhà cung cấp này trước khi bật tạo ảnh."
},
"capabilities": {
"providerSupport": "Hỗ trợ nhà cung cấp",
"providerInstallOnSave": "Hỗ trợ cần thiết sẽ được cài đặt tự động khi bạn lưu nhà cung cấp này.",
"searchSupport": "Hỗ trợ nhà cung cấp tìm kiếm",
"searchInstallOnSave": "Hỗ trợ Olostep sẽ được cài đặt tự động khi bạn lưu.",
"installing": "Đang cài đặt hỗ trợ..."
"providerSupport": "Gói cần thiết cho nhà cung cấp",
"providerInstallOnSave": "Các gói cần thiết sẽ được cài tự động khi lưu nhà cung cấp này.",
"searchSupport": "Gói cần thiết cho dịch vụ tìm kiếm",
"searchInstallOnSave": "Các gói cần thiết cho Olostep sẽ được cài tự động khi lưu.",
"installing": "Đang cài các gói cần thiết…"
},
"models": {
"selectModel": "Chọn mô hình",
@@ -422,7 +525,7 @@
"editPreset": "Sửa cấu hình đặt trước",
"presetName": "Tên cấu hình đặt trước",
"presetNameHelp": "Dùng trong giao diện và lệnh /model. Tên phải là duy nhất.",
"presetNameDuplicate": "Đã có một cấu hình sẵn với tên này.",
"presetNameDuplicate": "Đã có cấu hình đặt trước mang tên này.",
"presetNamePlaceholder": "ví dụ: Viết nhanh",
"advancedOptions": "Tùy chọn nâng cao",
"advancedSummary": "Ngữ cảnh {{context}} · Tối đa {{max}} token",
@@ -441,21 +544,22 @@
"disabled": "Đã tắt",
"noPresets": "Chưa có cấu hình mô hình đặt trước",
"noPresetsHelp": "Tạo cấu hình đặt trước rồi thêm vào thứ tự gọi.",
"removeBeforeDelete": "Hãy xóa cấu hình này khỏi thứ tự gọi trước khi xóa.",
"removeBeforeDelete": "Chọn cấu hình chính khác trước khi xóa cấu hình này.",
"providerSetupRequired": "Cần cấu hình nhà cung cấp",
"configureProviderBeforeSaving": "Hãy cấu hình nhà cung cấp này trước khi lưu cấu hình đặt trước.",
"deletePresetTitle": "Xóa cấu hình mô hình đặt trước?",
"deletePresetHelp": "Thao tác này xóa cấu hình “{{name}}”. Thông tin xác thực của nhà cung cấp không bị ảnh hưởng.",
"deletePresetHelp": "Cấu hình đặt trước “{{name}}” sẽ bị xóa và loại khỏi thứ tự gọi. Thông tin xác thực của nhà cung cấp vẫn được giữ lại.",
"searchModels": "Tìm kiếm hoặc nhập ID mô hình",
"useCustomModel": "Dùng",
"loadingModels": "Đang tải mô hình...",
"searchCatalog": "Tìm trong danh mục nhà cung cấp để chọn mô hình.",
"availableCount": "Mô hình khả dụng: {{count}}",
"modelsAvailable": "khả dụng",
"noModelResults": "Không có mô hình phù hợp.",
"loadFailed": "Không tải được danh sách mô hình.",
"unsupportedModelList": "Nhập ID mô hình thủ công.",
"providerNotConfigured": "Hãy cấu hình nhà cung cấp này trước khi tải mô hình.",
"autoProviderCustomOnly": "Chế độ nhà cung cấp tự động dùng ID mô hình tùy chỉnh."
"autoProviderCustomOnly": "Nhập ID mô hình để dùng chế độ tự động chọn nhà cung cấp."
},
"timezone": {
"select": "Chọn múi giờ",
@@ -464,7 +568,11 @@
},
"cliApps": {
"allCategories": "Tất cả danh mục",
"availableCount_one": "{{count}} ứng dụng",
"availableCount_other": "{{count}} ứng dụng",
"availableCount": "{{count}} ứng dụng",
"installedCount_one": "Đã cài đặt {{count}} công cụ CLI",
"installedCount_other": "Đã cài đặt {{count}} công cụ CLI",
"installedCount": "Đã cài {{count}}",
"summary": "Đã cài {{installed}} / {{total}} CLI",
"filterAll": "Tất cả",
@@ -473,7 +581,7 @@
"searchPlaceholder": "Tìm CLI",
"statusInstalled": "Đã cài",
"statusAvailable": "Có sẵn",
"statusMissing": "Thiếu phụ thuộc",
"statusMissing": "Thiếu gói cần thiết",
"statusUnsupported": "Không hỗ trợ",
"statusNotInstalled": "Chưa cài",
"unsupported": "Không hỗ trợ",
@@ -494,6 +602,9 @@
"noDescription": "Không có mô tả."
},
"about": {
"documentation": "Tài liệu",
"sourceCode": "Mã nguồn",
"reportIssue": "Báo cáo sự cố",
"version": "Phiên bản",
"checking": "Đang kiểm tra...",
"checkForUpdates": "Kiểm tra bản cập nhật",
@@ -520,18 +631,20 @@
"authNone": "Không có",
"authHeaders": "Header",
"command": "Lệnh",
"args": "Đối số JSON",
"headers": "Header JSON",
"args": "Đối số (JSON)",
"headers": "Header (JSON)",
"oauthAfterSave": "Lưu máy chủ, sau đó chọn Kết nối để đăng nhập.",
"headersHelp": "Thêm các header yêu cầu mà máy chủ này sử dụng.",
"env": "Môi trường JSON",
"timeout": "Thời gian chờ công cụ",
"env": "Biến môi trường (JSON)",
"timeout": "Thời gian chờ công cụ (giây)",
"advancedOptions": "Tùy chọn nâng cao",
"hideAdvanced": "Ẩn nâng cao",
"saveCustom": "Lưu MCP",
"hideAdvanced": "Ẩn tùy chọn nâng cao",
"saveCustom": "Lưu máy chủ",
"configImport": "Nhập mcp.json",
"importConfig": "Nhập",
"restartRequired": "Khởi động lại nanobot để kết nối các công cụ MCP đã cập nhật.",
"toolsFound_one": "{{count}} công cụ",
"toolsFound_other": "{{count}} công cụ",
"toolsFound": "{{count}} công cụ",
"loading": "Đang tải cấu hình đặt trước MCP...",
"empty": "Không có cấu hình đặt trước MCP nào khớp bộ lọc này.",
@@ -568,7 +681,7 @@
"connectionCancelled": "Đã hủy kết nối.",
"reloadFailed": "Đã đăng nhập nhưng nanobot không thể kết nối các công cụ. Hãy thử khởi động lại nanobot.",
"oauthFailed": "Không thể kết nối. Hãy thử đăng nhập lại.",
"statusMissingDependency": "Cần phụ thuộc",
"statusMissingDependency": "Cần cài thêm gói",
"statusComingSoon": "Sắp ra mắt",
"comingSoon": "Sắp ra mắt",
"statusNotInstalled": "Chưa bật",
@@ -581,7 +694,7 @@
"about": "Giới thiệu",
"statusLabel": "Trạng thái",
"transportLabel": "Giao thức",
"endpointLabel": "Điểm cuối",
"endpointLabel": "URL kết nối",
"toolPreview": "Công cụ",
"noToolsAvailable": "Không có công cụ khả dụng",
"searchTools": "Tìm công cụ",
@@ -596,7 +709,7 @@
"toolScope": "Công cụ",
"allTools": "Bật tất cả",
"noTools": "Tắt tất cả",
"reloadTools": "Tải lại công cụ",
"reloadTools": "Làm mới danh sách công cụ",
"presetDescriptions": {
"browserbase": "Tự động hóa trình duyệt đám mây bằng Browserbase.",
"playwright": "Kiểm tra và tự động hóa trình duyệt cục bộ bằng Playwright.",
@@ -621,13 +734,13 @@
"start": "Khởi động API", "starting": "Đang khởi động...", "stop": "Dừng", "stopping": "Đang dừng...",
"access": "Truy cập", "thisDevice": "Thiết bị này", "localNetwork": "Mạng nội bộ",
"localHelp": "Chỉ thiết bị này có thể kết nối.", "networkHelp": "Thiết bị khác có thể kết nối; cần khóa API.",
"port": "Cổng", "portHelp": "API sử dụng cổng cục bộ này.", "apiKey": "Khóa API", "apiKeyHelp": "Client gửi khóa dưới dạng Bearer token.",
"port": "Cổng", "portHelp": "API sử dụng cổng cục bộ này.", "apiKey": "Khóa API", "apiKeyHelp": "Ứng dụng kết nối gửi khóa dưới dạng token Bearer.",
"apiKeyRequired": "Bắt buộc trước khi mở API ra mạng.", "apiKeyPlaceholder": "Nhập khóa API",
"autoInstall": "Hỗ trợ API sẽ tự động được cài khi khởi động."
"autoInstall": "Các gói cần thiết cho máy chủ API sẽ được cài tự động khi khởi động."
},
"observability": {
"title": "Khả năng quan sát", "configured": "Thông tin xác thực tracing đã sẵn sàng cho nanobot.",
"environment": "Đặt LANGFUSE_SECRET_KEY và LANGFUSE_PUBLIC_KEY rồi khởi động lại nanobot.", "enable": "Bật hỗ trợ tracing"
"title": "Khả năng quan sát", "configured": "nanobot đã có thông tin xác thực để ghi lại quá trình xử lý.",
"environment": "Đặt LANGFUSE_SECRET_KEY và LANGFUSE_PUBLIC_KEY rồi khởi động lại nanobot.", "enable": "Bật theo dõi quá trình xử lý"
},
"legal": {
"thirdPartyBrands": "Tên sản phẩm, logo và thương hiệu thuộc về chủ sở hữu tương ứng. Việc sử dụng chỉ nhằm nhận diện và không ngụ ý được xác nhận."
@@ -659,8 +772,8 @@
"restartRequired": "Khởi động lại nanobot để áp dụng ứng dụng và công cụ MCP đã cập nhật."
},
"channels": {
"description": "Kết nối nanobot với các ứng dụng chat. Cài đặt hỗ trợ chỉ thêm gói tích hợp; hầu hết kênh vẫn cần token hoặc cấu hình không gian làm việc.",
"caption": "{{enabled}} đã bật · {{total}} kênh",
"description": "Kết nối nanobot với các ứng dụng trò chuyện. Sau khi cài gói tích hợp, hãy thiết lập thông tin xác thực và các tùy chọn của từng nền tảng.",
"caption": "{{enabled}} đang chạy · {{total}} kênh",
"searchPlaceholder": "Tìm kênh",
"backToChannels": "Tất cả kênh",
"catalog": "Kênh",
@@ -670,7 +783,7 @@
"requires": "Yêu cầu: {{requirements}}",
"setUp": "Thiết lập",
"setupGuide": "Hướng dẫn thiết lập",
"setupSummary": "Bật chỉ kích hoạt hỗ trợ của nanobot. Thêm thông tin xác thực nền tảng rồi khởi động lại nanobot.",
"setupSummary": "Bật kênh, thêm thông tin xác thực của nền tảng rồi khởi động lại nanobot.",
"configKeys": "Khóa cấu hình",
"enable": "Bật kênh",
"disable": "Tắt kênh",
@@ -687,12 +800,14 @@
"checkOnly": "Chỉ kiểm tra",
"commandCopied": "Đã sao chép lệnh.",
"commandCopyFailed": "Không thể sao chép lệnh.",
"configuredInstances": "Đã cấu hình {{count}} phiên bản",
"configuredInstances_one": "Đã thiết lập {{count}} cấu hình kênh",
"configuredInstances_other": "Đã thiết lập {{count}} cấu hình kênh",
"configuredInstances": "Đã thiết lập {{count}} cấu hình kênh",
"connectPreview": "Bước tiếp theo là kết nối trong trình duyệt. Hiện tại, hãy chạy lệnh bên dưới.",
"copyCommand": "Sao chép lệnh",
"filterAll": "Tất cả",
"filterOff": "Tắt",
"filterOn": "Bật",
"filterOff": "Đã dừng",
"filterOn": "Đang chạy",
"helperCopied": "Đã sao chép {{name}}.",
"helperCopyFailed": "Không thể sao chép {{name}}.",
"hideSecret": "Ẩn khóa bí mật",
@@ -713,8 +828,8 @@
"selectChannel": "Xem cài đặt {{name}}",
"setupSteps": "Các bước tiếp theo",
"showSecret": "Hiện khóa bí mật",
"toggleChannel": "Kênh {{name}}",
"toggleInstance": "Phiên bản {{name}}",
"toggleChannel": "Bật {{name}}",
"toggleInstance": "Bật cấu hình {{name}}",
"tryIt": "Dùng thử",
"validationFailed": "Hãy kiểm tra thiết lập bắt buộc trước khi bật.",
"validation": {
@@ -732,8 +847,8 @@
"ready": "Sẵn sàng",
"missingDependency": "Thiếu gói hỗ trợ",
"installSupport": "Cài gói hỗ trợ",
"installConfirmTitle": "Cài hỗ trợ cho {{name}}?",
"installConfirmDescription": "nanobot sẽ thêm những gì {{name}} cần, rồi bật tính năng này. Tiếp tục?",
"installConfirmTitle": "Cài các gói cần thiết cho {{name}}?",
"installConfirmDescription": "nanobot sẽ cài các gói cần thiết rồi bật {{name}}.",
"installConfirmAction": "Cài và bật",
"websocketRequired": "Bắt buộc cho WebUI",
"channelDisabled": "Kênh đang tắt",
@@ -742,7 +857,7 @@
"automations": {
"filters": {
"all": "Tất cả",
"active": "Đang chạy",
"active": "Đã bật",
"paused": "Đã tạm dừng",
"failed": "Cần xử lý",
"system": "Hệ thống"
@@ -782,7 +897,7 @@
"commandCopied": "Đã sao chép",
"copyCommand": "Sao chép",
"deleteTitle": "Xóa tự động hóa",
"deleteDescription": "Thao tác này xóa {{name}} khỏi kho cron. Tin nhắn chat trước đó vẫn ở trong phiên.",
"deleteDescription": "Tác vụ tự động “{{name}}” sẽ bị xóa. Các tin nhắn trước đó vẫn được giữ trong cuộc trò chuyện.",
"cancel": "Hủy",
"status": {
"system": "Hệ thống",
@@ -791,7 +906,7 @@
"failed": "Thất bại",
"completed": "Hoàn tất",
"noSchedule": "Không có lịch",
"active": "Đang chạy"
"active": "Đã bật"
},
"origin": {
"system": "Hệ thống",
@@ -821,9 +936,9 @@
"cronWithTz": "Cron {{expr}} · {{tz}}",
"withTz": "{{summary}} · {{tz}}",
"dailyAt": "Hằng ngày lúc {{time}}",
"weekdaysAt": "Ngày làm việc lúc {{time}}",
"hourlyAt": "Mỗi giờ tại :{{minute}}",
"hourlyWindow": "Mỗi giờ {{start}}-{{end}} tại :{{minute}}",
"weekdaysAt": "Thứ Hai đến thứ Sáu lúc {{time}}",
"hourlyAt": "Vào phút {{minute}} mỗi giờ",
"hourlyWindow": "Vào phút {{minute}} mỗi giờ, từ {{start}} đến {{end}}",
"local": "Trình kích hoạt cục bộ",
"custom": "Lịch tùy chỉnh"
},
@@ -875,7 +990,7 @@
"signInAgain": "Đăng nhập lại",
"signOut": "Đăng xuất",
"signedInAs": "Đã đăng nhập bằng {{account}}",
"signInHelp": "Đăng nhập từ thiết bị này; khóa API không được lưu trong config.",
"signInHelp": "Đăng nhập từ thiết bị này. Khóa API không được lưu trong cấu hình.",
"remoteSignInHelp": "Chọn Đăng nhập để mở xAI trên máy tính của bạn, sau đó dán mã ủy quyền được hiển thị sau khi đăng nhập.",
"codexRemoteSignInHelp": "Đăng nhập trong trình duyệt này, sau đó dán lại URL callback localhost đầy đủ vào nanobot.",
"signInRequired": "Cần đăng nhập",
@@ -898,7 +1013,7 @@
"finishSignIn": "Hoàn tất đăng nhập"
},
"skills": {
"description": "Xem các kỹ năng chỉ dẫn mà tác nhân này có thể tải trong cuộc trò chuyện.",
"description": "Quản lý các kỹ năng mà tác nhân có thể dùng trong cuộc trò chuyện.",
"caption": "{{available}} khả dụng · tổng {{total}}",
"views": "Chế độ xem kỹ năng",
"installedTab": "Đã cài đặt",
@@ -917,7 +1032,7 @@
"showLess": "Thu gọn",
"showMore": "Hiển thị thêm",
"enabledControl": "Sử dụng kỹ năng này",
"enabledDescription": "Cho phép tác nhân tải kỹ năng này khi các yêu cầu đã sẵn sàng.",
"enabledDescription": "Cho phép tác nhân dùng kỹ năng này khi đáp ứng đủ yêu cầu.",
"enableSkill": "Bật {{name}}",
"disableSkill": "Tắt {{name}}",
"updateFailed": "Không thể cập nhật kỹ năng này.",
@@ -930,10 +1045,10 @@
"deleteConfirmAction": "Xóa kỹ năng",
"instructionsTitle": "Hướng dẫn kỹ năng",
"setupRequired": "Cần thiết lập",
"setupDescription": "Cài đặt phần phụ thuộc còn thiếu trên máy chạy nanobot rồi kiểm tra lại.",
"setupDescription": "Cài các gói còn thiếu trên máy chạy nanobot rồi kiểm tra lại.",
"copySetupCommand": "Sao chép lệnh thiết lập",
"checkAgain": "Kiểm tra lại",
"marketplaceSearchFailed": "Không thể tìm kiếm các chợ kỹ năng.",
"marketplaceSearchFailed": "Không thể tìm kiếm trong các kho kỹ năng.",
"marketplaceInstallFailed": "Không thể cài đặt kỹ năng này.",
"marketplaceSearchPlaceholder": "Tìm kiếm kỹ năng",
"marketplaceSearchLabel": "Tìm kiếm kỹ năng",
@@ -972,14 +1087,14 @@
"source": "Nguồn",
"status": "Trạng thái",
"requirements": "Yêu cầu",
"noRequirements": "Không có yêu cầu rõ ràng.",
"noRequirements": "Không có yêu cầu cụ thể.",
"commands": "Lệnh",
"environment": "Biến môi trường",
"missingCommands": "Thiếu CLI",
"missingEnvironment": "Thiếu ENV",
"missingCommands": "Thiếu công cụ dòng lệnh",
"missingEnvironment": "Chưa đặt biến môi trường",
"unavailableReasonLabel": "Lý do không khả dụng",
"rawInstructions": "SKILL.md gốc",
"rawInstructionsEmpty": "Không có hướng dẫn gốc.",
"rawInstructions": "Nội dung SKILL.md",
"rawInstructionsEmpty": "Không có hướng dẫn.",
"detailDescription": "Chi tiết cho {{name}}."
},
"voice": {
File diff suppressed because it is too large. Load diff
+210 -95
View File
@@ -25,6 +25,7 @@
"system": {
"section": "系統",
"restartHint": "重新啟動 nanobot 以套用執行階段變更。",
"restartAction": "重新啟動",
"restart": "重新啟動 nanobot",
"restarting": "正在重新啟動…",
"restartEngine": "重新啟動引擎",
@@ -60,6 +61,7 @@
"closeAction": "關閉臨時聊天:{{title}}"
},
"sidebar": {
"resize": "調整側欄寬度",
"navigation": "側邊欄導覽",
"collapse": "收合側邊欄",
"newChat": "新增話題",
@@ -80,12 +82,92 @@
}
},
"settings": {
"timezoneNoMatches": "沒有符合的時區。",
"configure": "設定",
"exit": {
"title": "離開設定前重新啟動 nanobot?",
"description": "變更已儲存,重新啟動後生效。",
"later": "稍後重新啟動"
},
"runtimeConfig": {
"apiSaved": "已儲存,重新啟動 API 服務後生效。",
"fields": {
"agents_defaults_timezone_mode": {"label": "使用系統時區", "help": "關閉後可手動選擇時區。"},
"agents_defaults_timezone": {"label": "時區", "help": "選擇時區。UTC 時差依目前日期顯示。"},
"agents_defaults_dream_enabled": {"label": "記憶整理", "help": "自動整理對話中的有用資訊。關閉後仍可使用既有記憶。"},
"gateway_heartbeat_enabled": {"label": "定期檢查", "help": "定期檢查 HEARTBEAT.md 中的任務。"},
"gateway_heartbeat_interval_s": {"label": "檢查間隔(秒)", "help": "閘道啟動時排定內建定期檢查。"},
"agents_defaults_max_tool_iterations": {"label": "工具互動輪數上限", "help": "每次回覆中,模型與工具最多可以互動幾輪。"},
"agents_defaults_max_concurrent_subagents": {"label": "同時執行的子智能體上限", "help": "限制同時執行任務的子智能體數量。"},
"agents_defaults_max_tool_result_chars": {"label": "工具結果長度(字元)", "help": "限制納入模型上下文的工具輸出長度。"},
"agents_defaults_provider_retry_mode": {"label": "持續重試模型請求", "help": "持續重試可恢復的模型錯誤;關閉後使用標準重試。"},
"agents_defaults_tool_hint_max_length": {"label": "工具提示長度(字元)", "help": "工具活動簡短提示的長度上限。"},
"tools_max_session_messages_per_minute": {"label": "工具訊息上限(每分鐘)", "help": "限制工具向對話傳送訊息的頻率。"},
"agents_defaults_unified_session": {"label": "跨平台共用對話", "help": "讓單一使用者在不同聊天平台共用同一個對話。"},
"tools_exec_enable": {"label": "Shell 工具", "help": "允許智能體執行 Shell 指令。"},
"tools_file_enable": {"label": "檔案工具", "help": "允許使用內建檔案讀取與編輯工具。"},
"tools_web_enable": {"label": "網路工具", "help": "允許網路搜尋與網頁擷取。"},
"tools_cli_apps_enable": {"label": "命令列應用工具", "help": "允許智能體管理及執行命令列應用程式。"},
"tools_my_enable": {"label": "自我管理工具", "help": "允許智能體檢視自身設定。"},
"tools_my_allow_set": {"label": "允許智能體修改設定", "help": "允許自我管理工具更新設定。"},
"tools_exec_timeout": {"label": "命令逾時(秒)", "help": "Shell 命令的執行時限,0 表示不限。"},
"tools_exec_path_prepend": {"label": "優先搜尋路徑", "help": "加到 PATH 開頭的目錄。多個目錄在 Windows 上以分號分隔,在 Linux 和 macOS 上以冒號分隔。"},
"tools_exec_path_append": {"label": "附加搜尋路徑", "help": "加到 PATH 結尾的目錄。多個目錄在 Windows 上以分號分隔,在 Linux 和 macOS 上以冒號分隔。"},
"tools_exec_sandbox": {"label": "命令沙箱", "help": "Linux 使用 bwrap,macOS 使用 Seatbelt。工作區路徑限制本身不提供程序隔離。"},
"tools_exec_sandbox_ro_binds": {"label": "沙箱唯讀路徑", "help": "額外以唯讀方式掛載的路徑,每行一個。"},
"tools_exec_sandbox_rw_binds": {"label": "沙箱可寫入路徑", "help": "額外允許寫入的掛載路徑,每行一個。"},
"tools_exec_allowed_env_keys": {"label": "額外傳遞的環境變數", "help": "除必要變數外,還要從主機傳遞給指令的環境變數名稱,每行一個。"},
"tools_exec_allow_patterns": {"label": "允許的命令規則", "help": "每行一個正規表示式。設定後,每段指令都必須完整符合允許規則;符合的指令會略過內建及自訂禁止規則,但仍受工作區與網路限制。"},
"tools_exec_deny_patterns": {"label": "禁止的命令規則", "help": "每行一個正規表示式,與內建禁止規則一併檢查。完整符合允許規則的指令會略過這些檢查。"},
"tools_web_proxy": {"label": "網路代理", "help": "網路工具使用的代理網址,留空使用預設網路設定。"},
"tools_web_user_agent": {"label": "User-Agent", "help": "自訂網路請求的 User-Agent 標頭,留空使用預設值。"},
"tools_restrict_to_workspace": {"label": "將工具限制於工作區", "help": "全域工具存取原則,WebUI 個別對話權限另行設定。"},
"tools_ssrf_whitelist": {"label": "允許存取的 IP 與網段", "help": "允許對外請求存取這些受限位址。每行輸入一個 IP 位址或 CIDR 網段。"},
"tools_webui_allow_remote_package_install": {"label": "遠端安裝套件", "help": "允許其他裝置上的 WebUI 安裝選用套件與技能。此設定只能在執行閘道的裝置上修改。"},
"tools_cli_apps_install_timeout": {"label": "安裝逾時(秒)", "help": "命令列應用安裝的時間上限。"},
"tools_cli_apps_run_timeout": {"label": "執行逾時(秒)", "help": "命令列應用命令的執行時限。"},
"tools_cli_apps_catalog_ttl_seconds": {"label": "應用程式清單快取時間(秒)", "help": "命令列應用程式清單的快取有效期限。"},
"gateway_host": {"label": "閘道監聽位址", "help": "閘道使用的位址。WebUI 的監聽位址需在聊天平台的 WebSocket 設定中另外指定。"},
"gateway_port": {"label": "閘道連接埠", "help": "儲存的閘道連接埠,命令列參數優先。"},
"gateway_restart_mode": {"label": "重新啟動方式", "help": "選擇閘道程序的重新啟動方式,自動模式依主機環境選擇。"},
"api_host": {"label": "API 監聽位址", "help": "允許其他裝置連線前,請先在「系統」中設定 API 金鑰。變更後需重新啟動 API 服務。"},
"api_timeout": {"label": "API 請求逾時(秒)", "help": "API 請求的時間上限,重新啟動 API 服務後生效。"},
"tools_image_generation_save_dir": {"label": "生成圖片目錄", "help": "nanobot 媒體目錄下的子目錄,使用相對路徑;既有圖片不會移動。"}
},
"groups": {
"chat": {"title": "WebUI 聊天權限", "help": "本機服務存取與 WebUI 聊天的預設權限。"},
"identity": {"title": "時區", "help": "選擇排程任務使用的時區。"},
"memory": {"title": "記憶", "help": "啟用或停用自動記憶整理。"},
"heartbeat": {"title": "定期檢查排程", "help": "設定內建的定期任務檢查。"},
"execution": {"title": "智能體執行限制", "help": "調整工具執行與重試行為。"},
"sessions": {"title": "對話", "help": "跨聊天平台共用對話。"},
"tools": {"title": "內建工具", "help": "選擇智能體可以使用的工具。"},
"shell": {"title": "Shell 與沙箱", "help": "命令時限、環境、掛載與命令篩選。"},
"network": {"title": "網路連線", "help": "網路工具的代理與請求識別。"},
"safety": {"title": "全域存取原則", "help": "工作區限制、私人網路與遠端安裝。"},
"cli": {"title": "命令列應用程式限制", "help": "設定安裝與執行時限,以及應用程式清單的快取時間。"},
"gateway": {"title": "閘道程序", "help": "部署與程序重新啟動設定。"},
"api": {"title": "API 服務詳情", "help": "自訂監聽位址與請求時限。"},
"storage": {"title": "圖片儲存", "help": "選擇生成圖片的儲存位置。"},
"maintenance": {"title": "記憶排程", "help": ""},
"web": {"title": "網路存取", "help": ""},
"applications": {"title": "命令列應用", "help": ""}
},
"save": "儲存變更", "saving": "儲存中…", "discard": "捨棄變更", "saved": "已儲存。",
"restart": "重新啟動 nanobot", "restartHelp": "重新啟動後生效;命令列與環境變數的設定可能優先。",
"search": "搜尋進階設定", "noResults": "找不到相符設定。", "pending": "尚未儲存的變更",
"numberError": "請輸入允許範圍內的有效數字。", "activeModel": "使用目前模型", "none": "無",
"auto": "自動", "manual": "手動", "standard": "標準", "persistent": "持續",
"unavailable": "更新閘道後可編輯這些設定。", "advancedOptions": "進階選項"
},
"backToChat": "返回聊天",
"sidebar": {
"title": "設定",
"ariaLabel": "設定區段"
},
"nav": {
"about": "關於",
"capabilities": "功能",
"general": "一般",
"byok": "BYOK",
"overview": "概覽",
@@ -95,9 +177,10 @@
"image": "圖片",
"voice": "語音",
"browser": "網路",
"channels": "通訊管道",
"channels": "聊天平台",
"runtime": "系統",
"advanced": "安全",
"advanced": "進階",
"memory": "記憶",
"cliApps": "CLI 應用程式",
"mcp": "MCP",
"apps": "應用程式",
@@ -110,19 +193,19 @@
"system": "系統",
"about": "關於",
"status": "狀態",
"localPreferences": "本機偏好",
"localPreferences": "瀏覽器偏好設定",
"presets": "預設",
"imageGeneration": "圖片生成",
"imageDefaults": "預設值",
"webSearch": "網路搜尋",
"webBehavior": "網路行為",
"webBehavior": "網頁存取設定",
"regional": "區域",
"webuiSafety": "WebUI 安全",
"capabilities": "能力",
"capabilities": "功能",
"cliApps": "CLI 應用程式",
"mcp": "MCP 服務",
"apps": "應用程式",
"nativeHost": "原生主機",
"nativeHost": "桌面應用程式",
"hostSafety": "應用程式安全",
"voiceInput": "語音輸入"
},
@@ -139,30 +222,29 @@
"pendingChanges": "待套用變更",
"selectedPreset": "已選預設",
"presetModel": "預設模型",
"density": "密度",
"activityMode": "活動細節",
"fileEditDisplay": "檔案編輯顯示",
"fileEditDisplay": "檔案變更預覽",
"codeWrap": "程式碼換行",
"maxResults": "最大結果數",
"timeout": "逾時",
"jinaReader": "Jina 閱讀器",
"maxResults": "搜尋結果數量上限",
"timeout": "搜尋逾時(秒)",
"jinaReader": "Jina Reader",
"imageGeneration": "圖片生成",
"imageProvider": "圖片供應商",
"imageProviderStatus": "供應商狀態",
"imageProviderBase": "供應商位址",
"imageModel": "圖片模型",
"defaultAspectRatio": "預設比例",
"defaultAspectRatio": "預設長寬比",
"defaultImageSize": "預設尺寸",
"maxImagesPerTurn": "每輪最大圖片數",
"maxImagesPerTurn": "單次產生圖片數上限",
"imageSaveDir": "儲存目錄",
"timezone": "時區",
"workspacePath": "預設工作區",
"localServiceAccess": "本機服務",
"webuiDefaultAccess": "預設存取權",
"currentModel": "目前設定",
"brandLogos": "品牌 Logo",
"brandLogos": "品牌圖示",
"browserNotifications": "任務通知",
"cliAppsCatalog": "目錄",
"cliAppsCatalog": "應用程式清單",
"cliAppsFilter": "篩選",
"engine": "引擎",
"logs": "日誌",
@@ -181,32 +263,31 @@
"provider": "選擇處理新模型請求的供應商。",
"model": "選擇此預設使用的模型。",
"configPath": "目前閘道使用中的設定檔。",
"selectedPreset": "命名預設在此為唯讀;請在 config.json 中編輯。",
"presetModel": "切回預設後可在 WebUI 中編輯模型與供應商。",
"density": "只儲存在此瀏覽器中。",
"selectedPreset": "在「模型」中編輯已儲存的預設。",
"presetModel": "在「模型」中選擇預設,即可修改模型與供應商。",
"activityMode": "選擇預設顯示多少智能體活動細節。",
"fileEditDisplay": "選擇檔案編輯活動預設顯示行數或差異。",
"fileEditDisplay": "選擇預設顯示變更行數,或展開程式碼差異。",
"codeWrap": "讓長程式碼行在小螢幕上也易讀。",
"maxResults": "每次呼叫 web_search 所回傳的結果數。",
"timeout": "搜尋供應商請求逾時前的秒數。",
"jinaReader": "若可用,則讓 web_fetch 使用 Jina Reader。",
"imageGeneration": "設定圖片供應商後,即可在聊天中使用 generate_image。",
"imageProvider": "選擇 generate_image 使用的註冊供應商。",
"imageProviderStatus": "圖片生成功能會沿用 [供應商] 中的憑證。",
"maxResults": "每次網路搜尋最多回傳幾筆結果。",
"timeout": "每次搜尋請求最長等待多久。",
"jinaReader": "讀取網頁時,優先使用可用的 Jina Reader。",
"imageGeneration": "設定圖片供應商後,即可在聊天中產生圖片。",
"imageProvider": "選擇用來產生圖片的供應商。",
"imageProviderStatus": "使用「供應商」中已儲存的憑證。",
"imageModel": "傳送給所選圖片供應商的模型名稱。",
"defaultAspectRatio": "提示詞未指定比例時使用。",
"defaultImageSize": "傳送給支援此選項的供應商的尺寸提示。",
"maxImagesPerTurn": "單次 generate_image 請求可產生的圖片數上限。",
"defaultImageSize": "要求產生的圖片尺寸,僅對支援此選項的供應商生效。",
"maxImagesPerTurn": "單次圖片生成請求最多產生幾張圖片。",
"timezone": "用於排程,以及需要時間資訊的回覆。",
"localServiceAccess": "允許具有完整存取權的 shell 命令存取 localhost 服務。",
"webuiDefaultAccess": "用於未指定個別專案權限的 Web 聊天。",
"securityManagedControls": "網頁擷取一律會阻擋對本機、私人網路及中繼資料服務的存取。核心通訊管道的安全性仍由 config.json 管理。",
"securityManagedControls": "網頁請求預設禁止存取本機、私人網路及雲端中繼資料服務,明確允許的位址除外。聊天平台的安全設定另外管理。",
"currentModel": "用於新的回覆。",
"selectedModelProvider": "由選取的模型決定。",
"selectedModelValue": "由選取的模型決定。",
"brandLogos": "在設定中顯示第三方供應商與 CLI 圖示。",
"browserNotifications": "僅在頁面位於背景時通知,預設關閉。",
"cliAppsCatalog": "只安裝 nanobot 可在本機執行的應用程式專用 CLI 轉接器;不會改動原生應用程式。",
"cliAppsCatalog": "安裝供 nanobot 使用的命令列工具,不會安裝或修改對應的桌面應用程式。",
"cliAppsFilter": "依應用程式、類別或功能搜尋。",
"logs": "開啟原生引擎日誌資料夾。",
"diagnostics": "匯出一份簡短的執行階段報告,以供疑難排解。",
@@ -214,10 +295,10 @@
"webuiDefaultAccessNative": "用於未指定個別專案權限的原生聊天。",
"contextWindow": "選擇此模型設定的預設上下文預算。",
"transcription": "送出前先將麥克風輸入轉寫至輸入框。聊天通訊管道的語音訊息也會使用同一組設定。",
"transcriptionProvider": "使用 [供應商] 中對應供應商的憑證。",
"transcriptionProvider": "使用「供應商」中已儲存的憑證。",
"transcriptionProviderStatus": "API 金鑰仍儲存在「供應商」中,不會寫入「語音轉寫」設定。",
"transcriptionModel": "除非供應商需要自訂模型 ID,否則保留解析後的預設值即可。",
"transcriptionLanguage": "選填的 ISO-639 語言提示,例如 en、zh、ja 或 ko。"
"transcriptionModel": "通常保留預設模型即可;供應商有特殊要求時,可輸入模型 ID。",
"transcriptionLanguage": "可選填語言代碼,例如 en(英文)、zh(中文)、ja(日文)或 ko(韓文)。"
},
"values": {
"light": "淺色",
@@ -230,8 +311,6 @@
"privateEngine": "私有引擎",
"unixSocket": "Unix 套接字",
"defaultWorkspace": "預設工作區",
"comfortable": "舒適",
"compact": "緊湊",
"auto": "自動",
"expanded": "展開",
"default": "預設",
@@ -256,12 +335,12 @@
"unsaved": "有未儲存的變更。",
"upToDate": "已是最新。",
"savedRestart": "已儲存。重新啟動 nanobot 後生效。",
"restartAfterSaving": "請先儲存變更,準備就緒後再重新啟動。",
"savedRestartApply": "已儲存。準備就緒後即可重新啟動。",
"imageProviderRestart": "已儲存圖片供應商變更。準備就緒後即可重新啟動。",
"restartAfterSaving": "儲存變更後,重新啟動 nanobot 使其生效。",
"savedRestartApply": "已儲存,重新啟動後生效。",
"imageProviderRestart": "圖片生成設定已儲存,重新啟動後生效。",
"hostRestartAfterSaving": "儲存變更後,nanobot 將重新啟動引擎。",
"hostRestartPending": "已儲存。準備就緒後將重新啟動引擎。",
"hostApiUnavailable": "主機操作僅能在原生應用程式中使用。",
"hostRestartPending": "設定已儲存,正在等待引擎重新啟動。",
"hostApiUnavailable": "這些操作僅能在桌面應用程式中使用。",
"logsOpened": "已開啟日誌資料夾。",
"logsOpenFailed": "無法開啟日誌資料夾。",
"diagnosticsExported": "診斷已匯出到 {{path}}。",
@@ -283,7 +362,7 @@
"exporting": "正在匯出…"
},
"byok": {
"description": "使用自備的供應商金鑰。Nanobot 會從目前的設定檔讀取這些值,只有已設定的供應商可用於模型預設。",
"description": "設定自備的供應商憑證,即可在模型預設中使用。",
"configured": "已設定",
"notConfigured": "未設定",
"configuredSection": "已設定",
@@ -300,26 +379,26 @@
"showApiKey": "顯示 API 金鑰",
"hideApiKey": "隱藏 API 金鑰",
"noConfiguredProviders": "沒有已設定的供應商",
"configureFirst": "請先在 BYOK 中設定供應商。",
"openByok": "開啟 BYOK",
"configureFirst": "請先在「供應商」中完成設定。",
"openByok": "設定供應商",
"tabs": {
"ariaLabel": "BYOK 憑證類型",
"llm": "LLM",
"ariaLabel": "憑證類型",
"llm": "語言模型",
"webSearch": "網路搜尋"
},
"webSearch": {
"provider": "搜尋供應商",
"providerHelp": "選擇網路搜尋工具使用的後端。",
"providerHelp": "選擇網路搜尋使用的服務。",
"selectProvider": "選擇供應商",
"credentials": "憑證",
"noCredentialRequired": "不需要金鑰",
"noCredentialHelp": "使用 DuckDuckGo 不需要儲存 API 金鑰。",
"apiKeyHelp": "金鑰會儲存在設定檔中,儲存後以遮罩顯示。",
"baseUrl": "基礎 URL",
"apiKeyHelp": "金鑰儲存後會隱藏顯示。",
"baseUrl": "服務網址",
"baseUrlHelp": "SearXNG 需要自行架設的執行個體網址。",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "此搜尋供應商需要 API 金鑰。",
"baseUrlRequired": "SearXNG 需要基礎 URL。",
"baseUrlRequired": "請輸入 SearXNG 服務網址。",
"missingCredential": "填寫必要憑證後才能儲存。",
"saveHint": "變更會套用至新的網路搜尋請求。"
}
@@ -337,6 +416,30 @@
"usage": {
"title": "Token 用量",
"shortTitle": "Token 用量",
"last30Days": "近 30 天",
"viewDetails": "查看詳情",
"previousPage": "上一頁",
"nextPage": "下一頁",
"dailyAverage": "日均用量",
"inputTokens": "輸入 Token",
"cacheHitRate": "快取命中率",
"requestTrend": "每日請求數",
"cacheRateHelp": "快取命中率僅統計快取狀態已知的輸入。",
"dailyTrend": "每日 Token 用量",
"systemHelp": "輔助呼叫包含產生聊天標題等內部工作,以及未註明來源的呼叫。",
"bySource": "用量來源",
"byModel": "模型用量",
"modelTrend": "模型用量趨勢",
"modelsUnavailable": "暫無模型用量明細。",
"otherModels": "其他模型 / 未歸類",
"unclassified": "未分類",
"unavailable": "暫時無法取得用量資料。",
"noActivity": "近 30 天暫無 Token 用量。",
"cachedInput": "快取命中",
"cacheMiss": "快取未命中",
"cacheUnknown": "快取狀態未知",
"outputTokens": "輸出",
"otherTokens": "其他 Token",
"subtitle": "最近 12 個月由供應商回報的 Token 用量。",
"empty": "模型產生新回覆後,此處會顯示 Token 用量。",
"totalTokens": "Token 總數",
@@ -356,7 +459,7 @@
"api": "API",
"cron": "自動任務",
"dream": "記憶整理",
"system": "系統"
"system": "輔助呼叫"
}
},
"providers": {
@@ -372,13 +475,13 @@
"saveAdvancedBeforeSignIn": "請先儲存進階選項再登入。",
"apiType": "API 類型",
"proxy": "網路代理",
"thinkingStyle": "思考模式",
"thinkingStyle": "推理參數格式",
"region": "區域",
"profile": "設定檔",
"profile": "AWS 設定檔名稱",
"extraHeaders": "額外請求標頭",
"extraBody": "額外請求本文",
"extraQuery": "額外查詢參數",
"capabilityFastMode": "Fast 模式",
"capabilityFastMode": "快速模式",
"capabilityFastModeHelp": "透過 OpenAI 優先服務層取得更快回應,也會更快消耗額度。",
"capabilityDeepSeekSearch": "DeepSeek 網路搜尋",
"capabilityDeepSeekSearchHelp": "允許 DeepSeek V4 Flash 透過 Responses API 搜尋網路,並在對話中顯示搜尋過程。",
@@ -398,17 +501,17 @@
"missingCredential": "啟用圖片生成功能前,請先設定此供應商。"
},
"capabilities": {
"providerSupport": "供應商支援",
"providerInstallOnSave": "儲存此供應商時會自動安裝所需支援。",
"providerSupport": "供應商相依套件",
"providerInstallOnSave": "儲存時會自動安裝此供應商所需的套件。",
"searchSupport": "搜尋供應商支援",
"searchInstallOnSave": "儲存時會自動安裝 Olostep 支援。",
"installing": "正在安裝支援…"
"searchInstallOnSave": "儲存時會自動安裝 Olostep 所需的套件。",
"installing": "正在安裝所需套件…"
},
"models": {
"selectModel": "選擇模型",
"addConfiguration": "新增設定",
"newConfiguration": "新增模型設定",
"newConfigurationHelp": "將供應商與模型儲存為一鍵選項。",
"newConfigurationHelp": "將供應商、模型及生成參數儲存為預設,方便下次選用。",
"configurationName": "設定名稱",
"configurationNameHelp": "重新命名這個已儲存的模型設定。",
"configurationNamePlaceholder": "快速寫作",
@@ -425,8 +528,8 @@
"presetNameDuplicate": "已有同名預設。",
"presetNamePlaceholder": "例如:快速寫作",
"advancedOptions": "進階選項",
"advancedSummary": "上下文 {{context}} · 最大輸出 {{max}} tokens",
"maxTokens": "最大輸出 tokens",
"advancedSummary": "上下文 {{context}} · 輸出上限 {{max}} Token",
"maxTokens": "輸出 Token 上限",
"temperature": "溫度",
"reasoningEffort": "推理強度",
"convertTitle": "轉換現有模型設定",
@@ -441,21 +544,22 @@
"disabled": "未啟用",
"noPresets": "尚無模型預設",
"noPresetsHelp": "先建立預設,再將它加入呼叫順序。",
"removeBeforeDelete": "刪除前請先將此預設從呼叫順序中移除。",
"removeBeforeDelete": "請先將其他預設設為主要模型,再刪除此預設。",
"providerSetupRequired": "供應商需要設定",
"configureProviderBeforeSaving": "請先設定此供應商,再儲存預設。",
"deletePresetTitle": "刪除模型預設?",
"deletePresetHelp": "將刪除預設「{{name}}」,不會影響供應商憑證。",
"deletePresetHelp": "刪除預設「{{name}}」,並將它從備用模型清單移除。供應商憑證會保留。",
"searchModels": "搜尋或輸入模型 ID",
"useCustomModel": "使用",
"loadingModels": "正在載入模型…",
"searchCatalog": "搜尋供應商目錄來選擇模型。",
"searchCatalog": "搜尋此供應商的模型清單。",
"availableCount": "可用模型:{{count}} 個",
"modelsAvailable": "可用",
"noModelResults": "沒有符合的模型。",
"loadFailed": "無法取得模型清單。",
"unsupportedModelList": "手動輸入模型 ID。",
"providerNotConfigured": "載入模型前請先設定此供應商。",
"autoProviderCustomOnly": "自動選擇供應商時會使用自訂模型 ID。"
"autoProviderCustomOnly": "自動選擇供應商時,請手動輸入模型 ID。"
},
"timezone": {
"select": "選擇時區",
@@ -464,9 +568,13 @@
},
"cliApps": {
"allCategories": "全部分類",
"availableCount_one": "{{count}} 個應用程式",
"availableCount_other": "{{count}} 個應用程式",
"availableCount": "{{count}} 個應用程式",
"installedCount": "已安裝 {{count}} 個 CLI",
"summary": "已安裝 {{installed}} / {{total}} 個 CLI",
"installedCount_one": "已安裝 {{count}} 個命令列工具",
"installedCount_other": "已安裝 {{count}} 個命令列工具",
"installedCount": "已安裝 {{count}} 個命令列工具",
"summary": "已安裝 {{installed}} / {{total}} 個命令列工具",
"filterAll": "全部",
"filterInstalled": "已安裝的 CLI",
"filterNotInstalled": "未安裝",
@@ -494,6 +602,9 @@
"noDescription": "目前沒有描述。"
},
"about": {
"documentation": "官方文件",
"sourceCode": "程式碼儲存庫",
"reportIssue": "問題回報",
"version": "版本",
"checking": "正在檢查…",
"checkForUpdates": "檢查更新",
@@ -520,18 +631,20 @@
"authNone": "無",
"authHeaders": "請求標頭",
"command": "指令",
"args": "Args JSON",
"headers": "請求標頭 JSON",
"args": "啟動參數(JSON)",
"headers": "請求標頭(JSON)",
"oauthAfterSave": "儲存伺服器後,選擇「連線」以登入。",
"headersHelp": "新增此伺服器使用的請求標頭。",
"env": "Env JSON",
"timeout": "工具逾時",
"env": "環境變數(JSON)",
"timeout": "工具呼叫逾時(秒)",
"advancedOptions": "進階選項",
"hideAdvanced": "隱藏進階",
"saveCustom": "儲存 MCP",
"hideAdvanced": "收合進階選項",
"saveCustom": "儲存 MCP 服務",
"configImport": "匯入 mcp.json",
"importConfig": "匯入",
"restartRequired": "重新啟動 nanobot 以連線更新後的 MCP 工具。",
"toolsFound_one": "{{count}} 個工具",
"toolsFound_other": "{{count}} 個工具",
"toolsFound": "{{count}} 個工具",
"loading": "正在載入 MCP 預設…",
"empty": "沒有符合此篩選條件的 MCP 預設。",
@@ -546,7 +659,7 @@
"connectTitle": "連線 {{name}}",
"reconnectTitle": "重新連線 {{name}}",
"actionsTitle": "{{name}} 操作",
"connectHint": "請從帳號設定新增金鑰。",
"connectHint": "輸入此服務帳號的金鑰。",
"saveAndEnable": "儲存並啟用",
"updateSetup": "更新設定",
"configured": "已設定",
@@ -568,7 +681,7 @@
"connectionCancelled": "已取消連線。",
"reloadFailed": "已登入,但 nanobot 無法連接這些工具。請嘗試重新啟動 nanobot。",
"oauthFailed": "無法連線,請重新登入。",
"statusMissingDependency": "需要相依項",
"statusMissingDependency": "缺少相依套件",
"statusComingSoon": "即將推出",
"comingSoon": "即將推出",
"statusNotInstalled": "未啟用",
@@ -594,9 +707,9 @@
"none": "無",
"dangerZone": "移除連線",
"toolScope": "工具",
"allTools": "全選",
"allTools": "全部啟用",
"noTools": "全部停用",
"reloadTools": "重新讀取",
"reloadTools": "重新整理工具清單",
"presetDescriptions": {
"browserbase": "使用 Browserbase 自動操作雲端瀏覽器。",
"playwright": "使用 Playwright 檢查和自動操作本機瀏覽器。",
@@ -617,13 +730,13 @@
}
},
"api": {
"title": "API 伺服器", "openaiCompatible": "OpenAI 相容 API", "description": "讓 SDK 與其他智能體透過本機 /v1 端點連線 nanobot。",
"title": "API 伺服器", "openaiCompatible": "OpenAI 相容 API", "description": "讓 SDK 和其他智能體透過相容 OpenAI 的 API 連線至 nanobot。",
"start": "啟動 API 伺服器", "starting": "正在啟動…", "stop": "停止", "stopping": "正在停止…",
"access": "存取範圍", "thisDevice": "僅此裝置", "localNetwork": "區域網路",
"localHelp": "只有目前裝置可以連線。", "networkHelp": "區域網路內其他裝置可以連線,因此必須設定 API 金鑰。",
"port": "連接埠", "portHelp": "API 伺服器使用的本機連接埠。", "apiKey": "API 金鑰", "apiKeyHelp": "API 呼叫端會以 Bearer Token 傳送此金鑰。",
"apiKeyRequired": "向區域網路開放 API 前必須設定金鑰。", "apiKeyPlaceholder": "輸入 API 金鑰",
"autoInstall": "啟動時會自動安裝 API 支援。"
"autoInstall": "啟動時會自動安裝 API 服務所需的套件。"
},
"observability": {
"title": "可觀測性", "configured": "nanobot 已偵測到追蹤憑證。",
@@ -660,7 +773,7 @@
},
"channels": {
"description": "將聊天應用程式、電子郵件與 WebUI 連線至 nanobot。",
"caption": "已啟用 {{enabled}} 個 · 共 {{total}} 個通訊管道",
"caption": "{{enabled}} 個執行中 · 共 {{total}} 個聊天平台",
"searchPlaceholder": "搜尋通訊管道",
"backToChannels": "所有通訊管道",
"catalog": "通訊管道",
@@ -687,15 +800,17 @@
"checkOnly": "僅檢查",
"commandCopied": "指令已複製。",
"commandCopyFailed": "無法複製指令。",
"configuredInstances_one": "已設定 {{count}} 個執行個體",
"configuredInstances_other": "已設定 {{count}} 個執行個體",
"configuredInstances": "已設定 {{count}} 個執行個體",
"connectPreview": "下一步將在瀏覽器內連線。目前請先執行下方指令。",
"connectPreview": "請先在終端機執行下方指令,完成連線。",
"copyCommand": "複製指令",
"filterAll": "全部",
"filterOff": "關閉",
"filterOn": "開啟",
"filterOff": "未執行",
"filterOn": "執行中",
"helperCopied": "已複製 {{name}}。",
"helperCopyFailed": "無法複製 {{name}}。",
"hideSecret": "隱藏密鑰",
"hideSecret": "隱藏金鑰",
"instanceConfigured": "已設定",
"instanceNeedsSetup": "需要設定",
"runtimeFailed": "啟動失敗",
@@ -707,13 +822,13 @@
"providerPreset": "服務供應商",
"requiredSetup": "必要設定",
"savedSecret": "已儲存",
"savedSecretPlaceholder": "已儲存的密鑰",
"savedSecretPlaceholder": "已儲存的金鑰",
"savedSettings": "設定已儲存。",
"saveSettings": "儲存設定",
"selectChannel": "檢視 {{name}} 設定",
"setupSteps": "後續步驟",
"showSecret": "顯示密鑰",
"toggleChannel": "{{name}} 渠道",
"showSecret": "顯示金鑰",
"toggleChannel": "啟用 {{name}}",
"toggleInstance": "{{name}} 執行個體",
"tryIt": "試試看",
"validationFailed": "啟用前請檢查必要設定。",
@@ -742,7 +857,7 @@
"automations": {
"filters": {
"all": "全部",
"active": "作用中",
"active": "已啟用",
"paused": "已暫停",
"failed": "需要處理",
"system": "系統"
@@ -782,7 +897,7 @@
"commandCopied": "已複製",
"copyCommand": "複製",
"deleteTitle": "刪除自動任務",
"deleteDescription": "這會從 cron 儲存區移除 {{name}},過往的聊天訊息仍會保留在該對話中。",
"deleteDescription": "刪除自動任務「{{name}}」。既有聊天紀錄會保留。",
"cancel": "取消",
"status": {
"system": "系統",
@@ -791,7 +906,7 @@
"failed": "失敗",
"completed": "已完成",
"noSchedule": "無排程",
"active": "作用中"
"active": "已啟用"
},
"origin": {
"system": "系統",
@@ -831,7 +946,7 @@
"paused": "已暫停",
"pending": "正在執行",
"local": "等待觸發",
"none": "沒有下次執行"
"none": "沒有後續執行排程"
},
"message": {
"showMore": "檢視完整訊息",
@@ -898,7 +1013,7 @@
"finishSignIn": "完成登入"
},
"skills": {
"description": "檢閱此智能體可在對話期間載入的指令技能。",
"description": "管理智能體在對話中可使用的技能。",
"caption": "{{available}} 個可用 · 共 {{total}} 個",
"views": "技能檢視",
"installedTab": "已安裝",
@@ -917,7 +1032,7 @@
"showLess": "收合",
"showMore": "展開",
"enabledControl": "使用此技能",
"enabledDescription": "當技能需求已滿足時,允許智能體載入並使用它。",
"enabledDescription": "符合執行條件後,允許智能體載入並使用此技能。",
"enableSkill": "啟用 {{name}}",
"disableSkill": "停用 {{name}}",
"updateFailed": "無法更新此技能。",
@@ -941,7 +1056,7 @@
"marketplaceProviderFilter": "技能來源",
"marketplaceProviderAll": "全部",
"marketplaceTrendingTitle": "各市集熱門技能",
"marketplaceTrendingDescription": "不同市集分別保留自己的排行與安裝指標。",
"marketplaceTrendingDescription": "各市集的排名與安裝次數,依各自的統計方式顯示。",
"marketplaceViewAll": "查看全部",
"marketplaceTrendingUnavailable": "暫時無法取得熱門技能。",
"marketplaceEmpty": "找不到與「{{query}}」相關的技能。",
@@ -971,15 +1086,15 @@
"descriptionTitle": "描述",
"source": "來源",
"status": "狀態",
"requirements": "需求",
"noRequirements": "沒有明確需求。",
"requirements": "執行條件",
"noRequirements": "未聲明額外執行條件。",
"commands": "命令",
"environment": "環境變數",
"missingCommands": "缺少 CLI 指令",
"missingEnvironment": "缺少環境變數",
"unavailableReasonLabel": "無法使用的原因",
"rawInstructions": "原始 SKILL.md",
"rawInstructionsEmpty": "沒有原始說明。",
"rawInstructionsEmpty": "沒有技能檔案內容。",
"detailDescription": "{{name}} 的詳細資訊。"
},
"voice": {
+8
View File
@@ -1079,3 +1079,11 @@ export async function updateTranscriptionSettings(
},
);
}
export async function updateRuntimeConfigSettings(
transport: WebUIMutationTransport,
values: Record<string, import("@/lib/types").RuntimeConfigValue>,
): Promise<SettingsPayload> {
return mutation<SettingsPayload>(transport, "settings.runtime_config.update", { values });
}
-4
View File
@@ -1,9 +1,7 @@
export type LocalDensity = "comfortable" | "compact";
export type LocalActivityMode = "auto" | "expanded";
export type FileEditDisplayMode = "summary" | "diff" | "collapsed_diff";
export interface LocalPreferences {
density: LocalDensity;
activityMode: LocalActivityMode;
codeWrap: boolean;
brandLogos: boolean;
@@ -20,7 +18,6 @@ type PersistedLocalPreferences = Partial<LocalPreferences> & {
};
export const DEFAULT_LOCAL_PREFS: LocalPreferences = {
density: "comfortable",
activityMode: "auto",
codeWrap: true,
brandLogos: true,
@@ -38,7 +35,6 @@ export function readLocalPreferences(): LocalPreferences {
if (!raw) return DEFAULT_LOCAL_PREFS;
const parsed = JSON.parse(raw) as PersistedLocalPreferences;
return {
density: parsed.density === "compact" ? "compact" : "comfortable",
activityMode: parsed.activityMode === "expanded" ? "expanded" : "auto",
codeWrap: parsed.codeWrap !== false,
brandLogos: parsed.schemaVersion === LOCAL_PREFS_SCHEMA_VERSION
+32
View File
@@ -0,0 +1,32 @@
export const SIDEBAR_SHORTCUTS = {
newChat: { key: "O", shift: true },
search: { key: "K", shift: false },
apps: { key: "1", shift: true },
skills: { key: "2", shift: true },
automations: { key: "3", shift: true },
channels: { key: "4", shift: true },
settings: { key: ",", shift: false },
} as const;
export type SidebarShortcut = keyof typeof SIDEBAR_SHORTCUTS;
export function sidebarShortcutLabel(action: SidebarShortcut, apple: boolean): string {
const { key, shift } = SIDEBAR_SHORTCUTS[action];
return apple ? `⌘${shift ? "⇧" : ""}${key}` : `Ctrl+${shift ? "Shift+" : ""}${key}`;
}
export function sidebarShortcutAria(action: SidebarShortcut): string {
const { key, shift } = SIDEBAR_SHORTCUTS[action];
const suffix = `${shift ? "Shift+" : ""}${key}`;
return `Meta+${suffix} Control+${suffix}`;
}
export function matchSidebarShortcut(event: KeyboardEvent): SidebarShortcut | undefined {
if (event.defaultPrevented || event.repeat || event.isComposing || event.altKey ||
!(event.metaKey || event.ctrlKey)) return undefined;
return (Object.keys(SIDEBAR_SHORTCUTS) as SidebarShortcut[]).find((action) => {
const { key, shift } = SIDEBAR_SHORTCUTS[action];
return event.shiftKey === shift && (event.key.toUpperCase() === key ||
(/^[0-9]$/.test(key) && event.code === `Digit${key}`));
});
}
+10
View File
@@ -571,7 +571,11 @@ export interface ProviderOAuthPending {
export type ProviderOAuthLoginResult = SettingsPayload | ProviderOAuthAuthorizationRequired;
export type ProviderOAuthCompletionResult = SettingsPayload | ProviderOAuthPending;
export type RuntimeConfigValue = string | number | boolean | string[] | null;
export interface SettingsPayload {
runtime_config?: Record<string, RuntimeConfigValue>;
surface?: RuntimeSurface;
runtime_surface?: RuntimeSurface;
runtime_capabilities?: RuntimeCapabilities;
@@ -819,6 +823,12 @@ export interface SettingsPayload {
timed_requests: number;
duration_ms: number;
}>;
model_days_30d?: Array<{
date: string;
provider: string;
model: string;
total_tokens: number;
}>;
updated_at?: string | null;
};
advanced: {
+109 -457
View File
@@ -313,6 +313,7 @@ describe("App layout", () => {
Reflect.deleteProperty(window, "nanobotHost");
setNavigatorPlatform("Linux x86_64");
localStorage.removeItem("nanobot-webui.sidebar");
localStorage.removeItem("nanobot-webui.sidebar.width");
localStorage.removeItem("nanobot-webui.sidebar.completed-runs.v1");
localStorage.removeItem("nanobot-webui.sidebar.session-updates.v1");
localStorage.removeItem("nanobot-webui.collapsed-pane-groups.v1");
@@ -458,7 +459,7 @@ describe("App layout", () => {
expect(main).not.toHaveAttribute("style");
expect(screen.getByTestId("sidebar-brand-row")).toHaveClass("pt-3");
expect(screen.getByTestId("sidebar-brand-mark")).not.toHaveClass("mt-5");
expect(screen.getByRole("button", { name: "Collapse sidebar" })).toHaveClass("mt-1");
expect(screen.getByRole("separator", { name: "Resize sidebar" })).toHaveAttribute("aria-valuenow", "272");
const asideClassNames = Array.from(container.querySelectorAll("aside")).map(
(el) => el.className,
@@ -485,7 +486,7 @@ describe("App layout", () => {
expect(backButton.closest("aside")).toHaveClass("pt-4", "lg:pt-4");
expect(backButton).not.toHaveClass("-ml-1");
expect(container.querySelectorAll("main")).toHaveLength(1);
expect(screen.getByRole("heading", { level: 1, name: "Settings" })).toBeInTheDocument();
expect(screen.getByRole("navigation", { name: "Settings sections" })).toBeInTheDocument();
});
it("opens the full Models settings directly from the first-run prompt", async () => {
@@ -537,6 +538,29 @@ describe("App layout", () => {
).toBeTruthy();
});
it("opens Channels below Automations and supports its keyboard shortcut", async () => {
mockFetchRoutes({
"/api/settings": baseSettingsPayload(),
"/api/settings/nanobot-features": { features: [], enabled_count: 0 },
});
render(<App />);
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
const sidebar = screen.getByRole("navigation", { name: "Sidebar navigation" });
const channels = within(sidebar).getByRole("button", { name: "Channels" });
expect(within(sidebar).getByRole("button", { name: "Automations" })
.compareDocumentPosition(channels) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
fireEvent.click(channels);
expect(await screen.findByRole("heading", { name: "Channels" })).toBeVisible();
expect(window.location.hash).toBe("#/channels");
expect(channels).toHaveAttribute("aria-current", "page");
expect(document.title).toBe("Channels · nanobot");
fireEvent.click(within(sidebar).getByRole("button", { name: "New topic" }));
await waitFor(() => expect(window.location.hash).toBe("#/new"));
fireEvent.keyDown(window, { key: "$", code: "Digit4", ctrlKey: true, shiftKey: true });
expect(await screen.findByRole("heading", { name: "Channels" })).toBeVisible();
expect(window.location.hash).toBe("#/channels");
});
it("highlights the blank new-topic destination immediately", async () => {
render(<App />);
@@ -545,12 +569,8 @@ describe("App layout", () => {
const newTopicButton = within(sidebar).getByRole("button", { name: "New topic" });
expect(newTopicButton).toHaveAttribute("aria-current", "page");
expect(newTopicButton).not.toHaveClass("bg-sidebar-accent");
expect(newTopicButton).toHaveClass("transition-[width,padding,color]");
expect(within(sidebar).getByTestId("actions-selection-highlight")).toHaveAttribute(
"data-active-id",
"new-chat",
);
expect(newTopicButton).toBeEnabled();
});
it("keeps a just-created topic route while the session list catches up", async () => {
@@ -899,7 +919,7 @@ describe("App layout", () => {
consoleError.mockRestore();
});
it("restores the Settings route after a restart fallback hash", async () => {
it("restores the standalone Channels page from a legacy restart route", async () => {
localStorage.setItem("nanobot-webui.restartStartedAt", String(Date.now()));
localStorage.setItem("nanobot-webui.restartRoute", "#/settings?section=channels");
window.history.replaceState(null, "", "/#/new");
@@ -925,9 +945,9 @@ describe("App layout", () => {
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
expect(
await screen.findByRole("navigation", { name: "Settings sections" }),
await screen.findByRole("heading", { name: "Channels" }),
).toBeInTheDocument();
expect(screen.queryByRole("heading", { name: "Channels" })).not.toBeInTheDocument();
expect(within(screen.getByRole("navigation", { name: "Sidebar navigation" })).getByRole("button", { name: "Channels" })).toHaveAttribute("aria-current", "page");
expect(window.location.hash).toBe("#/settings?section=channels");
});
@@ -1656,6 +1676,35 @@ describe("App layout", () => {
expect(document.title).toBe("自动任务 · nanobot");
});
it("resizes the sidebar, collapses at the drag threshold and restores its saved width", async () => {
const view = render(<App />);
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
const handle = screen.getByRole("separator", { name: "Resize sidebar" });
const sidebar = screen.getByTestId("host-sidebar-flow");
fireEvent.pointerDown(handle, { button: 0, pointerId: 1, clientX: 272 });
fireEvent.pointerMove(handle, { pointerId: 1, clientX: 360 });
fireEvent.pointerUp(handle, { pointerId: 1, clientX: 360 });
expect(sidebar).toHaveStyle({ width: "360px" });
expect(localStorage.getItem("nanobot-webui.sidebar.width")).toBe("360");
fireEvent.pointerDown(handle, { button: 0, pointerId: 2, clientX: 360 });
fireEvent.pointerMove(handle, { pointerId: 2, clientX: 150 });
expect(sidebar).toHaveStyle({ width: "56px" });
fireEvent.pointerMove(handle, { pointerId: 2, clientX: 180 });
expect(sidebar).toHaveStyle({ width: "56px" });
fireEvent.pointerMove(handle, { pointerId: 2, clientX: 240 });
fireEvent.pointerUp(handle, { pointerId: 2, clientX: 240 });
expect(sidebar).toHaveStyle({ width: "240px" });
fireEvent.keyDown(handle, { key: "Enter" });
expect(sidebar).toHaveStyle({ width: "56px" });
view.unmount();
render(<App />);
await waitFor(() => expect(screen.getByTestId("host-sidebar-flow")).toHaveStyle({ width: "56px" }));
fireEvent.click(within(screen.getByRole("navigation", { name: "Sidebar navigation" })).getByRole("button", { name: "Toggle sidebar" }));
expect(screen.getByTestId("host-sidebar-flow")).toHaveStyle({ width: "240px" });
fireEvent.keyDown(screen.getByRole("separator", { name: "Resize sidebar" }), { key: "ArrowRight" });
expect(screen.getByTestId("host-sidebar-flow")).toHaveStyle({ width: "272px" });
});
it("uses the shared sidebar controls and rail on the native host", async () => {
mockSessions = [
{
@@ -1682,13 +1731,13 @@ describe("App layout", () => {
expect(flowSidebar).toHaveStyle({ width: "272px" });
expect(screen.getByTestId("sidebar-brand-row")).toHaveClass("pt-3");
expect(screen.getByTestId("sidebar-brand-mark")).toHaveClass("mt-5");
expect(screen.getByRole("button", { name: "Collapse sidebar" })).toHaveClass("mt-1");
expect(screen.getByRole("separator", { name: "Resize sidebar" })).toHaveAttribute("aria-valuenow", "272");
expect(screen.queryByTestId("host-sidebar-toggle")).not.toBeInTheDocument();
expect(
screen.getByRole("navigation", { name: "Sidebar navigation" }),
).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Collapse sidebar" }));
fireEvent.keyDown(screen.getByRole("separator", { name: "Resize sidebar" }), { key: "Enter" });
await waitFor(() => expect(flowSidebar).toHaveStyle({ width: "56px" }));
expect(
screen.getByRole("navigation", { name: "Sidebar navigation" }),
@@ -2346,430 +2395,23 @@ describe("App layout", () => {
});
it("opens the settings view from the sidebar footer", async () => {
const user = userEvent.setup();
mockSessions = [
{
key: "websocket:chat-a",
channel: "websocket",
chatId: "chat-a",
createdAt: "2026-04-16T10:00:00Z",
updatedAt: "2026-04-16T10:00:00Z",
preview: "Existing chat",
},
];
vi.stubGlobal(
"fetch",
vi.fn(async (input: RequestInfo | URL) => {
const href = String(input);
if (href === "/api/settings/api-service") {
return jsonResponse({
installed: false,
running: false,
managed: false,
host: "127.0.0.1",
port: 8900,
timeout: 120,
endpoint: "http://127.0.0.1:8900/v1",
command: "nanobot serve",
});
}
if (href === "/api/settings/provider-models?provider=openai") {
return jsonResponse({
provider: "openai",
label: "OpenAI",
status: "available",
catalog_kind: "official",
models: [
{ id: "openai/gpt-4o", owned_by: "openai", context_window: 128000 },
{ id: "openai/gpt-4o-mini", owned_by: "openai", context_window: 128000 },
],
model_count: 2,
fetched_at: 1,
});
}
if (href.includes("/api/settings")) {
return {
ok: true,
status: 200,
json: async () => ({
agent: {
model: "openai/gpt-4o",
provider: "auto",
resolved_provider: "openai",
has_api_key: true,
model_preset: "primary",
max_tokens: 8192,
context_window_tokens: 65536,
temperature: 0.1,
reasoning_effort: null,
timezone: "UTC",
tool_hint_max_length: 40,
},
model_presets: [
{
name: "primary",
label: "Primary",
active: true,
is_default: false,
model: "openai/gpt-4o",
provider: "auto",
resolved_provider: "openai",
max_tokens: 8192,
context_window_tokens: 65536,
temperature: 0.1,
reasoning_effort: null,
},
{
name: "deep",
label: "deep",
active: false,
is_default: false,
model: "anthropic/claude-opus-4-5",
provider: "anthropic",
max_tokens: 8192,
context_window_tokens: 200000,
temperature: 0.1,
reasoning_effort: "high",
},
],
model_call_order: ["primary", "deep"],
model_call_order_editable: true,
providers: [
{
name: "openai",
label: "OpenAI",
configured: true,
api_key_hint: "open••••-key",
},
{
name: "openrouter",
label: "OpenRouter",
configured: false,
api_key_required: true,
default_api_base: "https://openrouter.ai/api/v1",
},
{
name: "ant_ling",
label: "Ant Ling",
configured: false,
api_key_required: true,
default_api_base: "https://api.ant-ling.com/v1",
},
{
name: "azure_openai",
label: "Azure OpenAI",
configured: false,
api_key_required: true,
},
{
name: "huggingface",
label: "Hugging Face",
configured: false,
api_key_required: true,
},
{
name: "siliconflow",
label: "SiliconFlow",
configured: false,
api_key_required: true,
},
{
name: "volcengine",
label: "VolcEngine",
configured: false,
api_key_required: true,
},
{
name: "byteplus",
label: "BytePlus",
configured: false,
api_key_required: true,
},
{
name: "qianfan",
label: "Qianfan",
configured: false,
api_key_required: true,
},
{
name: "atomic_chat",
label: "Atomic Chat",
configured: false,
api_key_required: false,
default_api_base: "http://localhost:1337/v1",
},
],
web_search: {
provider: "brave",
api_key_hint: "BSAo••••ew20",
base_url: null,
max_results: 5,
timeout: 30,
providers: [
{ name: "duckduckgo", label: "DuckDuckGo", credential: "none" },
{ name: "brave", label: "Brave Search", credential: "api_key" },
{ name: "tavily", label: "Tavily", credential: "api_key" },
],
},
web: {
enable: true,
proxy: null,
user_agent: null,
search: { max_results: 5, timeout: 30 },
fetch: { use_jina_reader: true },
},
image_generation: {
enabled: false,
provider: "openrouter",
provider_configured: true,
model: "openai/gpt-5.4-image-2",
default_aspect_ratio: "1:1",
default_image_size: "1K",
max_images_per_turn: 4,
save_dir: "generated",
providers: [
{
name: "openrouter",
label: "OpenRouter",
configured: true,
api_key_hint: "sk-o••••test",
api_base: "https://openrouter.ai/api/v1",
default_api_base: "https://openrouter.ai/api/v1",
},
{
name: "gemini",
label: "Gemini",
configured: false,
api_key_hint: null,
api_base: null,
default_api_base: "https://generativelanguage.googleapis.com/v1beta/openai/",
},
],
},
runtime: {
config_path: "/tmp/config.json",
workspace_path: "/tmp/workspace",
gateway_host: "127.0.0.1",
gateway_port: 18790,
heartbeat: {
enabled: true,
interval_s: 1800,
},
dream: {
schedule: "every 2h",
},
unified_session: false,
},
advanced: {
restrict_to_workspace: false,
webui_allow_local_service_access: true,
webui_default_access_mode: "default",
private_service_protection_enabled: true,
ssrf_whitelist_count: 0,
mcp_server_count: 0,
exec_enabled: true,
exec_sandbox: null,
exec_path_prepend_set: false,
exec_path_append_set: false,
},
requires_restart: false,
}),
};
}
return { ok: false, status: 404, json: async () => ({}) };
}),
);
localStorage.setItem(
"nanobot-webui.settings-preferences",
JSON.stringify({ brandLogos: true }),
);
mockFetchRoutes({ "/api/settings": baseSettingsPayload() });
render(<App />);
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
const sidebar = screen.getByRole("navigation", { name: "Sidebar navigation" });
const searchButton = within(sidebar).getByRole("button", { name: "Search" });
const appsButton = within(sidebar).getByRole("button", { name: "Apps" });
expect(searchButton.compareDocumentPosition(appsButton) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
await user.click(within(sidebar).getByRole("button", { name: "Settings" }));
expect(
await screen.findByRole("navigation", { name: "Settings sections" }),
).toBeInTheDocument();
expect(screen.queryByRole("heading", { name: "Overview" })).not.toBeInTheDocument();
expect(document.title).toBe("Settings · nanobot");
expect(screen.getByTestId("overview-logo-openai")).toBeInTheDocument();
expect(screen.getByTestId("overview-logo-brave")).toBeInTheDocument();
expect(screen.getByTestId("overview-logo-openrouter")).toBeInTheDocument();
expect(screen.queryByTestId("overview-logo-nanobot-gateway")).not.toBeInTheDocument();
expect(screen.queryByTestId("overview-logo-nanobot-workspace")).not.toBeInTheDocument();
expect(screen.queryByRole("navigation", { name: "Sidebar navigation" })).not.toBeInTheDocument();
const settingsNav = screen.getByRole("navigation", { name: "Settings sections" });
expect(settingsNav.className).not.toContain("overflow-x-auto");
expect(within(settingsNav).getByRole("button", { name: "Settings: Overview" })).toBeInTheDocument();
expect(within(settingsNav).getByRole("button", { name: "Overview" })).toHaveAttribute(
"aria-current",
"page",
);
expect(within(settingsNav).getByRole("button", { name: "Models" })).toBeInTheDocument();
expect(within(settingsNav).queryByRole("button", { name: "Providers" })).not.toBeInTheDocument();
expect(within(settingsNav).getByRole("button", { name: "Image" })).toBeInTheDocument();
expect(within(settingsNav).queryByRole("button", { name: "Files" })).not.toBeInTheDocument();
expect(within(settingsNav).getByRole("button", { name: "Web" })).toBeInTheDocument();
expect(within(settingsNav).queryByRole("button", { name: "Apps" })).not.toBeInTheDocument();
expect(within(settingsNav).getByRole("button", { name: "Security" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Sign out" })).toBeInTheDocument();
fireEvent.pointerDown(within(settingsNav).getByRole("button", { name: "Settings: Overview" }));
fireEvent.click(await screen.findByRole("menuitem", { name: "Appearance" }));
expect(screen.getByText("Brand logos")).toBeInTheDocument();
expect(screen.getByRole("switch", { name: "Brand logos" })).toBeInTheDocument();
expect(
screen.queryByText("Switch between light and dark appearance."),
).not.toBeInTheDocument();
expect(screen.queryByText("Choose the language used by the WebUI.")).not.toBeInTheDocument();
expect(screen.queryByText("Stored only in this browser.")).not.toBeInTheDocument();
expect(within(settingsNav).getByRole("button", { name: "Settings: Appearance" })).toBeInTheDocument();
fireEvent.pointerDown(within(settingsNav).getByRole("button", { name: "Settings: Appearance" }));
fireEvent.click(await screen.findByRole("menuitem", { name: "Models" }));
expect(screen.queryByText("AI")).not.toBeInTheDocument();
expect(screen.getByText("Model presets")).toBeInTheDocument();
expect(screen.queryByText("Model call order")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "New model preset" }));
expect(screen.queryByRole("dialog", { name: "New model preset" })).not.toBeInTheDocument();
fireEvent.change(screen.getByRole("textbox", { name: "Preset name" }), {
target: { value: "Fast writing" },
});
expect(
screen
.getAllByRole("button", { name: /OpenAI/ })
.some((button) => button.getAttribute("aria-haspopup") === "menu"),
).toBe(true);
await user.click(screen.getByRole("button", { name: "Select model" }));
await user.click(await screen.findByRole("option", { name: /openai\/gpt-4o-mini/ }));
expect(screen.getByRole("button", { name: "Save" })).toBeEnabled();
fireEvent.click(screen.getByRole("button", { name: "Cancel" }));
expect(screen.queryByText("Up to date.")).not.toBeInTheDocument();
fireEvent.click(
within(screen.getByTestId("model-call-order-row-primary")).getAllByRole("button")[0],
);
fireEvent.pointerDown(screen.getByRole("button", { name: /Auto/ }));
expect(screen.getAllByTestId("provider-picker-logo-openai").length).toBeGreaterThan(0);
fireEvent.click(screen.getByRole("menuitem", { name: /Auto/ }));
const openModelPicker = async () => {
const modelButtons = screen.getAllByRole("button", { name: /openai\/gpt-4o/ });
await user.click(modelButtons[modelButtons.length - 1]);
};
await openModelPicker();
await user.click(await screen.findByRole("option", { name: /openai\/gpt-4o-mini/ }));
expect(screen.queryByText("Unsaved changes.")).not.toBeInTheDocument();
expect(screen.getByText("Model providers")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Add your own model provider" })).toBeInTheDocument();
expect(screen.queryByText("OpenRouter")).not.toBeInTheDocument();
expect(screen.queryByText("Ant Ling")).not.toBeInTheDocument();
expect(
screen.queryByText(
"Bring your own provider keys. Nanobot reads these values from the current config and only configured providers can be used in model presets.",
),
).not.toBeInTheDocument();
expect(screen.queryByText("azure_openai")).not.toBeInTheDocument();
expect(screen.getByTestId("provider-logo-openai")).toBeInTheDocument();
expect(screen.queryByText(/Product names, logos, and brands/)).not.toBeInTheDocument();
expect(screen.queryByText("Not configured")).not.toBeInTheDocument();
const clickProviderRow = async (label: string) => {
const providerLabel = (await screen.findAllByText(label))
.find((element) => element.className.includes("font-semibold"));
expect(providerLabel).toBeTruthy();
fireEvent.click(providerLabel!);
};
const chooseProvider = async (label: string) => {
fireEvent.pointerDown(
screen.getByRole("button", { name: "Add your own model provider" }),
);
fireEvent.click(await screen.findByRole("menuitem", { name: label }));
};
await clickProviderRow("OpenAI");
fireEvent.click(screen.getByRole("button", { name: "Edit" }));
fireEvent.change(screen.getByPlaceholderText("Leave blank to keep the current key"), {
target: { value: "unsaved-openai-key" },
});
await clickProviderRow("OpenAI");
await chooseProvider("OpenRouter");
await clickProviderRow("OpenRouter");
await clickProviderRow("OpenAI");
expect(screen.getByText("open••••-key")).toBeInTheDocument();
expect(screen.queryByDisplayValue("unsaved-openai-key")).not.toBeInTheDocument();
await clickProviderRow("OpenAI");
await chooseProvider("Ant Ling");
expect(screen.getByDisplayValue("https://api.ant-ling.com/v1")).toBeInTheDocument();
await clickProviderRow("Ant Ling");
await chooseProvider("Atomic Chat");
expect(screen.getByDisplayValue("http://localhost:1337/v1")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Save provider" })).toBeEnabled();
fireEvent.click(within(settingsNav).getByRole("button", { name: "Image" }));
expect(screen.queryByRole("heading", { name: "Image" })).not.toBeInTheDocument();
fireEvent.click(within(screen.getByRole("navigation", { name: "Sidebar navigation" }))
.getByRole("button", { name: "Settings" }));
const nav = await screen.findByRole("navigation", { name: "Settings sections" });
for (const name of ["Overview", "Appearance", "Models", "Capabilities", "System", "Advanced", "About"]) {
expect(within(nav).getByRole("button", { name, exact: true })).toBeInTheDocument();
}
fireEvent.click(within(nav).getByRole("button", { name: "Appearance", exact: true }));
expect(await screen.findByRole("switch", { name: "Brand logos" })).toBeInTheDocument();
fireEvent.click(within(nav).getByRole("button", { name: "Models", exact: true }));
expect(await screen.findByText("Model presets")).toBeInTheDocument();
fireEvent.click(within(nav).getByRole("button", { name: "Capabilities", exact: true }));
expect(screen.getByRole("switch", { name: "Image generation" })).toBeInTheDocument();
expect(screen.getByText("Provider status")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "openai/gpt-5.4-image-2" })).toBeInTheDocument();
expect(screen.getByText("Save directory")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Save" })).toBeDisabled();
expect(
screen.queryByText(
"Expose generate_image in chats when a configured image provider is available.",
),
).not.toBeInTheDocument();
expect(
screen.queryByText("Choose a model supported by the selected image provider."),
).not.toBeInTheDocument();
fireEvent.click(within(settingsNav).getByRole("button", { name: "Web" }));
expect(screen.getByText("Search provider")).toBeInTheDocument();
expect(screen.getByRole("switch", { name: "Jina reader" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: /Brave Search/ })).toBeInTheDocument();
expect(screen.getByTestId("provider-picker-logo-brave")).toBeInTheDocument();
expect(screen.getByText("BSAo••••ew20")).toBeInTheDocument();
expect(
screen.queryByText("Choose the backend used by the web search tool."),
).not.toBeInTheDocument();
expect(
screen.queryByText("Results returned by each web_search call."),
).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Edit" }));
fireEvent.change(screen.getByPlaceholderText("Leave blank to keep the current key"), {
target: { value: "unsaved-brave-key" },
});
fireEvent.pointerDown(screen.getByRole("button", { name: /Brave Search/ }));
fireEvent.click(screen.getByRole("menuitem", { name: "Tavily" }));
fireEvent.pointerDown(screen.getByRole("button", { name: /Tavily/ }));
fireEvent.click(screen.getByRole("menuitem", { name: "Brave Search" }));
expect(screen.getByText("BSAo••••ew20")).toBeInTheDocument();
expect(screen.queryByDisplayValue("unsaved-brave-key")).not.toBeInTheDocument();
fireEvent.click(within(settingsNav).getByRole("button", { name: "System" }));
expect(screen.queryByText("Regional")).not.toBeInTheDocument();
expect(screen.getByText("Timezone")).toBeInTheDocument();
expect(
screen.queryByText("Used for schedules and time-aware replies."),
).not.toBeInTheDocument();
expect(
screen.queryByText("Restart nanobot to apply runtime changes."),
).not.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("Heartbeat")).not.toBeInTheDocument();
expect(screen.queryByText("Dream")).not.toBeInTheDocument();
expect(screen.queryByText("Unified session")).not.toBeInTheDocument();
expect(screen.getByText("Default workspace")).toBeInTheDocument();
expect(screen.getByText("UTC")).toBeInTheDocument();
expect(screen.queryByPlaceholderText("Search timezone")).not.toBeInTheDocument();
expect(screen.queryByRole("listbox", { name: "Select timezone" })).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "UTC" })).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Save" })).not.toBeInTheDocument();
expect(
screen.queryByText("Connect SDKs and agents through a local /v1 endpoint."),
).not.toBeInTheDocument();
expect(screen.queryByText("The API uses this local port.")).not.toBeInTheDocument();
fireEvent.click(within(nav).getByRole("button", { name: "About", exact: true }));
expect(await screen.findByRole("button", { name: "Check for updates" })).toBeInTheDocument();
});
it("restores the settings section from the URL hash after a page reload", async () => {
@@ -2779,7 +2421,7 @@ describe("App layout", () => {
render(<App />);
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
expect(await screen.findByRole("heading", { name: "Voice input" })).toBeInTheDocument();
expect(await screen.findByRole("dialog", { name: "Transcription" })).toBeInTheDocument();
expect(window.location.hash).toBe("#/settings?section=voice");
});
@@ -2805,11 +2447,8 @@ describe("App layout", () => {
const systemSection = screen.getByRole("heading", { name: "System" }).closest("section");
expect(systemSection).not.toBeNull();
const system = within(systemSection as HTMLElement);
const timezoneLabel = system.getByText("Timezone");
const restartButton = system.getByRole("button", { name: "Restart nanobot" });
expect(
timezoneLabel.compareDocumentPosition(restartButton) & Node.DOCUMENT_POSITION_FOLLOWING,
).toBeTruthy();
expect(system.getByText("Timezone")).toBeInTheDocument();
expect(within(screen.getByRole("complementary")).getByRole("button", { name: "Restart", exact: true })).toBeInTheDocument();
expect(
system.queryByText("Restart nanobot to apply runtime changes."),
).not.toBeInTheDocument();
@@ -2868,15 +2507,15 @@ describe("App layout", () => {
expect(settingsHighlight).toHaveAttribute("data-active-id", "models");
const voiceButton = within(settingsNav).getByRole("button", {
name: "Voice",
name: "Capabilities",
exact: true,
});
fireEvent.click(voiceButton);
expect(await screen.findByRole("heading", { name: "Voice input" })).toBeInTheDocument();
expect(window.location.hash).toBe("#/settings?section=voice");
expect(await screen.findByRole("switch", { name: "Transcription" })).toBeInTheDocument();
expect(window.location.hash).toBe("#/settings?section=capabilities");
expect(voiceButton).toHaveAttribute("aria-current", "page");
expect(settingsHighlight).toHaveAttribute("data-active-id", "voice");
expect(settingsHighlight).toHaveAttribute("data-active-id", "capabilities");
});
it("transitions between Apps and Skills without replacing the sidebar", async () => {
@@ -2964,7 +2603,7 @@ describe("App layout", () => {
vi.stubGlobal(
"fetch",
vi.fn(async (input: RequestInfo | URL) => {
if (String(input).includes("/api/settings")) {
if (String(input) === "/api/settings") {
return {
ok: true,
status: 200,
@@ -3116,7 +2755,7 @@ describe("App layout", () => {
const newChatButton = within(sidebar).getByRole("button", { name: "New topic" });
const searchButton = within(sidebar).getByRole("button", { name: "Search" });
expect(
newChatButton.compareDocumentPosition(searchButton) &
searchButton.compareDocumentPosition(newChatButton) &
Node.DOCUMENT_POSITION_FOLLOWING,
).toBeTruthy();
@@ -3294,7 +2933,6 @@ describe("App layout", () => {
)).toEqual(["Alpha child"]));
expect(screen.queryByRole("button", { name: "Pane layout" })).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Add pane" })).not.toBeInTheDocument();
expect(screen.queryByRole("separator")).not.toBeInTheDocument();
const sidebar = screen.getByRole("navigation", { name: "Sidebar navigation" });
fireEvent.pointerDown(within(sidebar).getByRole("button", {
@@ -3675,6 +3313,19 @@ describe("App layout", () => {
expect(createChatSpy).not.toHaveBeenCalled();
});
it.each([
["apps", "1", "Digit1", true],
["skills", "2", "Digit2", true],
["automations", "3", "Digit3", true],
["settings", ",", "Comma", false],
])("opens %s using its sidebar shortcut", async (route, key, code, shiftKey) => {
mockFetchRoutes({ "/api/settings": baseSettingsPayload() });
render(<App />);
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
fireEvent.keyDown(window, { key, code, shiftKey, ctrlKey: true });
await waitFor(() => expect(window.location.hash).toContain("#/" + route));
});
it.each([
["Command", { metaKey: true }],
["Control", { ctrlKey: true }],
@@ -3724,34 +3375,35 @@ describe("App layout", () => {
expect(window.location.hash).toBe("#/new");
});
it("exposes the new chat keyboard shortcut in the sidebar title", async () => {
it("exposes the new chat keyboard shortcut in the sidebar tooltip", async () => {
render(<App />);
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
const sidebar = screen.getByRole("navigation", { name: "Sidebar navigation" });
const newChatButton = within(sidebar).getByRole("button", { name: "New topic" });
expect(newChatButton).toHaveAttribute(
"title",
"New topic (Ctrl+Shift+O)",
);
expect(newChatButton).toHaveTextContent("");
await userEvent.setup().hover(newChatButton);
const tooltip = await screen.findByRole("tooltip");
expect(tooltip).toHaveTextContent("New topic");
expect(tooltip.querySelector("kbd")).toHaveTextContent("Ctrl+Shift+O");
expect(newChatButton).toHaveAttribute(
"aria-keyshortcuts",
"Meta+Shift+O Control+Shift+O",
);
});
it("uses macOS shortcut glyphs in the sidebar title", async () => {
it("uses macOS shortcut glyphs in the sidebar tooltip", async () => {
setNavigatorPlatform("MacIntel");
render(<App />);
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
const sidebar = screen.getByRole("navigation", { name: "Sidebar navigation" });
expect(within(sidebar).getByRole("button", { name: "New topic" })).toHaveAttribute(
"title",
"New topic (⌘⇧O)",
);
await userEvent.setup().hover(within(sidebar).getByRole("button", { name: "New topic" }));
const tooltip = await screen.findByRole("tooltip");
expect(tooltip).toHaveTextContent("New topic");
expect(tooltip.querySelector("kbd")).toHaveTextContent("⌘⇧O");
});
it("keeps large sidebars light while search still covers every chat", async () => {
@@ -3817,7 +3469,7 @@ describe("App layout", () => {
fireEvent.click(screen.getByRole("button", { name: "Toggle theme from header" }));
expect(toggleThemeSpy).toHaveBeenCalledTimes(1);
fireEvent.click(screen.getByRole("button", { name: "Collapse sidebar" }));
fireEvent.keyDown(screen.getByRole("separator", { name: "Resize sidebar" }), { key: "Enter" });
const sidebarAside = container.querySelector("aside.lg\\:block") as HTMLElement;
await waitFor(() => expect(sidebarAside.style.width).toBe("56px"));
+1 -1
View File
@@ -90,7 +90,7 @@ describe("ChatList", () => {
const handle = conversation.querySelector("[data-sidebar-session-handle]");
expect(handle).toHaveClass("max-w-20", "shrink-0");
const underline = handle?.querySelector("[data-sidebar-session-handle-underline]");
expect(underline).toHaveClass("border-b-2", "text-foreground");
expect(underline).toHaveClass("border-b-2", "text-sidebar-muted-foreground");
expect(underline?.getAttribute("style"))
.toContain(sessionHandleColor("handle_1234"));
@@ -0,0 +1,23 @@
import { createInstance } from "i18next";
import { describe, expect, it } from "vitest";
import en from "@/i18n/locales/en/common.json";
import zhCN from "@/i18n/locales/zh-CN/common.json";
describe("chat translation resources", () => {
it.each([
["en", en],
["zh-CN", zhCN],
] as const)("resolves sidebar labels from the chat namespace in %s", async (lng, common) => {
const i18n = createInstance();
await i18n.init({ lng, fallbackLng: false, resources: { [lng]: { translation: common } } });
for (const key of [
"chat.groups.all", "chat.groups.projects", "chat.newChat",
"chat.fallbackTitle", "chat.activity.running", "chat.rename", "chat.loading",
]) {
expect(i18n.exists(key), key).toBe(true);
expect(i18n.t(key), key).not.toBe(key);
}
});
});
+4 -8
View File
@@ -159,7 +159,6 @@ const LOCALIZED_SETTINGS_COPY_KEYS = [
"settings.sections.about",
"settings.rows.theme",
"settings.rows.language",
"settings.rows.density",
"settings.rows.activityMode",
"settings.rows.fileEditDisplay",
"settings.rows.codeWrap",
@@ -171,7 +170,6 @@ const LOCALIZED_SETTINGS_COPY_KEYS = [
"settings.rows.contextWindow",
"settings.help.theme",
"settings.help.language",
"settings.help.density",
"settings.help.activityMode",
"settings.help.fileEditDisplay",
"settings.help.codeWrap",
@@ -182,8 +180,6 @@ const LOCALIZED_SETTINGS_COPY_KEYS = [
"settings.help.webuiDefaultAccess",
"settings.values.light",
"settings.values.dark",
"settings.values.comfortable",
"settings.values.compact",
"settings.values.expanded",
"settings.values.enabled",
"settings.values.disabled",
@@ -483,10 +479,10 @@ describe("webui i18n", () => {
const user = userEvent.setup();
render(<LanguageSwitcher />);
await user.click(screen.getByRole("button", { name: "Change language" }));
await user.click(screen.getByRole("combobox", { name: "Change language" }));
for (const { nativeLabel } of supportedLocales) {
expect(screen.getByRole("menuitemradio", { name: nativeLabel })).toBeInTheDocument();
expect(screen.getByRole("option", { name: nativeLabel })).toBeInTheDocument();
}
});
@@ -505,8 +501,8 @@ describe("webui i18n", () => {
).toBeInTheDocument();
expect(document.documentElement.lang).toBe("en");
await user.click(screen.getByRole("button", { name: "Change language" }));
await user.click(screen.getByRole("menuitemradio", { name: /简体中文/i }));
await user.click(screen.getByRole("combobox", { name: "Change language" }));
await user.click(screen.getByRole("option", { name: /简体中文/i }));
await waitFor(() => {
expect(document.documentElement.lang).toBe("zh-CN");
+4 -22
View File
@@ -118,10 +118,8 @@ describe("SettingsView Apps catalog", () => {
"https://accounts.xmind.test/authorize?state=state-123",
));
expect(popup.opener).toBeNull();
expect(screen.queryByRole("textbox", { name: /authorization/i })).not.toBeInTheDocument();
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
expect(screen.getByRole("status")).toHaveTextContent(
"Finish signing in in the browser window.",
"Complete sign-in in the browser window.",
);
expect(screen.getByRole("button", { name: "Connecting Xmind" })).toHaveTextContent(
"Connecting…",
@@ -130,9 +128,6 @@ describe("SettingsView Apps catalog", () => {
expect(await screen.findByRole("button", { name: "Manage Xmind" }, { timeout: 2500 }))
.toHaveTextContent("Manage");
expect(screen.queryByRole("button", { name: "Cancel" })).not.toBeInTheDocument();
expect(screen.queryByText("Xmind connected.")).not.toBeInTheDocument();
expect(screen.queryByText(/some servers did not connect: notion/i)).not.toBeInTheDocument();
expect(popup.close).toHaveBeenCalledTimes(1);
expect(replace).toHaveBeenCalledTimes(1);
expect(fetchMock).toHaveBeenCalledWith(
@@ -169,7 +164,6 @@ describe("SettingsView Apps catalog", () => {
renderSettingsView({ initialSection: "apps" });
fireEvent.click(await screen.findByRole("button", { name: "Ready" }));
expect(await screen.findByText("No tools are ready yet.")).toBeInTheDocument();
expect(screen.queryByRole("heading", { name: "Xmind" })).not.toBeInTheDocument();
fireEvent.click(await screen.findByRole("button", { name: "MCP" }));
@@ -177,7 +171,6 @@ describe("SettingsView Apps catalog", () => {
const row = heading.closest("article");
expect(row).not.toBeNull();
expect(row?.parentElement).toHaveClass("xl:grid-cols-2");
expect(within(row as HTMLElement).queryByText("MCP")).not.toBeInTheDocument();
const failed = within(row as HTMLElement).getByText("Connection failed.");
expect(failed.closest("button")).toBeNull();
expect(failed.closest("p")?.querySelector(".lucide-triangle-alert")).not.toBeNull();
@@ -358,7 +351,6 @@ describe("SettingsView Apps catalog", () => {
fireEvent.click(await screen.findByRole("button", { name: "MCP" }));
fireEvent.click(await screen.findByRole("button", { name: "Custom" }));
expect(screen.queryByText("Authentication")).not.toBeInTheDocument();
fireEvent.change(screen.getByLabelText("Server name"), {
target: { value: "team-mcp" },
});
@@ -372,19 +364,18 @@ describe("SettingsView Apps catalog", () => {
expect(oauth).toHaveAttribute("aria-pressed", "false");
fireEvent.click(within(authentication).getByRole("button", { name: "Headers" }));
fireEvent.change(screen.getByLabelText("Headers JSON"), {
fireEvent.change(screen.getByLabelText("Headers (JSON)"), {
target: { value: '{"Authorization":"Bearer stale"}' },
});
expect(screen.getByText("Add the request headers used by this server.")).toBeInTheDocument();
fireEvent.click(oauth);
expect(oauth).toHaveAttribute("aria-pressed", "true");
expect(screen.queryByLabelText("Headers JSON")).not.toBeInTheDocument();
expect(
screen.getByText("Save the server, then select Connect to sign in."),
).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Save MCP" }));
fireEvent.click(screen.getByRole("button", { name: "Save MCP server" }));
await waitFor(() => {
const saveCall = requestMutationMock.mock.calls.find(
@@ -403,9 +394,6 @@ describe("SettingsView Apps catalog", () => {
});
expect(await screen.findByRole("button", { name: "Connect team-mcp" }))
.toBeInTheDocument();
expect(
screen.queryByText("MCP config reloaded, but some servers did not connect: team-mcp"),
).not.toBeInTheDocument();
});
it("offers a pasted callback flow when the remote WebUI uses HTTP", async () => {
@@ -491,7 +479,6 @@ describe("SettingsView Apps catalog", () => {
expect(screen.getByRole("status")).toHaveTextContent(
"Finish signing in, then paste the callback URL into nanobot.",
);
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
fireEvent.change(callbackInput, { target: { value: callbackUrl } });
fireEvent.click(screen.getByRole("button", { name: "Finish sign-in" }));
@@ -503,7 +490,6 @@ describe("SettingsView Apps catalog", () => {
));
expect(await screen.findByRole("button", { name: "Manage Xmind" }, { timeout: 2500 }))
.toHaveTextContent("Manage");
expect(screen.queryByRole("textbox", { name: "Full callback URL" })).not.toBeInTheDocument();
expect(popup.close).toHaveBeenCalledTimes(1);
});
@@ -566,8 +552,6 @@ describe("SettingsView Apps catalog", () => {
20_000,
));
expect(await screen.findByRole("button", { name: "Connect Xmind" })).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Connecting Xmind" })).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Cancel" })).not.toBeInTheDocument();
expect(popup.close).not.toHaveBeenCalled();
});
@@ -622,7 +606,6 @@ describe("SettingsView Apps catalog", () => {
20_000,
));
expect(await screen.findByRole("button", { name: "Connect Xmind" })).toBeInTheDocument();
expect(screen.queryByText(/Removed MCP preset|reloaded without restarting/)).not.toBeInTheDocument();
});
it("offers a one-click recovery when the OAuth popup is blocked", async () => {
@@ -736,9 +719,8 @@ describe("SettingsView Apps catalog", () => {
await waitFor(() => expect(statusCalls).toBe(1), { timeout: 2000 });
expect(screen.getByRole("status")).toHaveTextContent(
"Finish signing in in the browser window.",
"Complete sign-in in the browser window.",
);
expect(screen.queryByRole("button", { name: "Continue sign-in" })).not.toBeInTheDocument();
expect(screen.getByRole("button", { name: "Cancel" })).toBeInTheDocument();
});
+149 -20
View File
@@ -1,12 +1,151 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { act, fireEvent, screen, waitFor, within } from "@testing-library/react";
import { expect, it, vi } from "vitest";
import type { SettingsPayload } from "@/lib/types";
import { DEFAULT_TRANSCRIPTION_SETTINGS } from "@/components/settings/capabilities/TranscriptionSettings";
import { requestMutationMock, jsonResponse, settingsPayload, renderSettingsView, openPopover, installSettingsViewTestHooks } from "@/tests/settings-test-utils";
describe("Settings capabilities", () => {
installSettingsViewTestHooks();
it("opens configuration for disabled features without enabling them", () => {
const payload = settingsPayload();
payload.image_generation.enabled = false;
payload.transcription = { ...DEFAULT_TRANSCRIPTION_SETTINGS, enabled: false };
payload.runtime_config = { "tools.web.enable": false };
renderSettingsView({ initialSection: "capabilities", initialSettings: payload });
for (const name of ["Image generation", "Transcription", "Web access"]) {
expect(screen.getByRole("switch", { name })).not.toBeChecked();
fireEvent.click(within(screen.getByRole("region", { name })).getByRole("button", { name: "Configure" }));
const dialog = screen.getByRole("dialog", { name });
expect(within(dialog).getAllByRole("combobox").length).toBeGreaterThan(0);
fireEvent.click(within(dialog).getByRole("button", { name: "Close", exact: true }));
expect(screen.getByRole("switch", { name })).not.toBeChecked();
}
expect(requestMutationMock).not.toHaveBeenCalled();
});
it("keeps other capability switches stable while saving and queues their edits", async () => {
const payload = { ...settingsPayload(), runtime_config: {
"tools.web.enable": true, "agents.defaults.dream.enabled": true,
} };
const memorySaved = { ...payload, runtime_config: { ...payload.runtime_config, "agents.defaults.dream.enabled": false } };
let finishMemory!: (value: SettingsPayload) => void;
requestMutationMock.mockImplementationOnce(() => new Promise<SettingsPayload>((resolve) => { finishMemory = resolve; }))
.mockResolvedValueOnce({ ...memorySaved, runtime_config: { ...memorySaved.runtime_config, "tools.web.enable": false } });
renderSettingsView({ initialSection: "capabilities", initialSettings: payload });
const memory = screen.getByRole("switch", { name: "Memory consolidation" });
const web = screen.getByRole("switch", { name: "Web access" });
const webStyle = web.className;
fireEvent.click(memory);
await waitFor(() => expect(memory).toBeDisabled());
expect(web).toBeEnabled();
expect(web).toBeChecked();
expect(web.className).toBe(webStyle);
fireEvent.click(web);
expect(web).not.toBeChecked();
await act(async () => finishMemory(memorySaved));
await waitFor(() => expect(requestMutationMock).toHaveBeenLastCalledWith(
"settings.runtime_config.update", { values: { "tools.web.enable": false } }, 20_000,
));
await waitFor(() => expect(web).toBeEnabled());
expect(memory).not.toBeChecked();
expect(web).not.toBeChecked();
});
it("keeps missing image credentials local and does not submit an invalid draft", async () => {
renderSettingsView({ initialSection: "capabilities", initialSettings: settingsPayload() });
fireEvent.click(screen.getByRole("switch", { name: "Image generation" }));
const image = within(screen.getByRole("dialog", { name: "Image generation" }));
expect(image.getByRole("alert")).toHaveTextContent("Configure this provider before enabling image generation.");
await new Promise((resolve) => setTimeout(resolve, 700));
expect(requestMutationMock).not.toHaveBeenCalled();
expect(screen.getAllByRole("alert")).toHaveLength(1);
});
it("keeps a rejected image save attached to the feature when its editor is collapsed", async () => {
const payload = settingsPayload();
payload.image_generation.providers = [{ name: "openrouter", label: "OpenRouter", configured: true }];
requestMutationMock.mockRejectedValue(new Error("image generation provider is not configured"));
renderSettingsView({ initialSection: "capabilities", initialSettings: payload });
fireEvent.click(screen.getByRole("switch", { name: "Image generation" }));
const image = within(screen.getByRole("dialog", { name: "Image generation" }));
await waitFor(() => expect(image.getByRole("alert")).toHaveTextContent("Configure this provider before enabling image generation."));
fireEvent.click(image.getByRole("button", { name: "Close", exact: true }));
expect(screen.getByRole("region", { name: "Image generation" })).toContainElement(screen.getByRole("alert"));
expect(screen.getAllByRole("alert")).toHaveLength(1);
});
it("keeps capabilities together and separates expanding settings from enabling a feature", () => {
const payload = settingsPayload();
payload.image_generation.enabled = true;
payload.image_generation.providers = [{ name: "openrouter", label: "OpenRouter", configured: true }];
payload.runtime_config = { "tools.web.enable": true, "agents.defaults.dream.enabled": true };
renderSettingsView({ initialSection: "capabilities", initialSettings: payload });
expect(screen.getAllByRole("switch")).toHaveLength(4);
expect(screen.getByRole("button", { name: "Capabilities", exact: true })).toHaveAttribute("aria-current", "page");
const editor = screen.getByRole("button", { name: "Image generation", exact: true });
expect(editor).toHaveAttribute("aria-expanded", "false");
fireEvent.click(editor);
expect(editor).toHaveAttribute("aria-expanded", "true");
expect(screen.getByRole("combobox", { name: "OpenRouter", exact: true })).toBeVisible();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
expect(screen.getByRole("switch", { name: "Image generation" })).toBeChecked();
expect(requestMutationMock).not.toHaveBeenCalled();
});
it("reveals image settings only after enabling and preserves them when disabled", async () => {
const payload = settingsPayload();
payload.image_generation.providers = [{ name: "openrouter", label: "OpenRouter", configured: true }];
requestMutationMock.mockImplementation(async (_method, update) => ({
...payload,
image_generation: { ...payload.image_generation, enabled: update.enabled },
requires_restart: true,
restart_required_sections: ["image"],
}));
renderSettingsView({ initialSection: "image", initialSettings: payload });
fireEvent.click(screen.getByRole("switch", { name: "Image generation" }));
expect(screen.getByRole("combobox", { name: "OpenRouter" })).toBeVisible();
await waitFor(() => expect(requestMutationMock).toHaveBeenCalledWith(
"settings.image_generation.update", expect.objectContaining({ enabled: true }), 20_000,
));
expect(await screen.findByText("Saved. Restart to apply changes.")).toBeVisible();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("switch", { name: "Image generation" }));
await waitFor(() => expect(requestMutationMock).toHaveBeenLastCalledWith(
"settings.image_generation.update", expect.objectContaining({
enabled: false, provider: "openrouter", model: payload.image_generation.model,
}), 20_000,
));
expect(await screen.findByText("Saved. Restart to apply changes.")).toBeVisible();
});
it("reveals web search settings when web tools are enabled", async () => {
const payload = { ...settingsPayload(), runtime_config: { "tools.web.enable": false } };
requestMutationMock.mockResolvedValue({
...payload, runtime_config: { "tools.web.enable": true },
});
renderSettingsView({ initialSection: "browser", initialSettings: payload });
fireEvent.click(screen.getByRole("switch", { name: "Web access" }));
expect(screen.getByRole("combobox", { name: "DuckDuckGo" })).toBeVisible();
await waitFor(() => expect(requestMutationMock).toHaveBeenCalledWith(
"settings.runtime_config.update", { values: { "tools.web.enable": true } }, 20_000,
));
});
it("reveals the configured transcription provider and model when enabled", () => {
const payload: SettingsPayload = { ...settingsPayload(), transcription: {
enabled: false, provider: "groq", provider_configured: true, model: "whisper-large-v3",
language: null, max_duration_sec: 120, max_upload_mb: 25,
providers: [{ name: "groq", label: "Groq", configured: true }],
} };
renderSettingsView({ initialSection: "voice", initialSettings: payload });
fireEvent.click(screen.getByRole("switch", { name: "Transcription" }));
expect(screen.getByRole("combobox", { name: "Groq" })).toBeVisible();
expect(screen.getByDisplayValue("whisper-large-v3")).toBeVisible();
});
it("selects image models from provider-specific options", async () => {
const base = settingsPayload();
@@ -14,6 +153,7 @@ describe("Settings capabilities", () => {
...base,
image_generation: {
...base.image_generation,
enabled: true,
providers: [
{
name: "openrouter",
@@ -42,9 +182,8 @@ describe("Settings capabilities", () => {
renderSettingsView({ initialSection: "image", initialSettings: payload });
expect(screen.queryByDisplayValue("openai/gpt-5.4-image-2")).not.toBeInTheDocument();
fireEvent.pointerDown(screen.getByRole("button", { name: "OpenRouter" }));
fireEvent.click(await screen.findByRole("menuitem", { name: "Gemini" }));
fireEvent.keyDown(screen.getByRole("combobox", { name: "OpenRouter" }), { key: "ArrowDown" });
fireEvent.click(await screen.findByRole("option", { name: "Gemini" }));
expect(await screen.findByRole("button", { name: "gemini-2.5-flash-image" })).toBeInTheDocument();
await openPopover(screen.getByRole("button", { name: "gemini-2.5-flash-image" }));
@@ -59,8 +198,8 @@ describe("Settings capabilities", () => {
fireEvent.click(await screen.findByRole("option", { name: "Use “imagen-5-preview”" }));
expect(await screen.findByRole("button", { name: "imagen-5-preview" })).toBeInTheDocument();
fireEvent.pointerDown(screen.getByRole("button", { name: "Gemini" }));
fireEvent.click(await screen.findByRole("menuitem", { name: "Custom" }));
fireEvent.keyDown(screen.getByRole("combobox", { name: "Gemini" }), { key: "ArrowDown" });
fireEvent.click(await screen.findByRole("option", { name: "Custom" }));
expect(screen.getByRole("button", { name: "imagen-5-preview" })).toBeInTheDocument();
await openPopover(screen.getByRole("button", { name: "imagen-5-preview" }));
@@ -96,15 +235,11 @@ describe("Settings capabilities", () => {
renderSettingsView({ initialSection: "advanced" });
expect(await screen.findByText("Web safety")).toBeInTheDocument();
expect(screen.queryByText(/SSRF/i)).not.toBeInTheDocument();
expect(screen.queryByText("Private Service Protection")).not.toBeInTheDocument();
expect(screen.getByText("Default access")).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Restricted" })).not.toBeInTheDocument();
expect(screen.getByRole("button", { name: "Default Permission" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Full Access" })).toBeInTheDocument();
fireEvent.click(screen.getByRole("switch", { name: "Local services" }));
fireEvent.click(screen.getByRole("button", { name: "Save" }));
await waitFor(() =>
expect(requestMutationMock).toHaveBeenCalledWith(
@@ -149,13 +284,8 @@ describe("Settings capabilities", () => {
renderSettingsView({ initialSection: "browser" });
fireEvent.pointerDown(await screen.findByRole("button", { name: /DuckDuckGo/ }));
fireEvent.click(await screen.findByRole("menuitem", { name: "Keenable" }));
const saveButton = screen
.getAllByRole("button", { name: "Save" })
.find((button) => !(button as HTMLButtonElement).disabled);
if (!saveButton) throw new Error("enabled Save button was not found");
fireEvent.click(saveButton);
fireEvent.keyDown(await screen.findByRole("combobox", { name: /DuckDuckGo/ }), { key: "ArrowDown" });
fireEvent.click(await screen.findByRole("option", { name: "Keenable" }));
await waitFor(() =>
expect(requestMutationMock).toHaveBeenCalledWith(
@@ -191,8 +321,8 @@ describe("Settings capabilities", () => {
renderSettingsView({ initialSection: "advanced" });
expect(await screen.findByText("App safety")).toBeInTheDocument();
expect(screen.queryByText("Web safety")).not.toBeInTheDocument();
expect(screen.getByText("Allow Full Access shell commands to reach services on this Mac.")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Local services" }));
expect(await screen.findByRole("tooltip")).toHaveTextContent("Allow Full Access shell commands to reach services on this Mac.");
});
it("refreshes settings with a fresh token after native engine restart", async () => {
@@ -240,7 +370,6 @@ describe("Settings capabilities", () => {
expect(await screen.findByText("App safety")).toBeInTheDocument();
fireEvent.click(screen.getByRole("switch", { name: "Local services" }));
fireEvent.click(screen.getByRole("button", { name: "Save" }));
await waitFor(() => expect(restartEngine).toHaveBeenCalledTimes(1));
await waitFor(() =>
+39 -52
View File
@@ -166,12 +166,10 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View Matrix settings" })).toBeInTheDocument();
expect(screen.queryByText("0 running · 1 channels")).not.toBeInTheDocument();
fireEvent.click(await screen.findByRole("button", { name: "View Matrix settings" }));
expect(screen.getAllByText("Failed").length).toBeGreaterThan(0);
expect(screen.queryByText("Enabled, support needs install")).not.toBeInTheDocument();
expect(screen.getByRole("switch", { name: "Matrix channel" })).toHaveAttribute("aria-checked", "false");
expect(screen.getByLabelText("Matrix channel")).toHaveAttribute("aria-checked", "false");
fireEvent.click(screen.getByRole("button", { name: "Install support" }));
fireEvent.click(screen.getByRole("button", { name: "Install and enable" }));
@@ -219,11 +217,10 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View Matrix settings" })).toBeInTheDocument();
expect(screen.queryByText("0 running · 1 channels")).not.toBeInTheDocument();
fireEvent.click(await screen.findByRole("button", { name: "View Matrix settings" }));
expect(screen.getAllByText("Failed").length).toBeGreaterThan(0);
expect(screen.getByText(runtimeError)).toBeInTheDocument();
expect(screen.getByRole("switch", { name: "Matrix channel" })).toHaveAttribute(
expect(screen.getByLabelText("Matrix channel")).toHaveAttribute(
"aria-checked",
"false",
);
@@ -268,8 +265,7 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View Feishu settings" })).toBeInTheDocument();
expect(screen.queryByText("nanobot channels login feishu")).not.toBeInTheDocument();
fireEvent.click(await screen.findByRole("button", { name: "View Feishu settings" }));
fireEvent.click(await screen.findByRole(
"button",
{ name: "nanobot" },
@@ -327,7 +323,7 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View Feishu settings" })).toBeInTheDocument();
fireEvent.click(await screen.findByRole("button", { name: "View Feishu settings" }));
fireEvent.click(await screen.findByRole(
"button",
{ name: "nanobot" },
@@ -416,6 +412,7 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
fireEvent.click((await screen.findAllByRole("button", { name: /^View .+ settings$/ }))[0]);
fireEvent.click(await screen.findByRole("button", { name: "nanobot" }));
fireEvent.click(await screen.findByRole("switch", { name: "nanobot assistant" }));
@@ -505,6 +502,7 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
fireEvent.click((await screen.findAllByRole("button", { name: /^View .+ settings$/ }))[0]);
expect(await screen.findByText("Product Helper")).toBeInTheDocument();
expect(screen.getAllByText("Support Bot")).toHaveLength(1);
expect(document.querySelector('img[src="https://example.com/support.png"]')).toBeTruthy();
@@ -518,14 +516,13 @@ describe("Settings channels", () => {
"false",
);
expect(screen.queryByText("cli_def...ault")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: /Support Bot/ }));
expect(screen.getByRole("button", { name: /Support Bot/ })).toHaveAttribute(
"aria-expanded",
"true",
);
expect(screen.getAllByText("cli_def...ault").length).toBeGreaterThan(0);
expect(screen.getByText("Advanced")).toBeInTheDocument();
expect(screen.getByText("Advanced", { selector: "summary span" })).toBeInTheDocument();
expect(screen.getByText("Topic isolation")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: /Product Helper/ }));
@@ -601,8 +598,8 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
fireEvent.click((await screen.findAllByRole("button", { name: /^View .+ settings$/ }))[0]);
expect(await screen.findByText("Default worker")).toBeInTheDocument();
expect(screen.queryByRole("switch", { name: "Multi Plugin channel" })).not.toBeInTheDocument();
expect(screen.getByRole("switch", { name: "Default worker instance" })).toHaveAttribute(
"aria-checked",
"true",
@@ -665,6 +662,7 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
fireEvent.click((await screen.findAllByRole("button", { name: /^View .+ settings$/ }))[0]);
await screen.findByText("Support Bot");
expect(screen.getAllByText("Support Bot")).toHaveLength(1);
expect(screen.getByText("1 assistant connected")).toBeInTheDocument();
@@ -672,10 +670,8 @@ describe("Settings channels", () => {
"aria-checked",
"true",
);
expect(screen.queryByText("cli_sup...port")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Support Bot" }));
expect(screen.getByText("cli_sup...port")).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Replace assistant" })).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Reconnect" }));
await waitFor(() => expect(requestMutationMock).toHaveBeenCalledWith(
"settings.feature.enable",
@@ -735,15 +731,14 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
fireEvent.click((await screen.findAllByRole("button", { name: /^View .+ settings$/ }))[0]);
await screen.findByText("No assistant connected");
expect(screen.queryByText("0 running · 1 channels")).not.toBeInTheDocument();
expect(screen.getAllByText("Failed").length).toBeGreaterThan(0);
expect(screen.getByText(runtimeError)).toBeInTheDocument();
expect(screen.getByRole("switch", { name: "test assistant" })).toHaveAttribute(
"aria-checked",
"false",
);
expect(screen.queryByText("Connected")).not.toBeInTheDocument();
});
it("shows group behavior fields as options", async () => {
@@ -778,8 +773,8 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View Discord settings" })).toBeInTheDocument();
fireEvent.click(screen.getByText("Advanced"));
fireEvent.click(await screen.findByRole("button", { name: "View Discord settings" }));
fireEvent.click(screen.getByText("Advanced", { selector: "summary span" }));
const behavior = screen.getByRole("radiogroup", { name: "Group behavior" });
expect(within(behavior).getByRole("radio", { name: "Mention only" })).toHaveAttribute(
@@ -787,7 +782,6 @@ describe("Settings channels", () => {
"true",
);
expect(within(behavior).getByRole("radio", { name: "All messages" })).toBeInTheDocument();
expect(screen.queryByPlaceholderText("mention")).not.toBeInTheDocument();
fireEvent.click(within(behavior).getByRole("radio", { name: "All messages" }));
@@ -841,22 +835,15 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
const emailRow = await screen.findByRole("button", { name: "View Email settings" });
expect(screen.getByPlaceholderText("Search channels")).toHaveClass(
"focus-visible:ring-2",
"focus-visible:ring-inset",
"focus-visible:ring-ring/50",
);
expect(screen.queryByRole("switch", { name: "Email channel" })).not.toBeInTheDocument();
expect(emailRow).toBeVisible();
expect(screen.getByRole("switch", { name: "Email channel" })).toBeInTheDocument();
fireEvent.click(emailRow);
expect(screen.getByRole("button", { name: "All channels" })).toBeInTheDocument();
expect(screen.getByRole("switch", { name: "Email channel" })).toBeInTheDocument();
expect(screen.queryByPlaceholderText("Search channels")).not.toBeInTheDocument();
expect(screen.getByRole("dialog")).toHaveFocus();
fireEvent.click(screen.getByRole("button", { name: "All channels" }));
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
expect(screen.getByPlaceholderText("Search channels")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "View Email settings" })).toBeInTheDocument();
});
@@ -929,16 +916,16 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View Discord settings" })).toBeInTheDocument();
fireEvent.click(await screen.findByRole("button", { name: "View Discord settings" }));
expect(screen.getByRole("link", { name: "Open Discord setup" })).toHaveAttribute(
"href",
"https://nanobot.wiki/docs/0.2.2/getting-started/chat-apps#discord",
);
expect(screen.getByRole("switch", { name: "Discord channel" })).toBeDisabled();
expect(screen.getByLabelText("Discord channel")).toBeEnabled();
fireEvent.change(screen.getByPlaceholderText("Discord bot token"), {
target: { value: "discord-token" },
});
fireEvent.click(screen.getByText("Advanced"));
fireEvent.click(screen.getByText("Advanced", { selector: "summary span" }));
fireEvent.change(screen.getByLabelText("Allowed channels"), {
target: { value: "123, 456" },
});
@@ -969,7 +956,7 @@ describe("Settings channels", () => {
150_000,
);
expect(await screen.findByText("Checked and enabled.")).toBeInTheDocument();
expect(screen.getByRole("switch", { name: "Discord channel" })).toHaveAttribute(
expect(screen.getByLabelText("Discord channel")).toHaveAttribute(
"aria-checked",
"true",
);
@@ -1033,12 +1020,12 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View Discord settings" })).toBeInTheDocument();
expect(screen.getByRole("switch", { name: "Discord channel" })).toHaveAttribute(
fireEvent.click(await screen.findByRole("button", { name: "View Discord settings" }));
expect(screen.getByLabelText("Discord channel")).toHaveAttribute(
"aria-checked",
"false",
);
expect(screen.getByRole("switch", { name: "Discord channel" })).toBeEnabled();
expect(screen.getByLabelText("Discord channel")).toBeEnabled();
expect(screen.getByText("Configured manually")).toBeInTheDocument();
expect(screen.getByText("Saved")).toBeInTheDocument();
const savedSecret = screen.getByPlaceholderText("Saved secret");
@@ -1047,13 +1034,14 @@ describe("Settings channels", () => {
expect(savedSecret.closest("form")).not.toBeNull();
expect(screen.queryByDisplayValue("discord-secret-token")).not.toBeInTheDocument();
fireEvent.click(screen.getByText("Advanced"));
fireEvent.click(screen.getByText("Advanced", { selector: "summary span" }));
expect(screen.getByLabelText("Allowed channels")).toHaveValue("123, 456");
expect(within(screen.getByRole("radiogroup", { name: "Group behavior" })).getByRole(
"radio",
{ name: "All messages" },
)).toHaveAttribute("aria-checked", "true");
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("switch", { name: "Discord channel" }));
await waitFor(() =>
expect(requestMutationMock).toHaveBeenCalledWith(
@@ -1095,7 +1083,7 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View Telegram settings" })).toBeInTheDocument();
fireEvent.click(await screen.findByRole("button", { name: "View Telegram settings" }));
expect(screen.getByRole("link", { name: "Open Telegram setup" })).toHaveAttribute(
"href",
"https://nanobot.wiki/docs/0.2.2/getting-started/chat-apps#telegram",
@@ -1175,8 +1163,8 @@ describe("Settings channels", () => {
const guide = await screen.findByRole("link", { name: guideLabel });
expect(guide).toHaveAttribute("href", expect.stringMatching(/^https:\/\//));
expect(guide.querySelector("span[aria-hidden] img, span[aria-hidden] svg")).not.toBeNull();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
}
expect(screen.queryByRole("button", { name: "View MoChat settings" })).not.toBeInTheDocument();
});
it("uses choices for channel enum and boolean fields", async () => {
@@ -1212,17 +1200,17 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
fireEvent.click(await screen.findByRole("button", { name: "View Email settings" }));
const consent = screen.getByRole("radiogroup", { name: "Consent granted" });
const consent = screen.getByRole("radiogroup", { name: "Allow nanobot to read and send email" });
expect(within(consent).getByRole("radio", { name: "Not granted" })).toHaveAttribute(
"aria-checked",
"true",
);
expect(within(consent).getByRole("radio", { name: "Granted" })).toBeInTheDocument();
expect(screen.queryByPlaceholderText("true")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("button", { name: "View Feishu settings" }));
fireEvent.click(screen.getByRole("button", { name: "nanobot" }));
fireEvent.click(screen.getByText("Advanced"));
fireEvent.click(screen.getByText("Advanced", { selector: "summary span" }));
const region = screen.getByRole("radiogroup", { name: "Region" });
expect(within(region).getByRole("radio", { name: "Feishu" })).toHaveAttribute(
"aria-checked",
@@ -1230,8 +1218,9 @@ describe("Settings channels", () => {
);
expect(within(region).getByRole("radio", { name: "Lark" })).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("button", { name: "View Matrix settings" }));
fireEvent.click(screen.getByText("Advanced"));
fireEvent.click(screen.getByText("Advanced", { selector: "summary span" }));
const matrixBehavior = screen.getByRole("radiogroup", { name: "Group behavior" });
expect(within(matrixBehavior).getByRole("radio", { name: "All messages" })).toHaveAttribute(
"aria-checked",
@@ -1239,8 +1228,9 @@ describe("Settings channels", () => {
);
expect(within(matrixBehavior).getByRole("radio", { name: "Allowlist" })).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("button", { name: "View QQ settings" }));
fireEvent.click(screen.getByText("Advanced"));
fireEvent.click(screen.getByText("Advanced", { selector: "summary span" }));
const format = screen.getByRole("radiogroup", { name: "Message format" });
expect(within(format).getByRole("radio", { name: "Plain text" })).toHaveAttribute(
"aria-checked",
@@ -1279,13 +1269,10 @@ describe("Settings channels", () => {
renderSettingsView({ initialSection: "channels" });
expect(await screen.findByRole("button", { name: "View WebSocket settings" })).toBeInTheDocument();
expect(screen.getAllByText("WebSocket")).toHaveLength(2);
expect(screen.queryByText("Required for WebUI")).not.toBeInTheDocument();
expect(screen.getAllByText("On").length).toBeGreaterThanOrEqual(1);
fireEvent.click(await screen.findByRole("button", { name: "View WebSocket settings" }));
expect(screen.getByRole("heading", { name: "WebSocket", exact: true })).toBeVisible();
expect(screen.getByText("Managed by WebUI")).toBeInTheDocument();
expect(screen.queryByText("Configured manually")).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Disable channel" })).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
const websocketSwitch = screen.getByRole("switch", { name: "WebSocket channel" });
expect(websocketSwitch).toBeDisabled();
expect(websocketSwitch).toHaveAttribute("aria-checked", "true");
+39 -104
View File
@@ -109,7 +109,6 @@ describe("Settings models", () => {
expect(within(editor).getByRole("textbox", { name: "Preset name" })).toHaveValue(
"openai",
);
expect(within(editor).queryByText("minimax")).not.toBeInTheDocument();
});
it("edits a legacy case-conflicting preset without treating its own name as a rename", async () => {
@@ -150,7 +149,6 @@ describe("Settings models", () => {
20_000,
);
});
expect(screen.queryByRole("alert")).not.toBeInTheDocument();
});
it("renames an existing preset without losing the editor selection", async () => {
@@ -223,12 +221,8 @@ describe("Settings models", () => {
renderSettingsView({ initialSection: "models" });
expect(screen.queryByText("Edit preset")).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: /Advanced options/ })).not.toBeInTheDocument();
await togglePresetEditor();
const advanced = await screen.findByRole("button", { name: /Advanced options/ });
expect(screen.queryByText("Context window")).not.toBeInTheDocument();
expect(screen.queryByText("Temperature")).not.toBeInTheDocument();
fireEvent.click(advanced);
@@ -245,7 +239,7 @@ describe("Settings models", () => {
expect(reasoningEffort).toHaveValue("provider-native-mode");
});
it("expands the model preset editor directly below the selected row", async () => {
it("opens the preset editor in a dialog and protects the primary preset", async () => {
vi.stubGlobal(
"fetch",
vi.fn(async (input: RequestInfo | URL) => {
@@ -265,23 +259,15 @@ describe("Settings models", () => {
const row = await screen.findByTestId("model-call-order-row-primary");
const trigger = within(row).getAllByRole("button")[0];
expect(screen.queryByTestId("model-preset-editor")).not.toBeInTheDocument();
expect(trigger).toHaveAttribute("aria-expanded", "false");
expect(trigger).toHaveAttribute("aria-haspopup", "dialog");
fireEvent.click(trigger);
const editor = screen.getByTestId("model-preset-editor");
expect(trigger).toHaveAttribute("aria-pressed", "true");
expect(trigger).toHaveAttribute("aria-expanded", "true");
expect(trigger).toHaveAttribute("aria-controls", "model-preset-editor");
expect(row.parentElement).toHaveAttribute("role", "listitem");
expect(row.parentElement?.parentElement).toHaveAttribute("role", "list");
expect(row.nextElementSibling).toBe(editor);
expect(editor).toHaveClass(
"slide-in-from-top-1",
"lg:max-w-6xl",
"rounded-floating",
);
expect(row.closest('[role="listitem"]')).toBeInTheDocument();
expect(row.closest('[role="list"]')).toBeInTheDocument();
expect(screen.getByRole("dialog", { name: "primary" })).toContainElement(editor);
expect(within(editor).getByRole("textbox", { name: "Preset name" })).toHaveValue(
"primary",
);
@@ -289,13 +275,10 @@ describe("Settings models", () => {
expect(deleteButton).toBeDisabled();
expect(deleteButton).toHaveAttribute("aria-describedby", "model-preset-delete-hint");
expect(
within(editor).getByText("Remove this preset from the call order before deleting it."),
within(editor).getByText("Choose another primary preset before deleting this one."),
).toBeInTheDocument();
fireEvent.click(trigger);
expect(trigger).toHaveAttribute("aria-expanded", "false");
expect(screen.queryByTestId("model-preset-editor")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
});
it("drags model presets to reorder and saves the model call order immediately", async () => {
@@ -344,19 +327,12 @@ describe("Settings models", () => {
fireEvent.change(screen.getByLabelText("Temperature"), {
target: { value: "0.4" },
});
const primaryRow = screen.getByTestId("model-call-order-row-primary");
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
const backupRow = screen.getByTestId("model-call-order-row-backup");
expect(backupRow).toHaveAttribute("draggable", "true");
expect(screen.queryByRole("button", { name: "Move up" })).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Move down" })).not.toBeInTheDocument();
const dataTransfer = {
dropEffect: "move",
effectAllowed: "move",
setData: vi.fn(),
};
fireEvent.dragStart(backupRow, { dataTransfer });
fireEvent.dragEnter(primaryRow, { dataTransfer });
fireEvent.drop(primaryRow, { dataTransfer });
fireEvent.pointerDown(backupRow, { button: 0, clientY: 100, pointerId: 1 });
fireEvent.pointerMove(backupRow, { clientY: 40, pointerId: 1, buttons: 1 });
fireEvent.pointerUp(backupRow, { pointerId: 1 });
fireEvent.click(backupRow);
await waitFor(() => {
expect(requestMutationMock).toHaveBeenCalledWith(
@@ -366,7 +342,8 @@ describe("Settings models", () => {
);
});
expect(screen.queryByRole("button", { name: "Save order" })).not.toBeInTheDocument();
fireEvent.click(within(screen.getByTestId("model-call-order-row-primary")).getByRole("button"));
fireEvent.click(screen.getByRole("button", { name: /Advanced options/ }));
expect(screen.getByLabelText("Temperature")).toHaveValue(0.4);
expect(screen.getByRole("button", { name: "Save" })).toBeEnabled();
});
@@ -418,24 +395,17 @@ describe("Settings models", () => {
const primaryRow = screen.getByTestId("model-call-order-row-primary");
const backupRows = screen.getAllByTestId("model-call-order-row-backup");
const firstBackupRow = backupRows[0];
const secondBackupRow = backupRows[1];
const secondBackupTrigger = within(secondBackupRow).getAllByRole("button")[0];
fireEvent.click(secondBackupTrigger);
expect(screen.getAllByTestId("model-preset-editor")).toHaveLength(1);
expect(secondBackupRow.nextElementSibling).toBe(
screen.getByTestId("model-preset-editor"),
);
fireEvent.click(secondBackupTrigger);
expect(screen.getByRole("dialog", { name: "backup" })).toContainElement(screen.getByTestId("model-preset-editor"));
expect(screen.getByRole("button", { name: "Delete", exact: true })).toBeDisabled();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
const dataTransfer = {
dropEffect: "move",
effectAllowed: "move",
setData: vi.fn(),
};
fireEvent.dragStart(primaryRow, { dataTransfer });
fireEvent.dragEnter(firstBackupRow, { dataTransfer });
fireEvent.drop(firstBackupRow, { dataTransfer });
fireEvent.pointerDown(primaryRow, { button: 0, clientY: 100, pointerId: 1 });
fireEvent.pointerMove(primaryRow, { clientY: 40, pointerId: 1, buttons: 1 });
fireEvent.pointerUp(primaryRow, { pointerId: 1 });
await waitFor(() =>
expect(
@@ -528,11 +498,7 @@ describe("Settings models", () => {
const codexRow = await screen.findByTestId("model-call-order-row-codex");
expect(codexRow).toHaveTextContent("codex");
expect(codexRow).not.toHaveTextContent("Codex");
expect(codexRow).toHaveTextContent("openai-codex/gpt-5.5");
expect(codexRow).toHaveTextContent("Disabled");
expect(codexRow).toHaveAttribute("draggable", "false");
expect(screen.queryByRole("button", { name: "Add preset" })).not.toBeInTheDocument();
expect(codexRow).toHaveAttribute("tabindex", "-1");
const enableSwitch = within(codexRow).getByRole("switch", { name: "Enable preset" });
expect(enableSwitch).not.toBeChecked();
@@ -546,13 +512,10 @@ describe("Settings models", () => {
);
});
const enabledCodexRow = await screen.findByTestId("model-call-order-row-codex");
expect(enabledCodexRow).not.toHaveTextContent("Disabled");
expect(enabledCodexRow).not.toHaveTextContent(/Fallback/);
expect(enabledCodexRow).toHaveAttribute("draggable", "true");
expect(enabledCodexRow).toHaveAttribute("tabindex", "0");
expect(
within(enabledCodexRow).getByRole("switch", { name: "Disable preset" }),
).toBeChecked();
expect(screen.queryByText("Up to date.")).not.toBeInTheDocument();
});
it("appends a new model preset to the call order immediately", async () => {
@@ -603,11 +566,8 @@ describe("Settings models", () => {
),
);
fireEvent.click(screen.getByRole("button", { name: "New model preset" }));
expect(screen.queryByRole("dialog", { name: "New model preset" })).not.toBeInTheDocument();
expect(screen.getByRole("dialog", { name: "New model preset" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Save" })).toBeDisabled();
expect(
screen.queryByText("Complete the preset before saving."),
).not.toBeInTheDocument();
fireEvent.change(screen.getByRole("textbox", { name: "Preset name" }), {
target: { value: "Writer" },
});
@@ -631,11 +591,9 @@ describe("Settings models", () => {
);
});
const writerRow = await screen.findByTestId("model-call-order-row-Writer");
expect(writerRow).not.toHaveTextContent("Disabled");
expect(writerRow).not.toHaveTextContent(/Fallback/);
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
expect(within(writerRow).getByRole("switch", { name: "Disable preset" })).toBeChecked();
expect(screen.getAllByText("Writer").length).toBeGreaterThan(0);
expect(screen.queryByRole("button", { name: "Save order" })).not.toBeInTheDocument();
});
it("shows an inline error when a new preset name already exists", async () => {
@@ -670,7 +628,6 @@ describe("Settings models", () => {
fireEvent.change(nameInput, { target: { value: "Writer" } });
expect(nameInput).toHaveAttribute("aria-invalid", "false");
expect(screen.queryByRole("alert")).not.toBeInTheDocument();
});
it("converts legacy model settings into presets before editing call order", async () => {
@@ -719,11 +676,6 @@ describe("Settings models", () => {
20_000,
),
);
expect(
screen.queryByRole("button", { name: "Convert to presets" }),
).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Save order" })).not.toBeInTheDocument();
expect(screen.queryByText("Default")).not.toBeInTheDocument();
});
it("starts fresh users with an empty preset list instead of legacy conversion", async () => {
@@ -762,10 +714,6 @@ describe("Settings models", () => {
expect(
await screen.findByRole("button", { name: "New model preset" }),
).toBeInTheDocument();
expect(
screen.queryByRole("button", { name: "Convert to presets" }),
).not.toBeInTheDocument();
expect(screen.queryByText("claude-opus-4-5")).not.toBeInTheDocument();
});
it("does not expose the synthetic default configuration as a WebUI preset", async () => {
@@ -832,10 +780,7 @@ describe("Settings models", () => {
renderSettingsView({ initialSection: "models", initialSettings: payload });
expect((await screen.findAllByText("MiniMax-M3")).length).toBeGreaterThan(0);
expect(screen.getAllByText("fast").length).toBeGreaterThan(0);
expect(screen.queryByText("Default")).not.toBeInTheDocument();
expect(screen.queryByText("openai-codex/gpt-5.5")).not.toBeInTheDocument();
});
it("does not expose the synthetic default preset in the overview summary", async () => {
@@ -862,7 +807,6 @@ describe("Settings models", () => {
renderSettingsView({ initialSection: "overview", initialSettings: payload });
expect(await screen.findByText("openai/gpt-4o")).toBeInTheDocument();
expect(screen.queryByText("openai · default")).not.toBeInTheDocument();
expect(screen.getByText("openai")).toBeInTheDocument();
});
@@ -879,9 +823,7 @@ describe("Settings models", () => {
}),
});
expect((await screen.findAllByText("companyProxy/gpt-4o")).length).toBeGreaterThan(0);
expect(screen.getAllByText("Company Proxy").length).toBeGreaterThan(0);
expect(screen.queryByText("Provider setup required")).not.toBeInTheDocument();
});
it("does not treat auto dynamic provider api keys as configured without apiBase", async () => {
@@ -897,11 +839,7 @@ describe("Settings models", () => {
}),
});
expect((await screen.findAllByText("companyProxy/gpt-4o")).length).toBeGreaterThan(0);
expect(screen.getByText("Provider setup required")).toBeInTheDocument();
expect(
screen.queryByText("Configure this provider before saving the preset."),
).not.toBeInTheDocument();
});
it("marks the current model as unconfigured when its provider needs setup", async () => {
@@ -956,7 +894,8 @@ describe("Settings models", () => {
expect(await screen.findByText("Provider setup required")).toBeInTheDocument();
await togglePresetEditor();
expect(screen.getAllByText(/Sign in before saving/).length).toBeGreaterThan(0);
fireEvent.click(screen.getByRole("button", { name: "Sign in required" }));
expect(await screen.findByRole("tooltip")).toHaveTextContent(/Sign in before saving/);
expect(await screen.findByRole("button", { name: "Sign in" })).toBeInTheDocument();
});
@@ -1033,16 +972,10 @@ describe("Settings models", () => {
renderSettingsView({ initialSection: "models" });
await togglePresetEditor();
const deepseekButtons = await screen.findAllByRole("button", { name: /DeepSeek/ });
const providerPicker = deepseekButtons.find(
(button) => button.getAttribute("aria-haspopup") === "menu",
);
if (!providerPicker) throw new Error("provider picker was not found");
fireEvent.pointerDown(providerPicker);
const providerPicker = await screen.findByRole("combobox", { name: /DeepSeek/ });
fireEvent.keyDown(providerPicker, { key: "ArrowDown" });
expect(await screen.findByRole("menuitem", { name: /DeepSeek/ })).toBeInTheDocument();
expect(screen.queryByRole("menuitem", { name: /OpenAI Codex/ })).not.toBeInTheDocument();
expect(screen.queryByRole("menuitem", { name: /GitHub Copilot/ })).not.toBeInTheDocument();
expect(await screen.findByRole("option", { name: /DeepSeek/ })).toBeInTheDocument();
});
it("does not fetch model lists for unsigned OAuth providers", async () => {
@@ -1243,7 +1176,7 @@ describe("Settings models", () => {
await togglePresetEditor();
const modelButtons = await screen.findAllByRole("button", { name: /orcarouter\/auto/i });
await openPopover(modelButtons[modelButtons.length - 1]);
expect(await screen.findByText("Search provider catalog to choose a model.")).toBeInTheDocument();
expect(await screen.findByText("Search this provider’s model catalog.")).toBeInTheDocument();
expect(
fetchMock.mock.calls.some(([input]) =>
String(input).startsWith("/api/settings/provider-models"),
@@ -1418,9 +1351,13 @@ describe("Settings models", () => {
"/api/settings/provider-models?provider=xai_grok",
expect.objectContaining({ headers: { Authorization: "Bearer tok" } }),
);
fireEvent.keyDown(document.activeElement!, { key: "Escape" });
await waitFor(() => expect(modelButtons[modelButtons.length - 1]).toHaveFocus());
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
await waitFor(() => expect(within(screen.getByTestId("model-call-order-row-primary")).getAllByRole("button")[0]).toBeVisible());
});
it("creates presets in the inline editor and can cancel without opening a dialog", async () => {
it("creates presets in a dialog and can cancel", async () => {
const payload = settingsPayload();
payload.providers = [{ name: "openai", label: "OpenAI", configured: true }];
vi.stubGlobal(
@@ -1441,20 +1378,18 @@ describe("Settings models", () => {
renderSettingsView({ initialSection: "models" });
const createButton = await screen.findByRole("button", { name: "New model preset" });
const previousPointerEvents = document.body.style.pointerEvents;
expect(createButton).toHaveClass("w-full");
fireEvent.click(createButton);
expect(screen.queryByRole("dialog", { name: "New model preset" })).not.toBeInTheDocument();
expect(screen.getByTestId("model-preset-editor")).toHaveClass("mt-3", "mb-3");
expect(screen.getByRole("dialog", { name: "New model preset" })).toBeInTheDocument();
expect(screen.getByRole("dialog")).toContainElement(screen.getByTestId("model-preset-editor"));
expect(screen.getByRole("textbox", { name: "Preset name" })).toHaveValue("");
expect(screen.queryByText("Temperature")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: /Advanced options/ }));
expect(screen.getByText("Temperature")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Cancel" }));
expect(screen.queryByDisplayValue("Primary")).not.toBeInTheDocument();
expect(screen.queryByText("Edit preset")).not.toBeInTheDocument();
expect(document.body.style.pointerEvents).not.toBe("none");
await waitFor(() => expect(document.body.style.pointerEvents).toBe(previousPointerEvents));
fireEvent.click(screen.getByRole("button", { name: "New model preset" }));
const nameInput = await screen.findByRole("textbox", { name: "Preset name" });
+8 -26
View File
@@ -1,4 +1,4 @@
import { act, fireEvent, screen, waitFor, within } from "@testing-library/react";
import { act, fireEvent, screen, waitFor } from "@testing-library/react";
import { expect, it, vi } from "vitest";
import type { SettingsPayload } from "@/lib/types";
import { jsonResponse, settingsPayload, renderSettingsView, installSettingsViewTestHooks } from "@/tests/settings-test-utils";
@@ -26,31 +26,17 @@ describe("Settings overview and appearance", () => {
});
});
it("shows the third-party brand notice only with the brand logo preference", () => {
it("shows the brand logo explanation in a tooltip when requested", async () => {
renderSettingsView({
initialSection: "appearance",
initialSettings: settingsPayload(),
showSidebar: true,
});
const brandLogosTitle = screen.getByText("Brand logos");
const brandLogosRow = brandLogosTitle.parentElement?.parentElement;
expect(brandLogosRow).not.toBeNull();
expect(
within(brandLogosRow as HTMLElement).getByText(thirdPartyBrandNotice),
).toBeInTheDocument();
expect(screen.getAllByText(thirdPartyBrandNotice)).toHaveLength(1);
fireEvent.click(screen.getByRole("button", { name: "Brand logos" }));
expect(await screen.findByRole("tooltip")).toHaveTextContent(thirdPartyBrandNotice);
});
it.each(["apps", "channels"] as const)(
"does not repeat the third-party brand notice in %s",
(initialSection) => {
renderSettingsView({ initialSection, initialSettings: settingsPayload() });
expect(screen.queryByText(thirdPartyBrandNotice)).not.toBeInTheDocument();
},
);
it("publishes the latest settings payload to the shell", async () => {
const payload = settingsPayload();
@@ -99,7 +85,6 @@ describe("Settings overview and appearance", () => {
renderSettingsView();
expect(await screen.findByText("No apps available.")).toBeInTheDocument();
expect(screen.queryByText("Loading Apps...")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Browse MCP tools" }));
expect(await screen.findByText("Add MCP server")).toBeInTheDocument();
});
@@ -110,7 +95,7 @@ describe("Settings overview and appearance", () => {
usage: {
days: [
{
date: "2026-06-03",
date: new Date().toISOString().slice(0, 10),
input_tokens: 1200,
output_tokens: 300,
cache_read_tokens: 500,
@@ -149,11 +134,8 @@ describe("Settings overview and appearance", () => {
renderSettingsView({ initialSection: "overview" });
expect(await screen.findByLabelText("Token activity")).toBeInTheDocument();
expect(screen.getByText("Token Usage")).toBeInTheDocument();
expect(screen.queryByText("Token activity")).not.toBeInTheDocument();
expect(screen.queryByText("Total tokens")).not.toBeInTheDocument();
expect(screen.queryByText("Peak tokens")).not.toBeInTheDocument();
expect(await screen.findByLabelText("1,500 tokens")).toBeInTheDocument();
expect(screen.getByText("Token usage")).toBeInTheDocument();
});
it("coalesces focus refreshes while usage is already loading", async () => {
@@ -242,6 +224,6 @@ describe("Settings overview and appearance", () => {
renderSettingsView({ initialSection: "overview", initialSettings: payload });
expect(screen.getByLabelText("2026-06-03: 1.5K tokens, 2 requests")).toBeInTheDocument();
expect(screen.getByLabelText(/2026-06-03: 1,500 tokens, 2 requests/)).toBeInTheDocument();
});
});
+26 -37
View File
@@ -83,7 +83,7 @@ describe("Settings providers", () => {
expect(
screen.getByText(
"Complete sign-in in your browser. Nanobot usually finishes automatically; if it does not, paste the authorization code below.",
"Complete sign-in in your browser. If nanobot does not connect automatically, paste the authorization code below.",
),
).toBeInTheDocument();
const callbackInput = await screen.findByRole("textbox", {
@@ -170,7 +170,7 @@ describe("Settings providers", () => {
).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Sign in" }));
const dialog = await screen.findByRole("dialog");
const dialog = (await screen.findByText("Select Sign in to open xAI on your computer. After signing in, paste the authorization code shown by xAI below.")).closest('[role="dialog"]') as HTMLElement;
expect(openMock).not.toHaveBeenCalled();
expect(
@@ -178,12 +178,6 @@ describe("Settings providers", () => {
"Select Sign in to open xAI on your computer. After signing in, paste the authorization code shown by xAI below.",
),
).toBeInTheDocument();
expect(
within(dialog).queryByRole("textbox", { name: "xAI sign-in URL" }),
).not.toBeInTheDocument();
expect(
within(dialog).queryByRole("button", { name: "Copy" }),
).not.toBeInTheDocument();
expect(
within(dialog).getByRole("textbox", { name: "Authorization code" }),
).toBeInTheDocument();
@@ -251,7 +245,7 @@ describe("Settings providers", () => {
await chooseProviderToConfigure("OpenAI Codex");
fireEvent.click(screen.getByRole("button", { name: "Sign in" }));
const dialog = await screen.findByRole("dialog");
const dialog = (await screen.findByText("Complete sign-in in your browser. If nanobot does not connect automatically, copy the full localhost callback URL from the address bar and paste it below.")).closest('[role="dialog"]') as HTMLElement;
expect(requestMutationMock).toHaveBeenCalledWith(
"settings.provider.oauth_login",
@@ -261,13 +255,10 @@ describe("Settings providers", () => {
expect(openMock).not.toHaveBeenCalled();
expect(
within(dialog).getByText(
"Complete sign-in in your browser. Nanobot usually finishes automatically; if it does not, copy the full localhost callback URL from the address bar and paste it below.",
"Complete sign-in in your browser. If nanobot does not connect automatically, copy the full localhost callback URL from the address bar and paste it below.",
),
).toBeInTheDocument();
expect(within(dialog).getByText("Waiting for the browser callback…")).toBeInTheDocument();
expect(
within(dialog).queryByText("Paste the callback URL to continue."),
).not.toBeInTheDocument();
expect(
await screen.findByText("Signed in as acct-codex", {}, { timeout: 2500 }),
@@ -354,7 +345,7 @@ describe("Settings providers", () => {
).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Sign in" }));
const dialog = await screen.findByRole("dialog");
const dialog = (await screen.findByText("Open ChatGPT in this browser and finish signing in. When the localhost page fails to load, copy the full URL from the address bar and paste it below.")).closest('[role="dialog"]') as HTMLElement;
expect(openMock).not.toHaveBeenCalled();
expect(
@@ -496,7 +487,7 @@ describe("Settings providers", () => {
);
await waitFor(() => expect(screen.getByRole("button", { name: "Sign in" })).toBeEnabled());
fireEvent.click(screen.getByRole("button", { name: "xAI Grok" }));
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
await chooseProviderToConfigure("OpenAI Codex");
fireEvent.click(screen.getByRole("button", { name: "Advanced options" }));
const codexProxy = screen.getByLabelText("Network proxy");
@@ -595,7 +586,7 @@ describe("Settings providers", () => {
screen.getByRole("button", { name: "Save provider" }),
).toBeEnabled());
fireEvent.click(screen.getByRole("button", { name: "xAI Grok" }));
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("button", { name: "OpenAI Codex" }));
fireEvent.click(screen.getByRole("switch", { name: "Fast mode" }));
fireEvent.click(screen.getByRole("button", { name: "Save provider" }));
@@ -608,7 +599,7 @@ describe("Settings providers", () => {
screen.getByRole("button", { name: "Save provider" }),
).toBeEnabled());
fireEvent.click(screen.getByRole("button", { name: "OpenAI Codex" }));
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("button", { name: /^DeepSeek/ }));
expect(screen.getByText(/DeepSeek V4 Flash/)).toBeInTheDocument();
const deepSeekSearch = screen.getByRole("switch", { name: "DeepSeek web search" });
@@ -616,15 +607,15 @@ describe("Settings providers", () => {
fireEvent.click(deepSeekSearch);
fireEvent.click(screen.getByRole("button", { name: "Save provider" }));
await waitFor(() => expect(
screen.queryByRole("switch", { name: "DeepSeek web search" }),
).not.toBeInTheDocument());
screen.getByRole("button", { name: "DeepSeek", exact: true }),
).toBeVisible());
fireEvent.click(screen.getByRole("button", { name: /^OpenAI https:/ }));
fireEvent.click(screen.getByRole("button", { name: "OpenAI", exact: true }));
fireEvent.click(screen.getByRole("switch", { name: "OpenAI web search" }));
fireEvent.click(screen.getByRole("button", { name: "Save provider" }));
await waitFor(() => expect(
screen.queryByRole("switch", { name: "OpenAI web search" }),
).not.toBeInTheDocument());
screen.getByRole("button", { name: "OpenAI", exact: true }),
).toBeVisible());
await waitFor(() => {
const requestUpdates = requestMutationMock.mock.calls
@@ -690,7 +681,7 @@ describe("Settings providers", () => {
renderSettingsView({ initialSection: "models", initialSettings: payload });
fireEvent.click(await screen.findByRole("button", { name: /^OpenAI https:/ }));
fireEvent.click(await screen.findByRole("button", { name: "OpenAI", exact: true }));
const searchSwitch = screen.getByRole("switch", { name: "OpenAI web search" });
expect(searchSwitch).toHaveAttribute("aria-checked", "true");
fireEvent.click(searchSwitch);
@@ -792,10 +783,6 @@ describe("Settings providers", () => {
expect(openRouterOption.querySelector("svg, img")).not.toBeNull();
fireEvent.click(customOption);
expect(
screen.queryByRole("button", { name: "Add your own model provider" }),
).not.toBeInTheDocument();
expect(screen.queryByLabelText("Extra headers")).not.toBeInTheDocument();
fireEvent.change(screen.getByPlaceholderText("My model provider"), {
target: { value: "Company Gateway" },
});
@@ -807,19 +794,21 @@ describe("Settings providers", () => {
});
fireEvent.click(screen.getByRole("button", { name: "Advanced options" }));
fireEvent.change(screen.getByLabelText("Extra headers"), {
target: { value: '{"X-Tenant":"engineering"}' },
});
fireEvent.change(screen.getByLabelText("Extra body"), {
target: { value: '{"service_tier":"priority"}' },
});
fireEvent.change(screen.getByLabelText("Extra query"), {
target: { value: '{"api-version":"2026-01-01"}' },
});
for (const [title, value] of [
["Extra headers", '{"X-Tenant":"engineering"}'],
["Additional body parameters", '{"service_tier":"priority"}'],
["Additional query parameters", '{"api-version":"2026-01-01"}'],
]) {
fireEvent.click(screen.getByRole("button", { name: title }));
const editor = screen.getByRole("dialog", { name: title });
fireEvent.change(within(editor).getByRole("textbox", { name: title }), { target: { value } });
fireEvent.click(within(editor).getByRole("button", { name: "Save", exact: true }));
await waitFor(() => expect(screen.queryByRole("dialog", { name: title })).not.toBeInTheDocument());
}
fireEvent.change(screen.getByLabelText("Network proxy"), {
target: { value: "http://127.0.0.1:7890" },
});
fireEvent.pointerDown(screen.getByRole("button", { name: "Thinking style" }));
fireEvent.pointerDown(screen.getByRole("button", { name: "Reasoning parameter format" }));
fireEvent.click(await screen.findByRole("menuitem", { name: "enable_thinking" }));
fireEvent.click(screen.getByRole("button", { name: "Save provider" }));
@@ -0,0 +1,209 @@
import { fireEvent, render, screen, waitFor, within } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { RuntimeSettings } from "@/components/settings/system/RuntimeSettings";
import { TimezonePicker } from "@/components/settings/shared/TimezonePicker";
import { DEFAULT_AGENT_SETTINGS_DRAFT } from "@/components/settings/models/ModelsSettings";
import { installSettingsViewTestHooks, jsonResponse, renderSettingsView, requestMutationMock, settingsPayload } from "@/tests/settings-test-utils";
function runtimeSettings() {
return { ...settingsPayload(), runtime_config: {
"agents.defaults.bot_name": "nanobot",
"agents.defaults.bot_icon": "🐈",
"agents.defaults.timezone_mode": "auto",
"agents.defaults.timezone": "UTC",
"agents.defaults.dream.enabled": true,
"gateway.heartbeat.enabled": true,
"tools.exec.timeout": 60,
"tools.exec.allowed_env_keys": ["TERM"],
"tools.exec.allow_patterns": [],
"tools.exec.deny_patterns": [],
"tools.exec.sandbox_ro_binds": [],
"tools.exec.sandbox_rw_binds": [],
"agents.defaults.max_tool_iterations": 200,
"tools.web.proxy": "http://localhost:8080",
} };
}
describe("Runtime configuration settings", () => {
installSettingsViewTestHooks();
it("keeps local service controls available when tool families are disabled", () => {
const payload = runtimeSettings();
renderSettingsView({ initialSection: "advanced", initialSettings: {
...payload, runtime_config: {
...payload.runtime_config, "tools.exec.enable": false,
"tools.web.enable": false, "tools.cli_apps.enable": false,
},
} });
expect(screen.getByRole("switch", { name: "Local services" })).toBeVisible();
});
it("keeps chat permission settings discoverable within the advanced page", () => {
renderSettingsView({ initialSection: "advanced", initialSettings: runtimeSettings() });
expect(screen.getByRole("switch", { name: "Local services" })).toBeInTheDocument();
});
it("places common settings in their feature pages and reserves advanced for low-frequency controls", () => {
renderSettingsView({ initialSection: "runtime", initialSettings: runtimeSettings() });
expect(document.getElementById("runtime-tools.exec.enable")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Advanced" }));
expect(document.getElementById("runtime-tools.exec.sandbox")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Capabilities" }));
fireEvent.click(screen.getByRole("switch", { name: "Image generation" }));
expect(document.getElementById("runtime-tools.image_generation.save_dir")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
expect(screen.getByRole("switch", { name: "Web access" })).toBeInTheDocument();
});
it("offers only the memory consolidation switch and saves only dream.enabled", async () => {
const payload = runtimeSettings();
requestMutationMock.mockResolvedValue({ ...payload, runtime_config: { ...payload.runtime_config, "agents.defaults.dream.enabled": false } });
renderSettingsView({ initialSection: "memory", initialSettings: payload });
const memory = within(screen.getByRole("region", { name: "Memory consolidation" }));
expect(memory.getAllByRole("switch")).toHaveLength(1);
fireEvent.click(screen.getByRole("switch", { name: "Memory consolidation" }));
await waitFor(() => expect(requestMutationMock).toHaveBeenCalledWith("settings.runtime_config.update", { values: { "agents.defaults.dream.enabled": false } }, 20_000));
await waitFor(() => expect(screen.getByRole("switch", { name: "Memory consolidation" })).not.toBeChecked());
});
it("explains unavailable memory settings instead of rendering a blank page", () => {
renderSettingsView({ initialSection: "memory", initialSettings: settingsPayload() });
expect(screen.getByText("Update the gateway to edit these settings.")).toBeVisible();
});
it.each(["bwrap", "seatbelt", ""])("saves the %s sandbox and reveals its path settings", async (backend) => {
const payload = runtimeSettings();
payload.runtime_config!["tools.exec.sandbox"] = backend ? "" : "seatbelt";
requestMutationMock.mockResolvedValue({ ...payload, runtime_config: { ...payload.runtime_config, "tools.exec.sandbox": backend } });
renderSettingsView({ initialSection: "advanced", initialSettings: payload });
fireEvent.click(screen.getByRole("combobox", { name: "Command sandbox" }));
fireEvent.click(screen.getByRole("option", { name: backend || "None", exact: true }));
if (backend) expect(document.getElementById("runtime-tools.exec.sandbox_ro_binds")).toBeVisible();
else expect(document.getElementById("runtime-tools.exec.sandbox_ro_binds")).not.toBeInTheDocument();
await waitFor(() => expect(requestMutationMock).toHaveBeenCalledWith("settings.runtime_config.update", { values: { "tools.exec.sandbox": backend } }, 20_000));
});
it("edits lists in a dialog, cancels drafts, and retains failed saves for retry", async () => {
const payload = runtimeSettings();
renderSettingsView({ initialSection: "advanced", initialSettings: payload });
const trigger = screen.getByRole("button", { name: "Allowed environment variables", expanded: false });
expect(screen.queryByRole("textbox", { name: "Allowed environment variables" })).not.toBeInTheDocument();
fireEvent.click(trigger);
let dialog = screen.getByRole("dialog", { name: "Allowed environment variables" });
let editor = within(dialog).getByRole("textbox");
expect(editor).toHaveValue("TERM");
await waitFor(() => expect(editor).toHaveFocus());
fireEvent.change(editor, { target: { value: "discarded" } });
fireEvent.click(within(dialog).getByRole("button", { name: "Cancel" }));
await waitFor(() => expect(trigger).toHaveFocus());
expect(requestMutationMock).not.toHaveBeenCalled();
fireEvent.click(trigger);
dialog = screen.getByRole("dialog", { name: "Allowed environment variables" });
editor = within(dialog).getByRole("textbox");
expect(editor).toHaveValue("TERM");
fireEvent.change(editor, { target: { value: " TERM \n\n COLORTERM " } });
requestMutationMock.mockRejectedValueOnce(new Error("Could not save list"));
fireEvent.click(within(dialog).getByRole("button", { name: "Save", exact: true }));
expect(await within(dialog).findByRole("alert")).toHaveTextContent("Could not save list");
expect(editor).toHaveValue(" TERM \n\n COLORTERM ");
expect(requestMutationMock).toHaveBeenLastCalledWith("settings.runtime_config.update", {
values: { "tools.exec.allowed_env_keys": ["TERM", "COLORTERM"] },
}, 20_000);
requestMutationMock.mockResolvedValueOnce({ ...payload, requires_restart: true,
runtime_config: { ...payload.runtime_config, "tools.exec.allowed_env_keys": ["TERM", "COLORTERM"] } });
fireEvent.click(within(dialog).getByRole("button", { name: "Save", exact: true }));
await waitFor(() => expect(screen.queryByRole("dialog")).not.toBeInTheDocument());
expect(await screen.findByText("Saved. Restart to apply changes.")).toBeVisible();
fireEvent.click(trigger);
expect(within(screen.getByRole("dialog")).getByRole("textbox")).toHaveValue("TERM\nCOLORTERM");
});
it("starts the API with newly saved advanced settings", async () => {
const payload = runtimeSettings();
payload.api = { ...payload.api, host: "192.168.1.7", timeout: 77.5, api_key_hint: "set" };
const action = vi.fn();
render(<RuntimeSettings form={DEFAULT_AGENT_SETTINGS_DRAFT} settings={payload}
requiresRestartPending={false} apiService={{
installed: true, running: false, managed: false, host: "127.0.0.1", port: 8900,
timeout: 120, endpoint: "http://127.0.0.1:8900/v1", command: "nanobot serve",
api_key_hint: "set",
}} apiServiceLoading={false} apiServiceAction={null} apiServiceError={null}
capabilitiesLoading={false} capabilityAction={null} capabilityError={null}
onApiServiceAction={action} onInstallCapability={() => {}} />);
fireEvent.click(screen.getByRole("button", { name: "Start API server" }));
expect(action).toHaveBeenCalledWith("start", {
host: "192.168.1.7", port: 8900, timeout: 77.5, apiKey: undefined,
});
});
it("saves only edited fields using the existing settings footer", async () => {
const payload = runtimeSettings();
requestMutationMock.mockResolvedValue({ ...payload, requires_restart: true,
runtime_config: { ...payload.runtime_config, "tools.exec.timeout": 90 } });
renderSettingsView({ initialSection: "advanced", initialSettings: payload });
fireEvent.change(screen.getByRole("spinbutton", { name: "Command timeout (seconds)" }), { target: { value: "90" } });
await waitFor(() => expect(requestMutationMock).toHaveBeenCalledWith(
"settings.runtime_config.update", { values: { "tools.exec.timeout": 90 } }, 20_000,
));
expect(await screen.findByText("Saved. Restart to apply changes.")).toBeInTheDocument();
});
it("validates numbers and keeps a failed draft editable", async () => {
requestMutationMock.mockRejectedValue(new Error("Could not save settings"));
renderSettingsView({ initialSection: "advanced", initialSettings: runtimeSettings() });
const field = screen.getByRole("spinbutton", { name: "Command timeout (seconds)" });
fireEvent.change(field, { target: { value: "-1" } });
await waitFor(() => expect(field).toHaveFocus());
expect(field).toHaveAttribute("aria-invalid", "true");
expect(requestMutationMock).not.toHaveBeenCalled();
fireEvent.change(field, { target: { value: "17" } });
expect(await screen.findByRole("alert")).toHaveTextContent("Could not save settings");
expect(field).toHaveValue(17);
});
it("preserves drafts when navigating away and supports explicit clearing", async () => {
renderSettingsView({ initialSection: "advanced", initialSettings: runtimeSettings() });
const proxy = screen.getByRole("textbox", { name: "Web proxy" });
fireEvent.change(proxy, { target: { value: "" } });
fireEvent.click(screen.getByRole("button", { name: "System" }));
fireEvent.click(screen.getByRole("button", { name: "Advanced" }));
expect(screen.getByRole("textbox", { name: "Web proxy" })).toHaveValue("");
await waitFor(() => expect(requestMutationMock).toHaveBeenCalledWith(
"settings.runtime_config.update", { values: { "tools.web.proxy": null } }, 20_000,
));
});
it("keeps an existing timezone alias selectable and accepts only listed search results", () => {
const onChange = vi.fn();
render(<TimezonePicker value="Asia/Calcutta" aria-label="Timezone" onChange={onChange} />);
fireEvent.click(screen.getByRole("button", { name: "Timezone" }));
const search = screen.getByRole("combobox", { name: "Search" });
fireEvent.change(search, { target: { value: "invalid timezone" } });
expect(screen.getByRole("status")).toHaveTextContent("No matching timezones.");
fireEvent.keyDown(search, { key: "Enter" });
expect(onChange).not.toHaveBeenCalled();
fireEvent.change(search, { target: { value: "Asia/Calcutta" } });
fireEvent.keyDown(search, { key: "Enter" });
expect(onChange).toHaveBeenCalledWith("Asia/Calcutta");
});
it("selects a manual timezone from search results and persists both fields", async () => {
const payload = runtimeSettings();
vi.stubGlobal("fetch", vi.fn(async (input: RequestInfo | URL) =>
jsonResponse(String(input) === "/api/settings" ? payload : {})));
requestMutationMock.mockResolvedValue(payload);
renderSettingsView({ initialSection: "runtime", initialSettings: payload });
fireEvent.click(screen.getByRole("switch", { name: "Use system timezone" }));
const field = screen.getByRole("button", { name: "Timezone", expanded: false });
expect(field).toBeEnabled();
fireEvent.click(field);
fireEvent.change(screen.getByRole("combobox", { name: "Search" }), { target: { value: "Shanghai" } });
fireEvent.click(screen.getByRole("option", { name: /Asia\/Shanghai/ }));
await waitFor(() => expect(requestMutationMock).toHaveBeenCalledWith(
"settings.runtime_config.update", { values: {
"agents.defaults.timezone_mode": "manual", "agents.defaults.timezone": "Asia/Shanghai",
} }, 20_000,
));
});
});
+62 -21
View File
@@ -1,4 +1,4 @@
import { act, fireEvent, screen, waitFor } from "@testing-library/react";
import { act, fireEvent, screen, waitFor, within } from "@testing-library/react";
import { expect, it, vi } from "vitest";
import { installedMcpPresetsFromPayload } from "@/lib/mcp-preset-events";
import { requestMutationMock, jsonResponse, settingsPayload, renderSettingsView, installSettingsViewTestHooks } from "@/tests/settings-test-utils";
@@ -41,6 +41,61 @@ const agentPlugin = {
describe("Settings system domains", () => {
installSettingsViewTestHooks();
it("asks before leaving with pending changes and lets the user restart later", () => {
const leave = vi.fn();
renderSettingsView({ initialSection: "runtime", initialSettings: {
...settingsPayload(), requires_restart: true, restart_required_sections: ["runtime"],
}, onBackToChat: leave });
fireEvent.click(screen.getByRole("button", { name: "Back to chat" }));
const dialog = screen.getByRole("dialog", { name: "Restart before leaving?" });
expect(leave).not.toHaveBeenCalled();
expect(within(dialog).getByText("Your changes are saved. Restart to apply them.")).toBeVisible();
expect(within(dialog).getAllByRole("button").map((button) => button.textContent)).toEqual([
"Restart later", "Restart",
]);
fireEvent.click(within(dialog).getByRole("button", { name: "Restart later" }));
expect(leave).toHaveBeenCalledTimes(1);
expect(requestMutationMock).not.toHaveBeenCalled();
});
it("restarts from the exit prompt", () => {
const restart = vi.fn();
renderSettingsView({ initialSection: "runtime", initialSettings: {
...settingsPayload(), requires_restart: true,
}, onRestart: restart });
fireEvent.click(screen.getByRole("button", { name: "Back to chat" }));
fireEvent.click(within(screen.getByRole("dialog")).getByRole("button", { name: "Restart", exact: true }));
expect(restart).toHaveBeenCalledTimes(1);
});
it("leaves directly when no restart is pending", () => {
const leave = vi.fn();
renderSettingsView({ initialSection: "runtime", initialSettings: settingsPayload(), onBackToChat: leave });
fireEvent.click(screen.getByRole("button", { name: "Back to chat" }));
expect(leave).toHaveBeenCalledTimes(1);
});
it("keeps one restart action and pending notice in the sidebar across settings pages", async () => {
renderSettingsView({
initialSection: "runtime",
initialSettings: {
...settingsPayload(),
requires_restart: true,
restart_required_sections: ["runtime", "image"],
},
});
const sidebar = screen.getByRole("complementary");
const restart = within(sidebar).getByRole("button", { name: "Restart", exact: true });
for (const section of ["Capabilities", "Models", "Advanced", "System"]) {
fireEvent.click(within(sidebar).getByRole("button", { name: section, exact: true }));
await waitFor(() => {
expect(screen.getAllByRole("button", { name: "Restart", exact: true })).toEqual([restart]);
expect(screen.getAllByText("Saved. Restart to apply changes.")).toHaveLength(1);
expect(within(sidebar).getByText("Saved. Restart to apply changes.")).toBeVisible();
});
}
});
it("keeps enabled Agent Plugins out of MCP composer attachments", () => {
const enabled = { ...agentPlugin, enabled: true, available: true, status: "enabled" };
expect(installedMcpPresetsFromPayload({ presets: [enabled], installed_count: 1 })).toEqual([]);
@@ -109,10 +164,6 @@ describe("Settings system domains", () => {
expect(screen.getByRole("heading", { name: "Automations" })).toBeInTheDocument();
expect(await screen.findByText("No automations yet.")).toBeInTheDocument();
expect(screen.queryByText("Settings")).not.toBeInTheDocument();
expect(
screen.queryByPlaceholderText("Search task, message, linked chat, or schedule"),
).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Open a chat" }));
expect(onBackToChat).toHaveBeenCalledTimes(1);
});
@@ -262,7 +313,6 @@ describe("Settings system domains", () => {
renderSettingsView();
expect(screen.queryByRole("heading", { name: "Apps" })).not.toBeInTheDocument();
expect(await screen.findByText("AnyGen")).toBeInTheDocument();
const uninstall = screen.getByRole("button", { name: "Uninstall app" });
@@ -279,7 +329,6 @@ describe("Settings system domains", () => {
fireEvent.click(screen.getByRole("button", { name: "Dismiss" }));
expect(screen.queryByText("Uninstalled CLI for AnyGen.")).not.toBeInTheDocument();
});
it("keeps runtime dependencies out of Apps and explains chat mentions", async () => {
@@ -319,15 +368,9 @@ describe("Settings system domains", () => {
renderSettingsView({ initialSection: "apps" });
expect(await screen.findByText("AnyGen")).toBeInTheDocument();
expect(
screen.queryByText("Add tools to nanobot, then @ them in chat."),
).not.toBeInTheDocument();
expect(screen.getByRole("button", { name: "Ready" })).toHaveAttribute("aria-pressed", "false");
expect(screen.getByRole("button", { name: "Apps" })).toHaveAttribute("aria-pressed", "true");
expect(screen.getByRole("button", { name: "MCP" })).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Plugins" })).not.toBeInTheDocument();
expect(screen.queryByText("Api")).not.toBeInTheDocument();
expect(screen.queryByText("0 ready")).not.toBeInTheDocument();
});
it("shows nanobot optional features and enables one", async () => {
@@ -402,10 +445,10 @@ describe("Settings system domains", () => {
renderSettingsView({ initialSection: "channels" });
const matrixRow = await screen.findByRole("button", { name: "View Matrix settings" });
expect(matrixRow).toHaveAttribute("aria-pressed", "true");
expect(screen.getAllByText("Matrix")).toHaveLength(2);
expect(screen.getAllByText("Use nanobot from Matrix rooms.")).toHaveLength(2);
expect(screen.queryByText(/Enabling Nanobot features may install Python packages/)).not.toBeInTheDocument();
expect(matrixRow).toHaveAttribute("aria-haspopup", "dialog");
fireEvent.click(matrixRow);
expect(screen.getByRole("heading", { name: "Matrix", exact: true })).toBeVisible();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("switch", { name: "Matrix channel" }));
expect(screen.getByRole("dialog", { name: "Install support for Matrix?" })).toBeInTheDocument();
expect(screen.getByText("nanobot will add what Matrix needs, then turn it on. Continue?")).toBeInTheDocument();
@@ -422,15 +465,14 @@ describe("Settings system domains", () => {
await waitFor(() =>
expect(screen.getByRole("switch", { name: "Matrix channel" })).toHaveAttribute("aria-checked", "true"),
);
expect(screen.queryByText("Enabled channel 'matrix'")).not.toBeInTheDocument();
expect(screen.queryByText("Restart nanobot to apply updated channel support.")).not.toBeInTheDocument();
expect(screen.getAllByText("On").length).toBeGreaterThan(0);
fireEvent.click(screen.getByRole("button", { name: "View Matrix settings" }));
expect(screen.getByLabelText("Homeserver")).toBeInTheDocument();
expect(screen.getByLabelText("User ID")).toBeInTheDocument();
expect(screen.getByLabelText("Device ID")).toBeInTheDocument();
expect(screen.queryByText("channels.matrix.homeserver")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
fireEvent.click(screen.getByRole("switch", { name: "Matrix channel" }));
await waitFor(() =>
@@ -443,6 +485,5 @@ describe("Settings system domains", () => {
await waitFor(() =>
expect(screen.getByRole("switch", { name: "Matrix channel" })).toHaveAttribute("aria-checked", "false"),
);
expect(screen.queryByText("Disabled channel 'matrix'")).not.toBeInTheDocument();
});
});
+2
View File
@@ -140,6 +140,7 @@ export function renderSettingsView(
onBackToChat?: () => void;
onSettingsChange?: (payload: SettingsPayload) => void;
onNativeEngineRestart?: () => Promise<string>;
onRestart?: () => void;
} = {},
) {
render(
@@ -154,6 +155,7 @@ export function renderSettingsView(
onModelNameChange={() => {}}
onSettingsChange={options.onSettingsChange}
onNativeEngineRestart={options.onNativeEngineRestart}
onRestart={options.onRestart}
/>
</ClientProvider>,
);
+10
View File
@@ -3,6 +3,16 @@ import { beforeAll, beforeEach } from "vitest";
import i18n, { initializeI18n, loadAllLocaleResources } from "@/i18n";
// The DOM test environment does not implement pointer capture used by Radix Select.
if (!HTMLElement.prototype.hasPointerCapture) {
HTMLElement.prototype.hasPointerCapture = () => false;
HTMLElement.prototype.setPointerCapture = () => {};
HTMLElement.prototype.releasePointerCapture = () => {};
}
if (!HTMLElement.prototype.scrollIntoView) {
HTMLElement.prototype.scrollIntoView = () => {};
}
function createTestStorage(): Storage {
const store = new Map<string, string>();
return {
+93
View File
@@ -0,0 +1,93 @@
import { fireEvent, render, screen, within } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { TokenUsageCard } from "@/components/settings/TokenUsageCard";
import { TokenUsageModelTrend } from "@/components/settings/TokenUsageModelTrend";
import type { SettingsPayload } from "@/lib/types";
type Usage = NonNullable<SettingsPayload["usage"]>;
function day(date: string, tokens: number): Usage["days"][number] {
return { date, total_tokens: tokens, input_tokens: tokens, output_tokens: 0,
cache_read_tokens: 0, cache_write_tokens: 0, cache_read_observed_input_tokens: 0,
cache_write_observed_input_tokens: 0, requests: 1 };
}
function usage(days: Usage["days"]): Usage {
return { days, total_tokens: 999999, total_tokens_30d: 999999, total_tokens_365d: 999999,
peak_day_tokens: 999999, current_streak_days: 0, longest_streak_days: 0,
active_days_30d: 0, requests_30d: 0, updated_at: "2026-09-09T00:00:00Z" };
}
describe("Token usage card", () => {
beforeEach(() => {
vi.useFakeTimers({ toFake: ["Date"] });
vi.setSystemTime(new Date("2026-09-09T12:00:00Z"));
});
afterEach(() => vi.useRealTimers());
it("uses one 30-day window for the total, chart and source percentages", () => {
const today = { ...day("2026-09-09", 300), input_tokens: 240, output_tokens: 60, cache_read_tokens: 120, cache_read_observed_input_tokens: 180, estimated_tokens: 100,
sources: { user: day("2026-09-09", 200) } };
render(<TokenUsageCard timeZone="UTC" usage={usage([
day("2026-08-10", 9000), day("2026-08-11", 100), today, day("2026-09-10", 9000),
])} />);
expect(screen.getByLabelText("400 tokens")).toBeInTheDocument();
const bars = within(screen.getByRole("group", { name: "Daily token usage" })).getAllByRole("img");
expect(bars).toHaveLength(30);
expect(bars.filter((bar) => bar.tabIndex === 0)).toEqual([bars[0], bars[29]]);
expect(bars[0]).toHaveAccessibleName(/2026-08-11: 100 tokens, 1 requests/);
expect(bars[29]).toHaveAccessibleName(/Cached input: 120, Cache miss: 60, Cache status unknown: 60, Output: 60/);
const segments = bars[29].firstElementChild?.children;
expect(segments).toHaveLength(4);
expect(segments?.[0]).toHaveStyle({ height: "40%" });
expect(segments?.[1]).toHaveStyle({ height: "20%" });
expect(segments?.[2]).toHaveStyle({ height: "20%" });
expect(segments?.[3]).toHaveStyle({ height: "20%" });
expect(bars[0]).toHaveAccessibleName(/Cache miss: 0, Cache status unknown: 100/);
expect(screen.getAllByText("50%")).toHaveLength(2);
expect(screen.getByText("Unclassified")).toBeInTheDocument();
});
it("shows an empty state for zero usage", () => {
render(<TokenUsageCard usage={usage([])} />);
expect(screen.getByRole("status")).toHaveTextContent("No token usage in the last 30 days.");
});
it("opens details and computes the weighted cache rate from observed input only", () => {
render(<TokenUsageCard usage={usage([
{ ...day("2026-09-08", 100), cache_read_tokens: 80, cache_read_observed_input_tokens: 100 },
{ ...day("2026-09-09", 900), cache_read_tokens: 20, cache_read_observed_input_tokens: 300 },
])} />);
fireEvent.click(screen.getByRole("button", { name: "View details" }));
const details = screen.getByRole("dialog", { name: "Token usage" });
expect(within(details).getByText("25%")).toBeInTheDocument();
expect(within(details).getByTitle("Cache hit rate excludes input with unknown cache status.")).toBeInTheDocument();
});
it("does not misrepresent unavailable usage as zero", () => {
render(<TokenUsageCard />);
expect(screen.getByRole("status")).toHaveTextContent("Usage data is unavailable.");
expect(screen.getByText("—")).toBeInTheDocument();
});
it("keeps the five leading model series and reconciles the rest to the daily total", () => {
const days = Array.from({ length: 30 }, (_, index) => {
const date = new Date("2026-09-09T00:00:00Z");
date.setUTCDate(date.getUTCDate() - 29 + index);
const key = date.toISOString().slice(0, 10);
return { date: key, usage: day(key, index === 29 ? 2200 : 0) };
});
render(<TokenUsageModelTrend days={days}
models={[{ ...day("2026-09-09", 600), provider: "provider", model: "model-5",
cache_read_tokens: 120, cache_read_observed_input_tokens: 150,
reported_tokens: 600, estimated_tokens: 0, successful_requests: 1, failed_requests: 0,
reported_requests: 1, estimated_requests: 0, generation_ms: 0, measured_output_tokens: 0,
ttft_ms: 0, timed_requests: 0, duration_ms: 0 }]}
modelDays={Array.from({ length: 6 }, (_, index) => ({ date: "2026-09-09", provider: "provider", model: `model-${index}`, total_tokens: (index + 1) * 100 }))} />);
const column = screen.getAllByRole("img")[29];
expect(screen.getAllByRole("img").filter((bar) => bar.tabIndex === 0)).toEqual([column]);
expect(column).toHaveAccessibleName(/2026-09-09: 2,200 tokens/);
expect(column).toHaveAccessibleName(/model-5: 600/);
expect(column).toHaveAccessibleName(/Other \/ unattributed: 200/);
const legend = screen.getByLabelText("model-5: Total tokens: 600 · 27.3%, Cache hit rate: 80%");
expect(legend).toHaveAttribute("tabindex", "0");
});
});
+36
View File
@@ -0,0 +1,36 @@
import { act, fireEvent, render, screen } from "@testing-library/react";
import { afterEach, expect, it, vi } from "vitest";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
function Hints() {
return <TooltipProvider>{["First", "Second"].map(label => (
<Tooltip key={label}>
<TooltipTrigger asChild><button>{label}</button></TooltipTrigger>
<TooltipContent>{label} help</TooltipContent>
</Tooltip>
))}</TooltipProvider>;
}
afterEach(() => vi.useRealTimers());
it("waits 500ms for each hover, including after a recently opened hint", () => {
vi.useFakeTimers();
render(<Hints />);
for (const label of ["First", "Second"]) {
const trigger = screen.getByRole("button", { name: label });
fireEvent.pointerMove(trigger, { pointerType: "mouse" });
act(() => vi.advanceTimersByTime(499));
expect(screen.queryByRole("tooltip")).not.toBeInTheDocument();
act(() => vi.advanceTimersByTime(1));
expect(screen.getByRole("tooltip")).toHaveTextContent(`${label} help`);
fireEvent.pointerLeave(trigger, { pointerType: "mouse" });
fireEvent.pointerMove(document.body, { pointerType: "mouse", clientX: 1000, clientY: 1000 });
act(() => vi.advanceTimersByTime(1));
}
});
it("shows keyboard focus help immediately", () => {
render(<Hints />);
fireEvent.focus(screen.getByRole("button", { name: "First" }));
expect(screen.getByRole("tooltip")).toHaveTextContent("First help");
});
+2 -2
View File
@@ -24,7 +24,7 @@ import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
describe("UI shape system", () => {
it("gives standard controls one shared radius", () => {
it("uses pill-shaped inputs and the shared radius for other controls", () => {
render(
<>
<Button>Continue</Button>
@@ -34,7 +34,7 @@ describe("UI shape system", () => {
);
expect(screen.getByRole("button", { name: "Continue" })).toHaveClass("rounded-control");
expect(screen.getByRole("textbox", { name: "Name" })).toHaveClass("rounded-control");
expect(screen.getByRole("textbox", { name: "Name" })).toHaveClass("rounded-full");
expect(screen.getByRole("textbox", { name: "Description" })).toHaveClass(
"rounded-control",
);