refactor(api)!: remove the standalone API server (#6614)
This commit is contained in:
1 parent
5c72ced2fe
commit
220d5e6970
99 files changed
+240
-4133
No files matched your search
@@ -467,15 +467,10 @@ export function SettingsPage({
|
||||
onRestart={showSidebar ? undefined : restartViaSettingsSurface}
|
||||
isRestarting={restartInProgress}
|
||||
requiresRestartPending={pendingRestartSections.runtime}
|
||||
apiService={systemState.apiService}
|
||||
apiServiceLoading={systemState.apiServiceLoading}
|
||||
apiServiceAction={systemState.apiServiceAction}
|
||||
apiServiceError={systemState.apiServiceError}
|
||||
langfuseFeature={featureCatalog.find((feature) => feature.name === "langfuse")}
|
||||
capabilitiesLoading={systemState.nanobotFeaturesLoading}
|
||||
capabilityAction={systemState.nanobotFeatureAction}
|
||||
capabilityError={systemState.nanobotFeaturesError}
|
||||
onApiServiceAction={systemActions.handleApiServiceAction}
|
||||
onInstallCapability={(name) => void systemActions.installCapabilities([name])}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -119,7 +119,7 @@ export function SettingsSectionSkeleton({ section, showRestart = false, sandboxS
|
||||
</SettingsGroup><div className="settings-footer flex items-center justify-between gap-2"><div className="flex h-11 items-center sm:h-9"><div className={cn(block, "h-3 w-20")} /></div><div className="flex h-11 items-center sm:h-9"><div className={cn(block, "h-3 w-28")} /></div></div></section>;
|
||||
break;
|
||||
case "runtime":
|
||||
content = <><RuntimeGroups page="runtime" /><Group controls={["input", "segments", "input", "input"]} /><Group controls={["input"]} /><Group controls={showRestart ? ["text", "text", "input"] : ["text", "text"]} /></>;
|
||||
content = <><RuntimeGroups page="runtime" /><Group controls={["input"]} /><Group controls={showRestart ? ["text", "text", "input"] : ["text", "text"]} /></>;
|
||||
break;
|
||||
case "advanced":
|
||||
content = <RuntimeGroups page="advanced" sandboxSupported={sandboxSupported} />;
|
||||
|
||||
@@ -93,7 +93,7 @@ export function useRuntimeConfigSettings(
|
||||
const maximum = field.kind === "duration" ? settings.advanced.exec_max_runtime_limit : field.max;
|
||||
const parsed = Number(raw);
|
||||
if (String(raw).trim() === "" || !Number.isFinite(parsed)
|
||||
|| (field.path !== "api.timeout" && !Number.isInteger(parsed))
|
||||
|| !Number.isInteger(parsed)
|
||||
|| (field.min !== undefined && parsed < field.min)
|
||||
|| (maximum !== undefined && parsed > maximum)) {
|
||||
setErrors((prev) => ({ ...prev, [group]: t("settings.runtimeConfig.numberError") }));
|
||||
@@ -288,7 +288,7 @@ export function RuntimeConfigSettings({
|
||||
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}
|
||||
min={field.min} max={field.max} step={1}
|
||||
value={String(current)} className="h-9 rounded-full text-[13px]" autoComplete="off"
|
||||
onChange={(event) => state.change(field, event.target.value)} />
|
||||
)}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Eye, EyeOff, Loader2, PauseCircle, PlayCircle, RotateCcw } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { Loader2, RotateCcw } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import type { AgentSettingsDraft } from "@/components/settings/models/ModelsSettings";
|
||||
import {
|
||||
NumberInput,
|
||||
ReadOnlyRow,
|
||||
SettingsGroup,
|
||||
SettingsRow,
|
||||
@@ -12,11 +11,8 @@ import {
|
||||
StatusPill,
|
||||
} from "@/components/settings/shared/SettingsControls";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { SegmentedControl } from "@/components/ui/segmented-control";
|
||||
import { isLoopbackHost } from "@/lib/network";
|
||||
import { getRuntimeHost, isNativeRuntime } from "@/lib/runtime";
|
||||
import type { ApiServicePayload, NanobotFeatureInfo, SettingsPayload } from "@/lib/types";
|
||||
import type { NanobotFeatureInfo, SettingsPayload } from "@/lib/types";
|
||||
|
||||
export function RuntimeSettings({
|
||||
form,
|
||||
@@ -24,15 +20,10 @@ export function RuntimeSettings({
|
||||
onRestart,
|
||||
isRestarting,
|
||||
requiresRestartPending,
|
||||
apiService,
|
||||
apiServiceLoading,
|
||||
apiServiceAction,
|
||||
apiServiceError,
|
||||
langfuseFeature,
|
||||
capabilitiesLoading,
|
||||
capabilityAction,
|
||||
capabilityError,
|
||||
onApiServiceAction,
|
||||
onInstallCapability,
|
||||
}: {
|
||||
form: AgentSettingsDraft;
|
||||
@@ -40,18 +31,10 @@ export function RuntimeSettings({
|
||||
onRestart?: () => void;
|
||||
isRestarting?: boolean;
|
||||
requiresRestartPending: boolean;
|
||||
apiService: ApiServicePayload | null;
|
||||
apiServiceLoading: boolean;
|
||||
apiServiceAction: "start" | "stop" | null;
|
||||
apiServiceError: string | null;
|
||||
langfuseFeature?: NanobotFeatureInfo;
|
||||
capabilitiesLoading: boolean;
|
||||
capabilityAction: string | null;
|
||||
capabilityError: string | null;
|
||||
onApiServiceAction: (
|
||||
action: "start" | "stop",
|
||||
values?: { host: string; port: number; timeout: number; apiKey?: string },
|
||||
) => void;
|
||||
onInstallCapability: (name: string) => void;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
@@ -74,30 +57,6 @@ export function RuntimeSettings({
|
||||
} | null>(null);
|
||||
const [hostActionBusy, setHostActionBusy] =
|
||||
useState<"logs" | "diagnostics" | null>(null);
|
||||
const apiDefaults = apiService ?? {
|
||||
installed: false,
|
||||
running: false,
|
||||
managed: false,
|
||||
host: settings.api?.host ?? "127.0.0.1",
|
||||
port: settings.api?.port ?? 8900,
|
||||
timeout: settings.api?.timeout ?? 120,
|
||||
api_key_hint: settings.api?.api_key_hint,
|
||||
endpoint: `http://127.0.0.1:${settings.api?.port ?? 8900}/v1`,
|
||||
command: "nanobot serve",
|
||||
};
|
||||
const [apiHost, setApiHost] = useState(apiDefaults.host);
|
||||
const [apiPort, setApiPort] = useState(apiDefaults.port);
|
||||
const [apiKey, setApiKey] = useState("");
|
||||
const [apiKeyVisible, setApiKeyVisible] = useState(false);
|
||||
useEffect(() => {
|
||||
if (!apiService) return;
|
||||
setApiHost(settings.api?.host ?? apiService.host);
|
||||
setApiPort(settings.api?.port ?? apiService.port);
|
||||
setApiKey("");
|
||||
setApiKeyVisible(false);
|
||||
}, [apiService, settings.api?.host, settings.api?.port]);
|
||||
const apiNetworkAccess = !isLoopbackHost(apiHost);
|
||||
const apiMissingNetworkKey = apiNetworkAccess && !apiKey.trim() && !apiDefaults.api_key_hint;
|
||||
const engineState = isRestarting
|
||||
? tx("settings.values.restartingEngine", "Restarting")
|
||||
: settings.apply_state?.status === "pending"
|
||||
@@ -205,118 +164,6 @@ export function RuntimeSettings({
|
||||
</section>
|
||||
) : null}
|
||||
|
||||
<section>
|
||||
<SettingsSectionTitle>{tx("settings.api.title", "API server")}</SettingsSectionTitle>
|
||||
<SettingsGroup>
|
||||
<SettingsRow
|
||||
title={tx("settings.api.openaiCompatible", "OpenAI-compatible API")}
|
||||
description={
|
||||
apiServiceError
|
||||
? apiServiceError
|
||||
: apiDefaults.running
|
||||
? apiDefaults.endpoint
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<div className="flex items-center justify-end gap-2">
|
||||
<StatusPill tone={apiDefaults.running ? "success" : "neutral"}>
|
||||
{apiServiceLoading
|
||||
? tx("settings.values.checking", "Checking")
|
||||
: apiDefaults.running
|
||||
? tx("settings.values.running", "Running")
|
||||
: tx("settings.values.off", "Off")}
|
||||
</StatusPill>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
disabled={apiServiceLoading || apiServiceAction !== null || apiMissingNetworkKey}
|
||||
onClick={() =>
|
||||
onApiServiceAction(
|
||||
apiDefaults.running ? "stop" : "start",
|
||||
apiDefaults.running
|
||||
? undefined
|
||||
: {
|
||||
host: apiHost,
|
||||
port: apiPort,
|
||||
timeout: settings.api?.timeout ?? apiDefaults.timeout,
|
||||
apiKey: apiKey.trim() || undefined,
|
||||
},
|
||||
)
|
||||
}
|
||||
className="rounded-full"
|
||||
>
|
||||
{apiServiceAction ? (
|
||||
<Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden />
|
||||
) : apiDefaults.running ? (
|
||||
<PauseCircle className="mr-1.5 h-3.5 w-3.5" aria-hidden />
|
||||
) : (
|
||||
<PlayCircle className="mr-1.5 h-3.5 w-3.5" aria-hidden />
|
||||
)}
|
||||
{apiServiceAction === "start"
|
||||
? tx("settings.api.starting", "Starting...")
|
||||
: apiServiceAction === "stop"
|
||||
? tx("settings.api.stopping", "Stopping...")
|
||||
: apiDefaults.running
|
||||
? tx("settings.api.stop", "Stop")
|
||||
: tx("settings.api.start", "Start API server")}
|
||||
</Button>
|
||||
</div>
|
||||
</SettingsRow>
|
||||
{!apiDefaults.running ? (
|
||||
<>
|
||||
<SettingsRow
|
||||
title={tx("settings.api.access", "Access")}
|
||||
description={
|
||||
apiNetworkAccess
|
||||
? tx("settings.api.networkHelp", "Other devices can connect; an API key is required.")
|
||||
: tx("settings.api.localHelp", "Only this device can connect.")
|
||||
}
|
||||
>
|
||||
<SegmentedControl
|
||||
value={apiNetworkAccess ? "network" : "local"}
|
||||
options={[
|
||||
{ value: "local", label: tx("settings.api.thisDevice", "This device") },
|
||||
{ value: "network", label: tx("settings.api.localNetwork", "Local network") },
|
||||
]}
|
||||
onChange={(value) => setApiHost(value === "network" ? "0.0.0.0" : "127.0.0.1")}
|
||||
/>
|
||||
</SettingsRow>
|
||||
<SettingsRow title={tx("settings.api.port", "Port")}>
|
||||
<NumberInput value={apiPort} min={1} max={65535} onChange={setApiPort} />
|
||||
</SettingsRow>
|
||||
<SettingsRow
|
||||
title={tx("settings.api.apiKey", "API key")}
|
||||
description={
|
||||
apiMissingNetworkKey
|
||||
? tx("settings.api.apiKeyRequired", "Required before exposing the API to your network.")
|
||||
: tx("settings.api.apiKeyHelp", "Clients send this as a Bearer token.")
|
||||
}
|
||||
>
|
||||
<div className="relative w-full">
|
||||
<Input
|
||||
type={apiKeyVisible ? "text" : "password"}
|
||||
value={apiKey}
|
||||
onChange={(event) => setApiKey(event.target.value)}
|
||||
placeholder={apiDefaults.api_key_hint ?? tx("settings.api.apiKeyPlaceholder", "Enter an API key")}
|
||||
className="h-9 rounded-full pr-10 text-[13px]"
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setApiKeyVisible((visible) => !visible)}
|
||||
aria-label={apiKeyVisible ? tx("settings.byok.hideApiKey", "Hide API key") : tx("settings.byok.showApiKey", "Show API key")}
|
||||
className="absolute right-1 top-1/2 h-7 w-7 -translate-y-1/2 rounded-full"
|
||||
>
|
||||
{apiKeyVisible ? <EyeOff className="h-3.5 w-3.5" /> : <Eye className="h-3.5 w-3.5" />}
|
||||
</Button>
|
||||
</div>
|
||||
</SettingsRow>
|
||||
</>
|
||||
) : null}
|
||||
</SettingsGroup>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<SettingsSectionTitle>{tx("settings.observability.title", "Observability")}</SettingsSectionTitle>
|
||||
<SettingsGroup>
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { Dispatch, SetStateAction } from "react";
|
||||
import type { TFunction } from "i18next";
|
||||
|
||||
import type {
|
||||
ApplySettingsPayload,
|
||||
MaybeRestartHostEngine,
|
||||
PendingRestartSections,
|
||||
} from "@/components/settings/contracts";
|
||||
@@ -15,8 +14,6 @@ import {
|
||||
completeMcpOAuth,
|
||||
disableNanobotFeature,
|
||||
enableNanobotFeature,
|
||||
fetchNanobotFeatures,
|
||||
fetchSettings,
|
||||
fetchMcpOAuthStatus,
|
||||
fetchMcpPresets,
|
||||
importMcpConfig,
|
||||
@@ -25,8 +22,6 @@ import {
|
||||
runMcpPresetAction,
|
||||
saveCustomMcpServer,
|
||||
startMcpOAuth,
|
||||
startApiService,
|
||||
stopApiService,
|
||||
updateAutomation,
|
||||
updateMcpServerTools,
|
||||
} from "@/lib/api";
|
||||
@@ -71,10 +66,8 @@ interface SystemSettingsActionsOptions {
|
||||
state: SystemSettingsState;
|
||||
featureCatalog: NanobotFeatureInfo[];
|
||||
client: NanobotClient;
|
||||
token: string;
|
||||
getToken: () => string;
|
||||
t: TFunction;
|
||||
applyPayload: ApplySettingsPayload;
|
||||
maybeRestartHostEngine: MaybeRestartHostEngine;
|
||||
setPendingRestartSections: Dispatch<SetStateAction<PendingRestartSections>>;
|
||||
refreshAutomations: (showLoading?: boolean) => Promise<void>;
|
||||
@@ -84,16 +77,13 @@ export function createSystemSettingsActions({
|
||||
state,
|
||||
featureCatalog,
|
||||
client,
|
||||
token,
|
||||
getToken,
|
||||
t,
|
||||
applyPayload,
|
||||
maybeRestartHostEngine,
|
||||
setPendingRestartSections,
|
||||
refreshAutomations,
|
||||
}: SystemSettingsActionsOptions) {
|
||||
const {
|
||||
apiServiceAction,
|
||||
customMcpForm,
|
||||
mcpConfigImport,
|
||||
mcpOAuthCallbackUrl,
|
||||
@@ -102,9 +92,6 @@ export function createSystemSettingsActions({
|
||||
mcpOAuthPopupRef,
|
||||
nanobotFeatureActionRef,
|
||||
nanobotFeatures,
|
||||
setApiService,
|
||||
setApiServiceAction,
|
||||
setApiServiceError,
|
||||
setAutomationAction,
|
||||
setAutomationPendingDelete,
|
||||
setAutomationPendingEdit,
|
||||
@@ -172,29 +159,6 @@ export function createSystemSettingsActions({
|
||||
}
|
||||
};
|
||||
|
||||
const handleApiServiceAction = async (
|
||||
action: "start" | "stop",
|
||||
values?: { host: string; port: number; timeout: number; apiKey?: string },
|
||||
) => {
|
||||
if (apiServiceAction) return;
|
||||
setApiServiceAction(action);
|
||||
setApiServiceError(null);
|
||||
try {
|
||||
const payload = action === "start"
|
||||
? await startApiService(client, values!)
|
||||
: await stopApiService(client);
|
||||
setApiService(payload);
|
||||
const refreshed = await fetchNanobotFeatures(token);
|
||||
setNanobotFeatures(refreshed);
|
||||
const nextSettings = await fetchSettings(token);
|
||||
applyPayload(nextSettings);
|
||||
} catch (err) {
|
||||
setApiServiceError((err as Error).message);
|
||||
} finally {
|
||||
setApiServiceAction(null);
|
||||
}
|
||||
};
|
||||
|
||||
const handleCliAppAction = async (
|
||||
action: "install" | "update" | "uninstall" | "test",
|
||||
name: string,
|
||||
@@ -709,7 +673,6 @@ export function createSystemSettingsActions({
|
||||
};
|
||||
|
||||
return {
|
||||
handleApiServiceAction,
|
||||
handleAutomationAction,
|
||||
handleAutomationEdit,
|
||||
handleAutomationChat,
|
||||
|
||||
@@ -25,7 +25,6 @@ export const RUNTIME_CONFIG_GROUPS: { id: string; page: RuntimeConfigPage; enabl
|
||||
{ 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" },
|
||||
];
|
||||
|
||||
@@ -68,7 +67,5 @@ export const RUNTIME_CONFIG_FIELDS: RuntimeConfigField[] = [
|
||||
{ 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" },
|
||||
];
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
} from "@/components/settings/system/AppsSettings";
|
||||
import type { SystemSettingsState } from "@/components/settings/system/useSystemSettingsState";
|
||||
import {
|
||||
fetchApiService,
|
||||
fetchAutomations,
|
||||
fetchNanobotFeatures,
|
||||
} from "@/lib/api";
|
||||
@@ -28,9 +27,6 @@ export function useSystemSettingsEffects({
|
||||
pageVisible,
|
||||
}: SystemSettingsEffectsOptions) {
|
||||
const {
|
||||
setApiService,
|
||||
setApiServiceError,
|
||||
setApiServiceLoading,
|
||||
setAutomations,
|
||||
setAutomationsError,
|
||||
setAutomationsLoading,
|
||||
@@ -136,28 +132,6 @@ export function useSystemSettingsEffects({
|
||||
};
|
||||
}, [activeSection, getToken, pageVisible]);
|
||||
|
||||
useEffect(() => {
|
||||
if (activeSection !== "runtime") return;
|
||||
let cancelled = false;
|
||||
setApiServiceLoading(true);
|
||||
fetchApiService(getToken())
|
||||
.then((payload) => {
|
||||
if (!cancelled) {
|
||||
setApiService(payload);
|
||||
setApiServiceError(null);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
if (!cancelled) setApiServiceError((err as Error).message);
|
||||
})
|
||||
.finally(() => {
|
||||
if (!cancelled) setApiServiceLoading(false);
|
||||
});
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, [activeSection, getToken]);
|
||||
|
||||
useEffect(() => {
|
||||
if (activeSection !== "apps" || !pageVisible) return;
|
||||
let cancelled = false;
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
type CustomMcpForm,
|
||||
} from "@/components/settings/system/AppsSettings";
|
||||
import type {
|
||||
ApiServicePayload,
|
||||
AutomationsPayload,
|
||||
McpOAuthFlowPayload,
|
||||
NanobotFeatureInfo,
|
||||
@@ -45,10 +44,6 @@ export function useSystemSettingsState(toolsCatalog: ToolsCatalog) {
|
||||
const [mcpOAuthCallbackUrl, setMcpOAuthCallbackUrl] = useState("");
|
||||
const [mcpOAuthCompleting, setMcpOAuthCompleting] = useState(false);
|
||||
const [mcpOAuthCallbackError, setMcpOAuthCallbackError] = useState<string | null>(null);
|
||||
const [apiService, setApiService] = useState<ApiServicePayload | null>(null);
|
||||
const [apiServiceLoading, setApiServiceLoading] = useState(false);
|
||||
const [apiServiceAction, setApiServiceAction] = useState<"start" | "stop" | null>(null);
|
||||
const [apiServiceError, setApiServiceError] = useState<string | null>(null);
|
||||
const [appsQuery, setAppsQuery] = useState("");
|
||||
const [automationsFilter, setAutomationsFilter] = useState<AutomationFilter>("all");
|
||||
const [cliAppsMessage, setCliAppsMessage] = useState<string | null>(null);
|
||||
@@ -71,10 +66,6 @@ export function useSystemSettingsState(toolsCatalog: ToolsCatalog) {
|
||||
return {
|
||||
toolsCatalog,
|
||||
toolsCatalogInvalidation,
|
||||
apiService,
|
||||
apiServiceAction,
|
||||
apiServiceError,
|
||||
apiServiceLoading,
|
||||
appsKindFilter,
|
||||
appsQuery,
|
||||
automationAction,
|
||||
@@ -112,10 +103,6 @@ export function useSystemSettingsState(toolsCatalog: ToolsCatalog) {
|
||||
nanobotFeatures,
|
||||
nanobotFeaturesError,
|
||||
nanobotFeaturesLoading,
|
||||
setApiService,
|
||||
setApiServiceAction,
|
||||
setApiServiceError,
|
||||
setApiServiceLoading,
|
||||
setAppsKindFilter,
|
||||
setAppsQuery,
|
||||
setAutomationAction,
|
||||
|
||||
@@ -415,10 +415,8 @@ export function useSettingsController({
|
||||
state: systemState,
|
||||
featureCatalog,
|
||||
client,
|
||||
token,
|
||||
getToken,
|
||||
t,
|
||||
applyPayload,
|
||||
maybeRestartHostEngine,
|
||||
setPendingRestartSections,
|
||||
refreshAutomations,
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "Saved. Restart the API service to apply changes.",
|
||||
"commandRuntime": {
|
||||
"custom": "Custom (seconds)",
|
||||
"customLabel": "Custom runtime (seconds)",
|
||||
@@ -702,14 +701,6 @@
|
||||
"label": "Restart mode",
|
||||
"help": "Choose a restart method; Automatic follows your environment.\n\nChoose how the gateway restarts. Automatic selects a method for your environment."
|
||||
},
|
||||
"api_host": {
|
||||
"label": "API address",
|
||||
"help": "Set a key before allowing network access; restart the API after changes.\n\nSet an API key in System before binding to a network address. Restart the API service to apply changes."
|
||||
},
|
||||
"api_timeout": {
|
||||
"label": "API timeout",
|
||||
"help": "Maximum seconds per API request; restart to apply.\n\nHow long each API request can take. Restart the API service to apply changes."
|
||||
},
|
||||
"tools_image_generation_save_dir": {
|
||||
"label": "Save directory",
|
||||
"help": "Relative path inside the media directory; existing images stay put.\n\nSubdirectory of nanobot’s media directory. Use a relative path; existing images are not moved."
|
||||
@@ -768,10 +759,6 @@
|
||||
"title": "Gateway",
|
||||
"help": "Set deployment and restart options."
|
||||
},
|
||||
"api": {
|
||||
"title": "API settings",
|
||||
"help": "Set the listening address and request timeout."
|
||||
},
|
||||
"storage": {
|
||||
"title": "Image storage",
|
||||
"help": "Choose where generated images are saved."
|
||||
@@ -1433,27 +1420,6 @@
|
||||
"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 through an OpenAI-compatible API.",
|
||||
"start": "Start API server",
|
||||
"starting": "Starting...",
|
||||
"stop": "Stop",
|
||||
"stopping": "Stopping...",
|
||||
"access": "Access",
|
||||
"thisDevice": "This device",
|
||||
"localNetwork": "Local network",
|
||||
"localHelp": "Only this device can connect.",
|
||||
"networkHelp": "LAN access requires an API key.\n\nOther devices can connect; an API key is required.",
|
||||
"port": "Port",
|
||||
"portHelp": "Local port used by the API service.",
|
||||
"apiKey": "API key",
|
||||
"apiKeyHelp": "Send the key as a Bearer token.",
|
||||
"apiKeyRequired": "Required before exposing the API to your network.",
|
||||
"apiKeyPlaceholder": "Enter an API key",
|
||||
"autoInstall": "Required API server packages will be installed automatically when you start it."
|
||||
},
|
||||
"observability": {
|
||||
"title": "Run tracing",
|
||||
"configured": "Tracing credentials are available to nanobot.",
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "Guardado. Reinicia el servicio API para aplicar los cambios.",
|
||||
"commandRuntime": {
|
||||
"custom": "Personalizada (segundos)",
|
||||
"customLabel": "Duración personalizada (segundos)",
|
||||
@@ -585,8 +584,6 @@
|
||||
"gateway_host": {"label": "Dirección de la puerta de enlace", "help": "Dirección de la puerta de enlace; configura el listener WebUI aparte.\n\nDirecció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 de la puerta de enlace; los argumentos de inicio tienen prioridad.\n\nPuerto guardado. Los argumentos de línea de comandos tienen prioridad."},
|
||||
"gateway_restart_mode": {"label": "Modo de reinicio", "help": "Elige cómo reiniciar; Automático se adapta al entorno.\n\nMétodo de reinicio del proceso. El modo automático depende del entorno del host."},
|
||||
"api_host": {"label": "Dirección API", "help": "Configura una clave antes del acceso por red; reinicia la API tras los cambios.\n\nSe 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 API", "help": "Segundos máximos por solicitud API; reinicia para aplicar.\n\nDuración máxima de las solicitudes. Reinicia el servicio API para aplicar los cambios."},
|
||||
"tools_image_generation_save_dir": {"label": "Directorio de guardado", "help": "Ruta relativa dentro del directorio multimedia; las imágenes existentes no se mueven.\n\nRuta relativa dentro de la carpeta multimedia de nanobot. Las imágenes existentes no se mueven."}
|
||||
},
|
||||
"groups": {
|
||||
@@ -603,7 +600,6 @@
|
||||
"safety": {"title": "Permisos globales", "help": "Configura límites del espacio, excepciones de red e instalaciones remotas.\n\nRestricciones del espacio de trabajo, redes privadas e instalaciones remotas."},
|
||||
"cli": {"title": "Límites CLI", "help": "Configura tiempos límite de instalación y ejecución y la duración de caché.\n\nTiempos de instalación, ejecución y caché del catálogo."},
|
||||
"gateway": {"title": "Puerta de enlace", "help": "Configura el despliegue y el reinicio."},
|
||||
"api": {"title": "Ajustes API", "help": "Configura la dirección de escucha y el tiempo límite de solicitudes."},
|
||||
"storage": {"title": "Almacenamiento de imágenes", "help": "Elige dónde guardar las imágenes generadas."},
|
||||
"maintenance": {"title": "Organización de memoria", "help": ""},
|
||||
"web": {"title": "Acceso web", "help": ""},
|
||||
@@ -1238,16 +1234,6 @@
|
||||
"supabase": "Consulta y gestiona proyectos."
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"title": "Servidor API", "openaiCompatible": "API compatible con OpenAI",
|
||||
"description": "Conecta mediante una API compatible con OpenAI.",
|
||||
"start": "Iniciar servidor API", "starting": "Iniciando...", "stop": "Detener", "stopping": "Deteniendo...",
|
||||
"access": "Acceso", "thisDevice": "Este dispositivo", "localNetwork": "Red local",
|
||||
"localHelp": "Solo este dispositivo puede conectarse.", "networkHelp": "El acceso desde la red local requiere una clave API.\n\nOtros dispositivos pueden conectarse; se requiere una clave API.",
|
||||
"port": "Puerto", "portHelp": "Puerto local del servicio API.", "apiKey": "Clave API",
|
||||
"apiKeyHelp": "Envía la clave como Bearer token.", "apiKeyRequired": "Obligatoria antes de exponer la API en la red.",
|
||||
"apiKeyPlaceholder": "Introduce una clave API", "autoInstall": "Las dependencias del servidor API se instalarán automáticamente al iniciarlo."
|
||||
},
|
||||
"observability": {
|
||||
"title": "Trazas de ejecución", "configured": "Las credenciales de trazas están disponibles para nanobot.",
|
||||
"environment": "Configura LANGFUSE_SECRET_KEY y LANGFUSE_PUBLIC_KEY y reinicia nanobot.", "enable": "Activar trazas"
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "Enregistré. Redémarrez le service API pour appliquer les modifications.",
|
||||
"commandRuntime": {
|
||||
"custom": "Personnalisée (secondes)",
|
||||
"customLabel": "Durée personnalisée (secondes)",
|
||||
@@ -585,8 +584,6 @@
|
||||
"gateway_host": {"label": "Adresse de la passerelle", "help": "Adresse de la passerelle ; configurez l’écoute WebUI séparément.\n\nAdresse 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 de la passerelle ; les arguments de lancement sont prioritaires.\n\nPort enregistré. Les arguments de ligne de commande ont priorité."},
|
||||
"gateway_restart_mode": {"label": "Mode de redémarrage", "help": "Choisissez le redémarrage ; Automatique suit votre environnement.\n\nMode de redémarrage du processus. Le mode automatique dépend de l’environnement hôte."},
|
||||
"api_host": {"label": "Adresse API", "help": "Définissez une clé avant l’accès réseau ; redémarrez l’API après modification.\n\nUne 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 API", "help": "Secondes maximales par requête API ; redémarrez pour appliquer.\n\nDurée maximale des requêtes. Redémarrez le service API pour appliquer les modifications."},
|
||||
"tools_image_generation_save_dir": {"label": "Dossier de sauvegarde", "help": "Chemin relatif dans le dossier des médias ; les images existantes ne sont pas déplacées.\n\nChemin relatif sous le dossier multimédia de nanobot. Les images existantes ne sont pas déplacées."}
|
||||
},
|
||||
"groups": {
|
||||
@@ -603,7 +600,6 @@
|
||||
"safety": {"title": "Permissions globales", "help": "Réglez les limites de l’espace, les exceptions réseau et les installations distantes.\n\nRestrictions de l’espace de travail, réseaux privés et installations à distance."},
|
||||
"cli": {"title": "Limites CLI", "help": "Réglez les délais d’installation et d’exécution, et la durée du cache.\n\nDélais d’installation, d’exécution et de cache du catalogue."},
|
||||
"gateway": {"title": "Passerelle", "help": "Réglez le déploiement et le redémarrage."},
|
||||
"api": {"title": "Réglages API", "help": "Réglez l’adresse d’écoute et le délai des requêtes."},
|
||||
"storage": {"title": "Stockage des images", "help": "Choisissez où enregistrer les images générées."},
|
||||
"maintenance": {"title": "Organisation de la mémoire", "help": ""},
|
||||
"web": {"title": "Accès web", "help": ""},
|
||||
@@ -1238,15 +1234,6 @@
|
||||
"supabase": "Consultez et gérez les projets."
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"title": "Serveur API", "openaiCompatible": "API compatible OpenAI", "description": "Connectez-vous via une API compatible OpenAI.",
|
||||
"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": "L’accès réseau local nécessite une clé API.\n\nD’autres appareils peuvent se connecter ; une clé API est requise.",
|
||||
"port": "Port", "portHelp": "Port local du service API.", "apiKey": "Clé API", "apiKeyHelp": "Envoyez la clé comme Bearer token.",
|
||||
"apiKeyRequired": "Requise avant d’exposer l’API au réseau.", "apiKeyPlaceholder": "Saisissez une clé API",
|
||||
"autoInstall": "Les dépendances du serveur API seront installées automatiquement au démarrage."
|
||||
},
|
||||
"observability": {
|
||||
"title": "Traces d’exécution", "configured": "Les identifiants de traçage sont disponibles pour nanobot.",
|
||||
"environment": "Définissez LANGFUSE_SECRET_KEY et LANGFUSE_PUBLIC_KEY, puis redémarrez nanobot.", "enable": "Activer les traces"
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "Tersimpan. Mulai ulang layanan API untuk menerapkan perubahan.",
|
||||
"commandRuntime": {
|
||||
"custom": "Kustom (detik)",
|
||||
"customLabel": "Durasi kustom (detik)",
|
||||
@@ -585,8 +584,6 @@
|
||||
"gateway_host": {"label": "Alamat gateway", "help": "Alamat gateway; atur listener WebUI secara terpisah.\n\nAlamat tempat gateway menerima koneksi. Alamat WebSocket dan WebUI diatur di Kanal → WebSocket."},
|
||||
"gateway_port": {"label": "Port gateway", "help": "Port gateway; argumen peluncuran diutamakan.\n\nPort yang disimpan. Argumen baris perintah lebih diutamakan."},
|
||||
"gateway_restart_mode": {"label": "Mode mulai ulang", "help": "Pilih cara mulai ulang; Otomatis mengikuti lingkungan.\n\nCara memulai ulang proses. Mode otomatis memilih berdasarkan lingkungan host."},
|
||||
"api_host": {"label": "Alamat API", "help": "Tetapkan kunci sebelum akses jaringan; mulai ulang API setelah perubahan.\n\nKunci 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 API", "help": "Batas detik tiap permintaan API; mulai ulang untuk menerapkan.\n\nDurasi maksimum permintaan. Mulai ulang layanan API untuk menerapkan perubahan."},
|
||||
"tools_image_generation_save_dir": {"label": "Direktori penyimpanan", "help": "Lokasi relatif dalam direktori media; gambar yang ada tidak dipindahkan.\n\nJalur relatif di dalam folder media nanobot. Gambar yang ada tidak dipindahkan."}
|
||||
},
|
||||
"groups": {
|
||||
@@ -603,7 +600,6 @@
|
||||
"safety": {"title": "Izin global", "help": "Atur batas ruang kerja, pengecualian jaringan, dan pemasangan jarak jauh.\n\nPembatasan ruang kerja, jaringan privat, dan instalasi jarak jauh."},
|
||||
"cli": {"title": "Batas CLI", "help": "Atur batas waktu pemasangan dan eksekusi, serta durasi cache daftar.\n\nBatas waktu instalasi, eksekusi, dan cache katalog."},
|
||||
"gateway": {"title": "Gateway", "help": "Atur opsi penerapan dan mulai ulang."},
|
||||
"api": {"title": "Pengaturan API", "help": "Atur alamat listener dan batas waktu permintaan."},
|
||||
"storage": {"title": "Penyimpanan gambar", "help": "Pilih lokasi penyimpanan gambar yang dibuat."},
|
||||
"maintenance": {"title": "Pengaturan memori", "help": ""},
|
||||
"web": {"title": "Akses web", "help": ""},
|
||||
@@ -1238,15 +1234,6 @@
|
||||
"supabase": "Lihat dan kelola proyek."
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"title": "Server API", "openaiCompatible": "API kompatibel OpenAI", "description": "Hubungkan melalui API yang kompatibel dengan OpenAI.",
|
||||
"start": "Mulai server API", "starting": "Memulai...", "stop": "Hentikan", "stopping": "Menghentikan...",
|
||||
"access": "Akses", "thisDevice": "Perangkat ini", "localNetwork": "Jaringan lokal",
|
||||
"localHelp": "Hanya perangkat ini yang dapat terhubung.", "networkHelp": "Akses LAN memerlukan kunci API.\n\nPerangkat lain dapat terhubung; kunci API diperlukan.",
|
||||
"port": "Port", "portHelp": "Port lokal untuk layanan API.", "apiKey": "Kunci API", "apiKeyHelp": "Kirim kunci sebagai Bearer token.",
|
||||
"apiKeyRequired": "Wajib sebelum membuka API ke jaringan.", "apiKeyPlaceholder": "Masukkan kunci API",
|
||||
"autoInstall": "Paket yang diperlukan server API akan dipasang otomatis saat server dimulai."
|
||||
},
|
||||
"observability": {
|
||||
"title": "Pelacakan eksekusi", "configured": "Kredensial pelacakan sudah tersedia untuk nanobot.",
|
||||
"environment": "Atur LANGFUSE_SECRET_KEY dan LANGFUSE_PUBLIC_KEY, lalu mulai ulang nanobot.", "enable": "Aktifkan pelacakan"
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "保存しました。API サービスを再起動すると反映されます。",
|
||||
"commandRuntime": {
|
||||
"custom": "カスタム(秒)",
|
||||
"customLabel": "カスタム実行時間(秒)",
|
||||
@@ -585,8 +584,6 @@
|
||||
"gateway_host": {"label": "ゲートウェイアドレス", "help": "ゲートウェイのアドレスです。WebUI の待ち受けは別に設定します。\n\nゲートウェイの待ち受けアドレスです。WebSocket と WebUI のアドレスは「チャンネル → WebSocket」で設定します。"},
|
||||
"gateway_port": {"label": "ゲートウェイのポート", "help": "ゲートウェイのポートです。起動引数が優先されます。\n\n保存するポート番号。コマンドライン引数が優先されます。"},
|
||||
"gateway_restart_mode": {"label": "再起動モード", "help": "再起動方法を選びます。「自動」は環境に合わせます。\n\nプロセスの再起動方法。自動モードではホスト環境に応じて選択します。"},
|
||||
"api_host": {"label": "API アドレス", "help": "ネットワーク公開前にキーを設定し、変更後は API を再起動します。\n\nlocalhost 以外のアドレスで待ち受けるには API キーが必要です。「システム」でキーを設定し、API サービスを再起動して変更を反映してください。"},
|
||||
"api_timeout": {"label": "API 制限時間", "help": "API 要求の最大秒数です。適用には再起動が必要です。\n\nリクエストの時間制限です。API サービスの再起動後に反映されます。"},
|
||||
"tools_image_generation_save_dir": {"label": "保存先", "help": "メディア内の相対パスです。既存の画像は移動しません。\n\nnanobot のメディアディレクトリ内の相対パス。既存の画像は移動しません。"}
|
||||
},
|
||||
"groups": {
|
||||
@@ -603,7 +600,6 @@
|
||||
"safety": {"title": "全体の権限", "help": "ワークスペース制限、ネットワーク例外、リモートインストールを設定します。\n\nワークスペース制限、プライベートネットワーク、リモートインストール。"},
|
||||
"cli": {"title": "CLI 制限", "help": "インストール・実行の制限時間と一覧のキャッシュ期間を設定します。\n\nインストール、実行、カタログキャッシュの時間制限。"},
|
||||
"gateway": {"title": "ゲートウェイ", "help": "配置と再起動の方法を設定します。"},
|
||||
"api": {"title": "API 設定", "help": "待ち受けアドレスと要求の制限時間を設定します。"},
|
||||
"storage": {"title": "画像の保存", "help": "生成した画像の保存先を選びます。"},
|
||||
"maintenance": {"title": "メモリー整理", "help": ""},
|
||||
"web": {"title": "ウェブアクセス", "help": ""},
|
||||
@@ -1238,15 +1234,6 @@
|
||||
"supabase": "プロジェクトを確認・管理します。"
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"title": "API サーバー", "openaiCompatible": "OpenAI 互換 API", "description": "OpenAI 互換の API で接続します。",
|
||||
"start": "API サーバーを起動", "starting": "起動中...", "stop": "停止", "stopping": "停止中...",
|
||||
"access": "アクセス", "thisDevice": "このデバイス", "localNetwork": "ローカルネットワーク",
|
||||
"localHelp": "この端末だけが接続できます。", "networkHelp": "LAN からのアクセスには API キーが必要です。\n\n他のデバイスも接続できるため API キーが必要です。",
|
||||
"port": "ポート", "portHelp": "API サービスが使うローカルポートです。", "apiKey": "API キー", "apiKeyHelp": "キーを Bearer Token として送信します。",
|
||||
"apiKeyRequired": "ネットワークに公開する前に必要です。", "apiKeyPlaceholder": "API キーを入力",
|
||||
"autoInstall": "起動時に API サーバーに必要なパッケージを自動的にインストールします。"
|
||||
},
|
||||
"observability": {
|
||||
"title": "実行の追跡", "configured": "nanobot がトレース認証情報を利用できます。",
|
||||
"environment": "LANGFUSE_SECRET_KEY と LANGFUSE_PUBLIC_KEY を設定して nanobot を再起動してください。", "enable": "追跡を有効化"
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "저장했습니다. API 서비스를 다시 시작하면 적용됩니다.",
|
||||
"commandRuntime": {
|
||||
"custom": "사용자 지정(초)",
|
||||
"customLabel": "사용자 지정 실행 시간(초)",
|
||||
@@ -585,8 +584,6 @@
|
||||
"gateway_host": {"label": "게이트웨이 주소", "help": "게이트웨이 주소입니다. WebUI 수신 주소는 별도로 설정합니다.\n\n게이트웨이가 연결을 수신하는 주소입니다. WebSocket과 WebUI 주소는 채널 → WebSocket에서 설정합니다."},
|
||||
"gateway_port": {"label": "게이트웨이 포트", "help": "게이트웨이 포트입니다. 시작 인수가 우선합니다.\n\n저장할 포트입니다. 명령줄 인수가 우선 적용됩니다."},
|
||||
"gateway_restart_mode": {"label": "다시 시작 방식", "help": "재시작 방법을 선택하세요. 자동은 실행 환경에 맞춥니다.\n\n프로세스를 다시 시작하는 방식입니다. 자동 모드는 호스트 환경에 따라 선택합니다."},
|
||||
"api_host": {"label": "API 주소", "help": "네트워크 접근 허용 전 키를 설정하고, 변경 후 API를 재시작하세요.\n\nlocalhost 이외의 주소에서 연결을 받으려면 API 키가 필요합니다. 시스템에서 키를 설정하고 API 서비스를 다시 시작해 변경 사항을 적용하세요."},
|
||||
"api_timeout": {"label": "API 제한 시간", "help": "API 요청당 최대 초입니다. 적용하려면 재시작하세요.\n\n요청에 허용되는 최대 시간입니다. API 서비스를 다시 시작하면 적용됩니다."},
|
||||
"tools_image_generation_save_dir": {"label": "저장 디렉터리", "help": "미디어 디렉터리 내부의 상대 경로입니다. 기존 이미지는 이동하지 않습니다.\n\nnanobot 미디어 폴더 아래의 상대 경로입니다. 기존 이미지는 이동하지 않습니다."}
|
||||
},
|
||||
"groups": {
|
||||
@@ -603,7 +600,6 @@
|
||||
"safety": {"title": "전체 권한", "help": "작업 공간 제한, 네트워크 예외 및 원격 설치를 설정하세요.\n\n작업 공간 제한, 사설 네트워크 및 원격 설치입니다."},
|
||||
"cli": {"title": "CLI 제한", "help": "설치와 실행 제한 시간, 목록 캐시 시간을 설정하세요.\n\n설치, 실행 및 카탈로그 캐시의 시간 제한입니다."},
|
||||
"gateway": {"title": "게이트웨이", "help": "배포와 재시작 옵션을 설정하세요."},
|
||||
"api": {"title": "API 설정", "help": "수신 주소와 요청 제한 시간을 설정하세요."},
|
||||
"storage": {"title": "이미지 저장", "help": "생성한 이미지의 저장 위치를 선택하세요."},
|
||||
"maintenance": {"title": "메모리 정리", "help": ""},
|
||||
"web": {"title": "웹 접근", "help": ""},
|
||||
@@ -1238,15 +1234,6 @@
|
||||
"supabase": "프로젝트를 확인하고 관리합니다."
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"title": "API 서버", "openaiCompatible": "OpenAI 호환 API", "description": "OpenAI 호환 API로 연결합니다.",
|
||||
"start": "API 서버 시작", "starting": "시작 중...", "stop": "중지", "stopping": "중지 중...",
|
||||
"access": "접근", "thisDevice": "이 기기", "localNetwork": "로컬 네트워크",
|
||||
"localHelp": "이 기기만 연결할 수 있습니다.", "networkHelp": "LAN 접근에는 API 키가 필요합니다.\n\n다른 기기도 연결할 수 있으므로 API 키가 필요합니다.",
|
||||
"port": "포트", "portHelp": "API 서비스가 사용하는 로컬 포트입니다.", "apiKey": "API 키", "apiKeyHelp": "키를 Bearer Token으로 전송합니다.",
|
||||
"apiKeyRequired": "네트워크에 공개하기 전에 필요합니다.", "apiKeyPlaceholder": "API 키 입력",
|
||||
"autoInstall": "서버를 시작할 때 필요한 패키지를 자동으로 설치합니다."
|
||||
},
|
||||
"observability": {
|
||||
"title": "실행 추적", "configured": "nanobot이 추적 인증 정보을 사용할 수 있습니다.",
|
||||
"environment": "LANGFUSE_SECRET_KEY와 LANGFUSE_PUBLIC_KEY를 설정한 뒤 nanobot을 다시 시작하세요.", "enable": "추적 활성화"
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "Salvo. Reinicie o serviço de API para aplicar as alterações.",
|
||||
"commandRuntime": {
|
||||
"custom": "Personalizada (segundos)",
|
||||
"customLabel": "Duração personalizada (segundos)",
|
||||
@@ -585,8 +584,6 @@
|
||||
"gateway_host": {"label": "Endereço do gateway", "help": "Endereço do gateway; configure a escuta WebUI separadamente.\n\nEndereç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 do gateway; os argumentos de inicialização têm prioridade.\n\nPorta salva. Os argumentos de linha de comando têm prioridade."},
|
||||
"gateway_restart_mode": {"label": "Modo de reinicialização", "help": "Escolha como reiniciar; Automático segue o ambiente.\n\nMétodo de reinicialização do processo. O modo automático depende do ambiente do host."},
|
||||
"api_host": {"label": "Endereço da API", "help": "Defina uma chave antes do acesso pela rede; reinicie a API após alterações.\n\nÉ 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 da API", "help": "Máximo de segundos por solicitação API; reinicie para aplicar.\n\nDuração máxima das solicitações. Reinicie o serviço de API para aplicar as alterações."},
|
||||
"tools_image_generation_save_dir": {"label": "Pasta de destino", "help": "Caminho relativo dentro da pasta de mídia; imagens existentes não são movidas.\n\nCaminho relativo dentro da pasta de mídia do nanobot. As imagens existentes não são movidas."}
|
||||
},
|
||||
"groups": {
|
||||
@@ -603,7 +600,6 @@
|
||||
"safety": {"title": "Permissões globais", "help": "Configure limites do espaço, exceções de rede e instalações remotas.\n\nRestrições do espaço de trabalho, redes privadas e instalações remotas."},
|
||||
"cli": {"title": "Limites CLI", "help": "Configure tempos limite de instalação e execução e duração do cache.\n\nTempos de instalação, execução e cache do catálogo."},
|
||||
"gateway": {"title": "Gateway", "help": "Configure implantação e reinício."},
|
||||
"api": {"title": "Ajustes da API", "help": "Configure o endereço de escuta e o tempo limite das solicitações."},
|
||||
"storage": {"title": "Armazenamento de imagens", "help": "Escolha onde salvar as imagens geradas."},
|
||||
"maintenance": {"title": "Organização de memória", "help": ""},
|
||||
"web": {"title": "Acesso web", "help": ""},
|
||||
@@ -1241,27 +1237,6 @@
|
||||
"searchInstallOnSave": "As dependências do Olostep serão instaladas automaticamente ao salvar.",
|
||||
"installing": "Instalando dependências…"
|
||||
},
|
||||
"api": {
|
||||
"title": "Servidor de API",
|
||||
"openaiCompatible": "API compatível com OpenAI",
|
||||
"description": "Conecte por uma API compatível com OpenAI.",
|
||||
"start": "Iniciar servidor de API",
|
||||
"starting": "Iniciando...",
|
||||
"stop": "Parar",
|
||||
"stopping": "Parando...",
|
||||
"access": "Acesso",
|
||||
"thisDevice": "Este dispositivo",
|
||||
"localNetwork": "Rede local",
|
||||
"localHelp": "Somente este dispositivo pode conectar.",
|
||||
"networkHelp": "O acesso pela LAN exige uma chave API.\n\nOutros dispositivos podem se conectar; é necessária uma chave de API.",
|
||||
"port": "Porta",
|
||||
"portHelp": "Porta local do serviço API.",
|
||||
"apiKey": "Chave de API",
|
||||
"apiKeyHelp": "Envie a chave como Bearer token.",
|
||||
"apiKeyRequired": "Obrigatória antes de expor a API na rede.",
|
||||
"apiKeyPlaceholder": "Informe uma chave de API",
|
||||
"autoInstall": "As dependências do servidor de API serão instaladas automaticamente ao iniciá-lo."
|
||||
},
|
||||
"observability": {
|
||||
"title": "Rastreamento de execução",
|
||||
"configured": "As credenciais de rastreamento estão disponíveis para o nanobot.",
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "Đã lưu. Khởi động lại dịch vụ API để áp dụng thay đổi.",
|
||||
"commandRuntime": {
|
||||
"custom": "Tùy chỉnh (giây)",
|
||||
"customLabel": "Thời gian chạy tùy chỉnh (giây)",
|
||||
@@ -585,8 +584,6 @@
|
||||
"gateway_host": {"label": "Địa chỉ gateway", "help": "Địa chỉ gateway; đặt địa chỉ lắng nghe WebUI riêng.\n\nĐị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 gateway; tham số khởi chạy được ưu tiên.\n\nCổ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": "Chọn cách khởi động lại; Tự động dựa theo môi trường.\n\nCá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ỉ API", "help": "Đặt khóa trước khi cho phép truy cập mạng; khởi động lại API sau thay đổi.\n\nCầ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 hạn API", "help": "Số giây mỗi yêu cầu API tối đa; khởi động lại để áp dụng.\n\nThờ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 lưu", "help": "Đường dẫn tương đối trong thư mục media; không chuyển ảnh có sẵn.\n\nĐườ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": {
|
||||
@@ -603,7 +600,6 @@
|
||||
"safety": {"title": "Quyền chung", "help": "Đặt giới hạn vùng làm việc, ngoại lệ mạng và cài đặt từ xa.\n\nGiớ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 CLI", "help": "Đặt thời hạn cài đặt, chạy và thời gian cache danh sách.\n\nGiới hạn thời gian cài đặt, thực thi và lưu đệm danh mục."},
|
||||
"gateway": {"title": "Gateway", "help": "Đặt cách triển khai và khởi động lại."},
|
||||
"api": {"title": "Thiết lập API", "help": "Đặt địa chỉ lắng nghe và thời hạn yêu cầu."},
|
||||
"storage": {"title": "Lưu trữ ảnh", "help": "Chọn nơi lưu ảnh được tạo."},
|
||||
"maintenance": {"title": "Sắp xếp bộ nhớ", "help": ""},
|
||||
"web": {"title": "Truy cập web", "help": ""},
|
||||
@@ -1238,15 +1234,6 @@
|
||||
"supabase": "Xem và quản lý dự án."
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"title": "Máy chủ API", "openaiCompatible": "API tương thích OpenAI", "description": "Kết nối qua API tương thích OpenAI.",
|
||||
"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": "Truy cập LAN cần khóa API.\n\nThiết bị khác có thể kết nối; cần khóa API.",
|
||||
"port": "Cổng", "portHelp": "Cổng cục bộ dịch vụ API sử dụng.", "apiKey": "Khóa API", "apiKeyHelp": "Gửi khóa dưới dạng Bearer Token.",
|
||||
"apiKeyRequired": "Bắt buộc trước khi mở API ra mạng.", "apiKeyPlaceholder": "Nhập khóa API",
|
||||
"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": "Theo dõi chạy", "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"
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "已保存,重启 API 服务后生效。",
|
||||
"commandRuntime": {
|
||||
"custom": "自定义(秒)",
|
||||
"customLabel": "自定义运行时长(秒)",
|
||||
@@ -702,14 +701,6 @@
|
||||
"label": "重启模式",
|
||||
"help": "选择重启方式,自动按环境决定\n\n选择网关的重启方式。“自动”会根据运行环境选择。"
|
||||
},
|
||||
"api_host": {
|
||||
"label": "API 地址",
|
||||
"help": "对外开放须设密钥;修改后重启 API\n\n允许其他设备连接前,请先在“系统”中设置 API 密钥。修改后需重启 API 服务。"
|
||||
},
|
||||
"api_timeout": {
|
||||
"label": "API 超时",
|
||||
"help": "API 最长等待秒数,重启服务生效\n\n每次 API 请求最长等待多久。修改后需重启 API 服务。"
|
||||
},
|
||||
"tools_image_generation_save_dir": {
|
||||
"label": "保存目录",
|
||||
"help": "媒体目录内相对路径,不迁移已有图片\n\nnanobot 媒体目录内的子目录。请使用相对路径,已有图片不会迁移。"
|
||||
@@ -768,10 +759,6 @@
|
||||
"title": "网关",
|
||||
"help": "设置部署和重启方式"
|
||||
},
|
||||
"api": {
|
||||
"title": "API 设置",
|
||||
"help": "设置监听地址和请求超时"
|
||||
},
|
||||
"storage": {
|
||||
"title": "图片存储",
|
||||
"help": "选择生成图片的保存位置"
|
||||
@@ -1433,27 +1420,6 @@
|
||||
"searchInstallOnSave": "保存时会自动安装 Olostep 所需的软件包。",
|
||||
"installing": "正在安装所需软件包…"
|
||||
},
|
||||
"api": {
|
||||
"title": "API 服务",
|
||||
"openaiCompatible": "OpenAI 兼容 API",
|
||||
"description": "通过兼容 OpenAI 的 API 连接",
|
||||
"start": "启动 API 服务",
|
||||
"starting": "正在启动...",
|
||||
"stop": "停止",
|
||||
"stopping": "正在停止...",
|
||||
"access": "访问范围",
|
||||
"thisDevice": "仅此设备",
|
||||
"localNetwork": "局域网",
|
||||
"localHelp": "仅当前设备可连接",
|
||||
"networkHelp": "局域网可连接,须设置 API 密钥\n\n局域网内其他设备可以连接,因此必须设置 API 密钥。",
|
||||
"port": "端口",
|
||||
"portHelp": "API 服务使用的本地端口",
|
||||
"apiKey": "API 密钥",
|
||||
"apiKeyHelp": "通过 Bearer Token 发送密钥",
|
||||
"apiKeyRequired": "向局域网开放 API 前必须设置密钥。",
|
||||
"apiKeyPlaceholder": "输入 API 密钥",
|
||||
"autoInstall": "启动时会自动安装 API 服务所需的软件包。"
|
||||
},
|
||||
"observability": {
|
||||
"title": "运行追踪",
|
||||
"configured": "nanobot 已检测到追踪凭证。",
|
||||
|
||||
@@ -537,7 +537,6 @@
|
||||
}
|
||||
},
|
||||
"runtimeConfig": {
|
||||
"apiSaved": "已儲存,重新啟動 API 服務後生效。",
|
||||
"commandRuntime": {
|
||||
"custom": "自訂(秒)",
|
||||
"customLabel": "自訂執行時間(秒)",
|
||||
@@ -585,8 +584,6 @@
|
||||
"gateway_host": {"label": "閘道器地址", "help": "閘道器地址,WebUI 監聽地址另設\n\n閘道器使用的地址。WebUI 的監聽地址需在聊天平臺的 WebSocket 設定中單獨配置。"},
|
||||
"gateway_port": {"label": "閘道連接埠", "help": "閘道器埠,啟動引數優先\n\n閘道器使用的埠。啟動時指定的命令列引數優先於此設定。"},
|
||||
"gateway_restart_mode": {"label": "重新啟動方式", "help": "選擇重啟方式,自動按環境決定\n\n選擇閘道器的重啟方式。“自動”會根據執行環境選擇。"},
|
||||
"api_host": {"label": "API 地址", "help": "對外開放須設金鑰;修改後重啟 API\n\n允許其他裝置連線前,請先在“系統”中設定 API 金鑰。修改後需重啟 API 服務。"},
|
||||
"api_timeout": {"label": "API 超時", "help": "API 最長等待秒數,重啟服務生效\n\n每次 API 請求最長等待多久。修改後需重啟 API 服務。"},
|
||||
"tools_image_generation_save_dir": {"label": "儲存目錄", "help": "媒體目錄內相對路徑,不遷移已有圖片\n\nnanobot 媒體目錄內的子目錄。請使用相對路徑,已有圖片不會遷移。"}
|
||||
},
|
||||
"groups": {
|
||||
@@ -603,7 +600,6 @@
|
||||
"safety": {"title": "全域性許可權", "help": "設定目錄限制、網路例外和遠端安裝\n\n設定工作區訪問限制、網路訪問例外和遠端安裝許可權。"},
|
||||
"cli": {"title": "CLI 限制", "help": "設定安裝、執行超時和列表快取\n\n設定安裝和執行超時,以及應用列表的快取時長。"},
|
||||
"gateway": {"title": "閘道器", "help": "設定部署和重啟方式"},
|
||||
"api": {"title": "API 設定", "help": "設定監聽地址和請求超時"},
|
||||
"storage": {"title": "圖片儲存", "help": "選擇生成圖片的儲存位置"},
|
||||
"maintenance": {"title": "記憶整理", "help": ""},
|
||||
"web": {"title": "網路存取", "help": ""},
|
||||
@@ -1238,15 +1234,6 @@
|
||||
"supabase": "檢視和管理專案"
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"title": "API 伺服器", "openaiCompatible": "OpenAI 相容 API", "description": "透過相容 OpenAI 的 API 連線",
|
||||
"start": "啟動 API 伺服器", "starting": "正在啟動…", "stop": "停止", "stopping": "正在停止…",
|
||||
"access": "存取範圍", "thisDevice": "僅此裝置", "localNetwork": "區域網路",
|
||||
"localHelp": "僅當前裝置可連線", "networkHelp": "區域網可連線,須設定 API 金鑰\n\n區域網內其他裝置可以連線,因此必須設定 API 金鑰。",
|
||||
"port": "連接埠", "portHelp": "API 服務使用的本地埠", "apiKey": "API 金鑰", "apiKeyHelp": "透過 Bearer Token 傳送金鑰",
|
||||
"apiKeyRequired": "向區域網路開放 API 前必須設定金鑰。", "apiKeyPlaceholder": "輸入 API 金鑰",
|
||||
"autoInstall": "啟動時會自動安裝 API 服務所需的套件。"
|
||||
},
|
||||
"observability": {
|
||||
"title": "執行追蹤", "configured": "nanobot 已偵測到追蹤憑證。",
|
||||
"environment": "設定 LANGFUSE_SECRET_KEY 和 LANGFUSE_PUBLIC_KEY 後重新啟動 nanobot。", "enable": "啟用追蹤"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { isContextGraph, isContextInspection } from "@/lib/context-graph";
|
||||
import { isCompactionPhase, isCompactionReason } from "../../../packages/client-events/notifications";
|
||||
import type {
|
||||
ApiServicePayload,
|
||||
AutomationChatsPayload,
|
||||
AutomationChatUpdate,
|
||||
AutomationsPayload,
|
||||
@@ -1011,33 +1010,6 @@ export async function fetchNanobotFeatures(
|
||||
);
|
||||
}
|
||||
|
||||
export async function fetchApiService(token: string, base: string = ""): Promise<ApiServicePayload> {
|
||||
return request<ApiServicePayload>(`${base}/api/settings/api-service`, token);
|
||||
}
|
||||
|
||||
export async function startApiService(
|
||||
transport: WebUIMutationTransport,
|
||||
values: { host: string; port: number; timeout: number; apiKey?: string },
|
||||
): Promise<ApiServicePayload> {
|
||||
return mutation<ApiServicePayload>(
|
||||
transport,
|
||||
"settings.api_service.start",
|
||||
{
|
||||
host: values.host,
|
||||
port: values.port,
|
||||
timeout: values.timeout,
|
||||
...(values.apiKey !== undefined ? { api_key: values.apiKey } : {}),
|
||||
},
|
||||
PACKAGE_MUTATION_TIMEOUT_MS,
|
||||
);
|
||||
}
|
||||
|
||||
export async function stopApiService(
|
||||
transport: WebUIMutationTransport,
|
||||
): Promise<ApiServicePayload> {
|
||||
return mutation<ApiServicePayload>(transport, "settings.api_service.stop");
|
||||
}
|
||||
|
||||
export async function enableNanobotFeature(
|
||||
transport: WebUIMutationTransport,
|
||||
name: string,
|
||||
|
||||
@@ -845,12 +845,6 @@ export interface SettingsPayload {
|
||||
use_jina_reader: boolean;
|
||||
};
|
||||
};
|
||||
api?: {
|
||||
host: string;
|
||||
port: number;
|
||||
timeout: number;
|
||||
api_key_hint?: string | null;
|
||||
};
|
||||
observability?: {
|
||||
provider: "langfuse" | string;
|
||||
configured: boolean;
|
||||
@@ -1048,20 +1042,6 @@ export interface SettingsPayload {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiServicePayload {
|
||||
installed: boolean;
|
||||
running: boolean;
|
||||
managed: boolean;
|
||||
host: string;
|
||||
port: number;
|
||||
timeout: number;
|
||||
api_key_hint?: string | null;
|
||||
endpoint: string;
|
||||
command: string;
|
||||
log_path?: string | null;
|
||||
last_action?: "started" | "stopped" | string;
|
||||
}
|
||||
|
||||
interface AppPackageRef {
|
||||
manager: string;
|
||||
name?: string;
|
||||
|
||||
@@ -17,7 +17,6 @@ import {
|
||||
fetchAutomations,
|
||||
fetchAutomationChats,
|
||||
fetchAutomationRunResult,
|
||||
fetchApiService,
|
||||
fetchCliApps,
|
||||
fetchInstalledCliApps,
|
||||
fetchMcpOAuthStatus,
|
||||
@@ -27,6 +26,7 @@ import {
|
||||
fetchProviderModels,
|
||||
fetchPromptIndex,
|
||||
fetchSessionAutomations,
|
||||
fetchSettings,
|
||||
fetchSettingsUsage,
|
||||
fetchSidebarState,
|
||||
fetchSkillDetail,
|
||||
@@ -50,9 +50,7 @@ import {
|
||||
runMcpPresetAction,
|
||||
saveCustomMcpServer,
|
||||
searchMarketplaceSkills,
|
||||
startApiService,
|
||||
startMcpOAuth,
|
||||
stopApiService,
|
||||
cancelChannelConnect,
|
||||
pollChannelConnect,
|
||||
startChannelConnect,
|
||||
@@ -781,7 +779,7 @@ describe("webui API helpers", () => {
|
||||
}),
|
||||
);
|
||||
|
||||
await expect(fetchApiService("tok")).rejects.toMatchObject({
|
||||
await expect(fetchSettings("tok")).rejects.toMatchObject({
|
||||
status: 200,
|
||||
message: "Gateway returned WebUI HTML instead of JSON. Restart nanobot gateway and try again.",
|
||||
});
|
||||
@@ -1101,41 +1099,6 @@ describe("webui API helpers", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("manages the API service capability", async () => {
|
||||
await fetchApiService("tok");
|
||||
expect(fetch).toHaveBeenCalledWith(
|
||||
"/api/settings/api-service",
|
||||
expect.objectContaining({ headers: { Authorization: "Bearer tok" } }),
|
||||
);
|
||||
|
||||
await startApiService(
|
||||
mutationTransport,
|
||||
{ host: "127.0.0.1", port: 8900, timeout: 120 },
|
||||
);
|
||||
expect(requestMutation).toHaveBeenLastCalledWith(
|
||||
"settings.api_service.start",
|
||||
{ host: "127.0.0.1", port: 8900, timeout: 120 },
|
||||
150_000,
|
||||
);
|
||||
|
||||
await startApiService(
|
||||
mutationTransport,
|
||||
{ host: "0.0.0.0", port: 8900, timeout: 120, apiKey: "secret-token" },
|
||||
);
|
||||
expect(requestMutation).toHaveBeenLastCalledWith(
|
||||
"settings.api_service.start",
|
||||
{ host: "0.0.0.0", port: 8900, timeout: 120, api_key: "secret-token" },
|
||||
150_000,
|
||||
);
|
||||
|
||||
await stopApiService(mutationTransport);
|
||||
expect(requestMutation).toHaveBeenLastCalledWith(
|
||||
"settings.api_service.stop",
|
||||
{},
|
||||
20_000,
|
||||
);
|
||||
});
|
||||
|
||||
it("reads MCP presets and serializes actions", async () => {
|
||||
vi.mocked(fetch).mockResolvedValueOnce({
|
||||
ok: true,
|
||||
|
||||
@@ -496,10 +496,8 @@ function renderMcpActions() {
|
||||
state,
|
||||
featureCatalog: [],
|
||||
client,
|
||||
token: "tok",
|
||||
getToken: () => "tok",
|
||||
t: i18n.t,
|
||||
applyPayload: vi.fn(),
|
||||
maybeRestartHostEngine: vi.fn(),
|
||||
setPendingRestartSections: vi.fn(),
|
||||
refreshAutomations: vi.fn(),
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import { fireEvent, render, screen, waitFor, within } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { RuntimeSettings } from "@/components/settings/system/RuntimeSettings";
|
||||
import { RUNTIME_CONFIG_FIELDS, RUNTIME_CONFIG_GROUPS } from "@/components/settings/system/runtime-config-fields";
|
||||
import runtimeConfigKeys from "../../../tests/webui/fixtures/runtime-config-keys.json";
|
||||
import { TimezonePicker } from "@/components/settings/shared/TimezonePicker";
|
||||
import { DEFAULT_AGENT_SETTINGS_DRAFT } from "@/components/settings/models/ModelsSettings";
|
||||
import type { SettingsPayload } from "@/lib/types";
|
||||
import { installSettingsViewTestHooks, jsonResponse, renderSettingsView, requestMutationMock, settingsPayload } from "@/tests/settings-test-utils";
|
||||
|
||||
@@ -136,24 +134,6 @@ describe("Runtime configuration settings", () => {
|
||||
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", port: 8900, 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,
|
||||
|
||||
@@ -487,51 +487,6 @@ describe("Settings system domains", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("starts the managed API server from System", async () => {
|
||||
const base = settingsPayload();
|
||||
const stopped = {
|
||||
installed: false,
|
||||
running: false,
|
||||
managed: false,
|
||||
host: "127.0.0.1",
|
||||
port: 8900,
|
||||
timeout: 120,
|
||||
api_key_hint: null,
|
||||
endpoint: "http://127.0.0.1:8900/v1",
|
||||
command: "nanobot serve",
|
||||
};
|
||||
const fetchMock = vi.fn(async (input: RequestInfo | URL) => {
|
||||
const url = String(input);
|
||||
if (url === "/api/settings") return jsonResponse(base);
|
||||
if (url === "/api/settings/api-service") return jsonResponse(stopped);
|
||||
if (url === "/api/settings/nanobot-features") {
|
||||
return jsonResponse({ features: [], enabled_count: 0 });
|
||||
}
|
||||
return jsonResponse({});
|
||||
});
|
||||
vi.stubGlobal("fetch", fetchMock);
|
||||
requestMutationMock.mockResolvedValueOnce({
|
||||
...stopped,
|
||||
installed: true,
|
||||
running: true,
|
||||
managed: true,
|
||||
});
|
||||
|
||||
renderSettingsView({ initialSection: "runtime", initialSettings: base, showSidebar: true });
|
||||
|
||||
const startButton = await screen.findByRole("button", { name: "Start API server" });
|
||||
await waitFor(() => expect(startButton).toBeEnabled());
|
||||
fireEvent.click(startButton);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(requestMutationMock).toHaveBeenCalledWith(
|
||||
"settings.api_service.start",
|
||||
{ host: "127.0.0.1", port: 8900, timeout: 120 },
|
||||
150_000,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it("shows a visible uninstall button for installed CLI apps and calls uninstall", async () => {
|
||||
const fetchMock = vi.fn(async (input: RequestInfo | URL) => {
|
||||
const url = String(input);
|
||||
|
||||
@@ -64,12 +64,6 @@ export function settingsPayload(): SettingsPayload {
|
||||
search: { max_results: 5, timeout: 30 },
|
||||
fetch: { use_jina_reader: true },
|
||||
},
|
||||
api: {
|
||||
host: "127.0.0.1",
|
||||
port: 8900,
|
||||
timeout: 120,
|
||||
api_key_hint: null,
|
||||
},
|
||||
observability: {
|
||||
provider: "langfuse",
|
||||
configured: false,
|
||||
|
||||
Reference in new issue
Block a user