Compare commits

...
Author SHA1 Message Date
chengyongru 9b7610709b chore(anthropic): raise SDK floor for native effort fields
Require Anthropic 0.100.0 so adaptive thinking, disabled thinking, and all advertised effort values use typed SDK parameters instead of extra_body compatibility.
2026-08-04 13:32:24 +08:00
chengyongru 356eeeb48c fix(anthropic): honor disabled thinking on Opus 5
Send an explicit disabled thinking mode for default-on Opus and Sonnet 5 models while preserving unset provider defaults and minimum-SDK compatibility.
2026-08-04 13:04:42 +08:00
chengyongru e971f6bb8f fix(anthropic): distinguish sampling restrictions
Reuse adaptive-only version thresholds where the capabilities align, while preserving Mythos Preview's supported manual thinking budgets.
2026-08-04 11:48:35 +08:00
chengyongru 5e0ef36cf2 fix(anthropic): preserve SDK and dated model compatibility 2026-08-04 10:50:26 +08:00
chengyongru 39b2294ecf fix(anthropic): support Opus 5 effort controls 2026-08-04 09:54:09 +08:00
chengyongruandchengyongru 44b7e1bf41 fix(providers): keep serde errors explicit 2026-08-03 18:06:45 +08:00
arcdrake22andchengyongru 6eda67b50c fix(providers): keep reasoning items wire-valid for DeepSeek Responses
convert_messages() emitted reasoning items with ``content`` as a plain
string whenever preserve_reasoning was enabled (the DeepSeek spec).
DeepSeek's Responses gateway rejects that shape with a serde error
("input: invalid type: string ..., expected a sequence"), which surfaced
only after token consolidation cleared provider_state and forced the
full-history conversion path; replayed server items already carry list
content, which is why normal multi-turn requests never failed. Serialize
reasoning content as a list of output_text parts, matching the OpenAI
Responses schema and DeepSeek's accepted wire shape (verified live against
api.deepseek.com/responses).

The serde fallback classifier introduced in the previous commit remains as
a last-resort safeguard for any remaining wire incompatibility.

Tests: extend test_preserves_deepseek_reasoning_content to the array shape;
add a full-history regression with the observed failing item, a
replay/consolidation regression covering both replayed and converted
reasoning items, and provider-level request fixtures for both paths.
Full suite: 5773 passed, 22 skipped (only the known local-only
channels/sms packaging failure remains).
2026-08-03 18:06:45 +08:00
arcdrake22andchengyongru fb2688fd37 fix(providers): fall back to chat completions on serde body rejections
DeepSeek's new Responses endpoint (deepseek-v4-flash) intermittently rejects valid request bodies with serde deserialization errors such as 'input: invalid type: string ..., expected a sequence'. These were not classified as compatibility errors, so affected conversations died instead of falling back to Chat Completions.

The wire format is correct (input serializes as a list), so this is a server-side Responses compatibility issue; Chat Completions is strictly more permissive, making fallback safe. Extend the fallback classifier to recognize serde body-parsing markers. Repeated failures still trip the existing circuit breaker.
2026-08-03 18:06:45 +08:00
chengyongruandchengyongru 2b63715282 fix(webui): complete i18n audit 2026-08-03 17:53:33 +08:00
Xubin Ren df11fd92a6 docs(providers): link ModelScope setup sources 2026-08-03 16:57:10 +08:00
Xubin Ren b29f9dcbcb docs(providers): align ModelScope setup with current config 2026-08-03 16:57:10 +08:00
Krislu1221andXubin Ren 02df20cd55 docs(providers): add ModelScope (魔搭) section
ModelScope is a fully implemented provider (nanobot/providers/registry.py,
image_generation.py, schema.py) with async image-generation task submission
and polling, but was previously undocumented in docs/providers.md.

This patch adds a ModelScope entry under 'Common Provider Patterns',
covering:

- Default base URL: https://api-inference.modelscope.cn/v1
- OpenAI-compatible chat/completions endpoint
- Async image-generation flow (task submit + status poll)
- Automatic 'modelscope/' prefix stripping when calling the API
- A minimal nanobot.yaml example

No code changes; docs-only.
2026-08-03 16:57:10 +08:00
chengyongruandGitHub f11710a578 fix(webui): show actual local trigger messages (#5228) 2026-08-03 16:43:01 +08:00
chengyongruandchengyongru eeecfac538 fix(webui): stabilize thread during IME input 2026-08-03 16:41:08 +08:00
Xubin Ren ac216c3e94 docs(providers): document Eden AI setup and WebUI parity 2026-08-03 16:40:13 +08:00
Xubin Ren e7ec981f79 test(providers): verify Eden AI gateway contract 2026-08-03 16:40:13 +08:00
Victor M. SMITHandXubin Ren f42a44817a feat(providers): add Eden AI as an OpenAI-compatible gateway provider
Eden AI (https://www.edenai.co) is an EU-hosted, OpenAI-compatible gateway exposing 100+ models from many providers through a single endpoint and API key. Models use the provider/model naming scheme (the full id is sent upstream, like OpenRouter).

Adds it following the registry's documented two-step recipe:
- a ProviderSpec in providers/registry.py (backend openai_compat, gateway, default_api_base https://api.edenai.run/v3, EDENAI_API_KEY, reasoning_effort)
- the matching field in ProvidersConfig (config/schema.py)

API key via EDENAI_API_KEY only; never hardcoded.

Signed-off-by: Victor M. SMITH <72023257+MVS-source@users.noreply.github.com>
2026-08-03 16:40:13 +08:00
Xubin Ren 84f98f5e92 test(cron): cover invalid schedule expressions 2026-08-03 16:20:22 +08:00
ferkans-amirandXubin Ren 73a0080484 fix(cron): validate expression syntax in _validate_schedule_for_add 2026-08-03 16:20:22 +08:00
arcdrake22andXubin Ren c6bd5f0075 test(gateway): align runtime-tasks gather tests with bounded retrieval
The helper never waits on the runtime-tasks gather after cancelling it
(its children are bounded individually), so the finished-gather test must
hand the helper an already-complete gather to exercise the bounded
retrieval path, and the cancelled-gather test must settle the gather
itself instead of expecting the helper to await a still-pending future.

Use a pre-completed child for the finished case and suppress(await) for
the cancelled case; both now assert done() and a single close.
2026-08-03 16:00:39 +08:00
Xubin Ren 39e1533c3b fix(gateway): make resource teardown cancellation-safe 2026-08-03 16:00:39 +08:00
arcdrake22andXubin Ren a91ce900ef test(gateway): add shutdown teardown regression coverage
Covers the lifecycle contract of _close_gateway_runtime: runtime tasks are
cancelled before shared resources close, pending background work is drained
before the close returns, cancellation-swallowing tasks and hanging cleanup
are bounded by their timeouts, a failing close is logged without blocking the
stop, duplicate cleanup is idempotent, and the runtime_tasks gather await path
is exercised for both completed and cancelled gathers.
2026-08-03 16:00:39 +08:00
arcdrake22andXubin Ren 8942c22d86 fix(gateway): close agent resources deterministically on shutdown
The gateway shutdown path never closed agent resources explicitly: it relied
on the agent loop task's own finally to run close_mcp() when that task is
cancelled. When the service stops with an in-flight exec session or MCP
subprocess, that path can be skipped or cut short, leaving asyncio subprocess
transports alive after the event loop closes. They are then finalized by
__del__ against a closed loop, producing "RuntimeError: Event loop is closed"
noise in the shutdown log, and in the worst case orphaned subprocesses with
the stop stalling until systemd's timeout kills the cgroup.

The teardown is now extracted into _close_gateway_runtime() with explicit
ordering and bounds:

- Runtime tasks (including the agent loop and any in-flight turn) are
  cancelled and awaited -- bounded -- before exec sessions, subagents, and MCP
  servers are closed, so no active turn is using a shared resource when it
  closes.
- Channel transports are closed before waiting for their runners to exit, since
  some SDKs swallow task cancellation while attempting to reconnect.
- agent.close_mcp() is invoked explicitly, bounded to 15s, and is idempotent:
  it is a no-op when the agent loop's own cleanup already ran, and the
  guaranteed final close otherwise.
- A coroutine that swallows cancellation (e.g. an SDK reconnect loop) can no
  longer hold the stop open until systemd's timeout kills the cgroup; cleanup
  failures are logged instead of blocking shutdown.
2026-08-03 16:00:39 +08:00
chengyongruandchengyongru a9bb39b833 fix(webui): dismiss mobile keyboard after send 2026-08-03 15:53:05 +08:00
KDBandXubin Ren 52bc79d3a0 fix(plugins): use uv when pip is unavailable 2026-08-03 15:42:26 +08:00
chengyongruandchengyongru 5c72fdcd88 fix(webui): remove unused bot identity settings 2026-08-03 14:06:44 +08:00
f7a6bc2d21 fix(webui): globally register correct MIME types for static assets (#5190)
On Windows, mimetypes.guess_type() reads the Content Type value from
HKEY_CLASSES_ROOT\.js (and other extensions) in the registry, which is
commonly set to text/plain because .js is associated with Windows Script
Host rather than web JavaScript. The registry value overrides Python's
built-in mapping and causes browsers to reject ES module scripts.

Fix by explicitly registering correct MIME types via mimetypes.add_type()
at module import time for common web static extensions (.js, .mjs, .css,
.html, .json, .svg, .wasm). Using strict=True ensures the values replace
the registry-backed standard mappings used by mimetypes.guess_type(). This
benefits all callers of mimetypes.guess_type() in the gateway process, not
just _serve_static.

Closes #5190

Co-authored-by: amkile <44280409+amkile@users.noreply.github.com>
2026-08-03 11:33:02 +08:00
arcdrake22andchengyongru 08fe9f7b3a fix(image): send Gemini Flash hints via generationConfig.imageConfig
The live v1beta API rejects the legacy responseFormat.image block
(enum-based aspectRatio/imageSize fields) for gemini-3.1-flash-lite-image
with INVALID_ARGUMENT, even for documented plain-string values. Gemini
Flash image models accept plain-string hints under
generationConfig.imageConfig instead (e.g. aspectRatio 16:9, imageSize
1K), which the API accepts. Switch the flash path to imageConfig and
update the provider tests accordingly. Other providers (aihubmix,
ollama, imagen) are untouched.
2026-08-03 11:22:09 +08:00
chengyongruandchengyongru 8fde956c64 fix(webui): show timestamps for replayed messages 2026-08-03 10:41:50 +08:00
chengyongruandGitHub 580824a15a perf(webui): accelerate JSONL session list and thread loading (#5194) 2026-08-03 09:51:35 +08:00
Xubin Ren db6c9effc3 fix(webui): position sidebar highlight on mount 2026-08-01 23:01:43 +08:00
Xubin Ren 0cb7dd5cc9 refactor(webui): reuse sidebar selection highlight 2026-08-01 23:01:43 +08:00
Xubin Ren e1894d6f0b fix(providers): respect explicit cloud namespaces 2026-08-01 20:25:58 +08:00
5eb818e800 fix(providers): require api_base before local provider wins on keyword match
Ollama's spec keeps "nemotron" as a keyword so bare `nemotron-3-nano`
auto-routes to a configured Ollama install (PR #1863). NVIDIA NIM was
later registered with the same "nemotron" keyword (commit 046d0831),
creating the only keyword collision in the registry.

In `_match_provider`, the keyword loop accepted any local provider on
`spec.is_local` alone — no api_base check. Models like
`nvidia/nemotron-3-super-120b-a12b` (intended for OpenRouter or NVIDIA
NIM) were therefore hijacked to http://localhost:11434/v1 even when the
user had never configured Ollama, causing silent connection errors at
runtime.

Add the same api_base gate the local-fallback loop already uses: a local
provider only wins by keyword when the user has actually set its
api_base. Preserves PR #1863's intent for users who configured Ollama;
fixes the silent hijack for everyone else.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-08-01 20:25:58 +08:00
santhrealandXubin Ren 4c387f6633 fix(memory): handle non-string timestamp and missing role in raw_archive 2026-08-01 20:14:28 +08:00
Xubin Ren e152e7bc0b test(cron): cover stop during manual execution 2026-08-01 20:03:19 +08:00
yu-xin-candXubin Ren e26e09c205 fix(cron): preserve manual run completion state 2026-08-01 20:03:19 +08:00
KDBandXubin Ren f3bbb543d0 refactor(cli): narrow Pyright suppressions 2026-08-01 19:52:08 +08:00
KDBandXubin Ren b1030ab131 fix(exec): preserve wait targets across response truncation 2026-08-01 19:40:36 +08:00
KDBandXubin Ren 39bb20c76b fix(session): tolerate malformed persisted session summary
AutoCompact.prepare_session runs on the turn hot path
(AgentLoop._compact_session) and read the persisted _last_summary metadata
with an unguarded meta['text'] and datetime.fromisoformat(meta['last_active']).
A _last_summary dict that was hand-edited or written by another version
(missing text/last_active, or a non-ISO last_active) raised KeyError/ValueError
out of the turn.

Sibling readers already tolerate the same data: estimate_session_prompt_tokens
uses .get('text') and _archive parses inside try/except. Mirror that tolerance:
skip when text is unusable, and fall back to the session's own updated_at (the
value the writer persists) when last_active is missing or unparseable, so the
archived summary is preserved instead of crashing the turn.
2026-08-01 19:29:16 +08:00
chengyongruandGitHub cdb75f8e7d feat(providers): support DeepSeek Responses API (#5197) 2026-08-01 11:53:51 +08:00
chengyongruandGitHub 971b977a84 fix(weixin): recover refreshed state after session expiry (#5196) 2026-08-01 00:28:21 +08:00
54650332fb fix(slack): scope channel thread openers to their own session
A top-level channel message that opens a thread fell back to the
channel-wide session, because the session key required `raw_thread_ts` —
which Slack only sets on messages that already arrived inside a thread.
Every new thread therefore began life in one shared channel session and
only became thread-scoped from its first reply onward, so unrelated
threads saw each other's opening turns.

Key off `thread_ts` instead. It is set both for messages arriving inside
a thread and for channel messages that `reply_in_thread` opens a thread
for. DM roots never get a `thread_ts`, so they keep the default per-chat
session and the DM routing from 82c5083 is preserved; with
`reply_in_thread` disabled no thread exists and the channel session is
still used.

This restores the per-thread isolation introduced in #1048.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 23:47:26 +08:00
chengyongruandGitHub 172fe4f991 fix(webui): preserve user scroll ownership near tail (#5193) 2026-07-31 23:37:26 +08:00
shixi-liandchengyongru dda9b61b1e fix(config): install timezone data on all platforms 2026-07-31 19:55:22 +08:00
100 changed files with 5051 additions and 1558 deletions
+2 -2
View File
@@ -268,6 +268,7 @@ Tracing covers the providers that go through nanobot's OpenAI-compatible client
|----------|---------|-------------|
| `custom` | Any OpenAI-compatible endpoint | — |
| `openrouter` | LLM gateway for hosted model families + Voice transcription (STT models) | [openrouter.ai](https://openrouter.ai) |
| `edenai` | LLM gateway for Eden AI's OpenAI-compatible model catalog | [app.edenai.run](https://app.edenai.run/) |
| `opencode` | LLM gateway (OpenCode Zen coding-agent models) | [opencode.ai/docs/zen](https://opencode.ai/docs/zen/) |
| `opencode_zen` | LLM gateway (legacy alias for OpenCode Zen) | [opencode.ai/docs/zen](https://opencode.ai/docs/zen/) |
| `opencode_go` | LLM gateway (OpenCode Go low-cost coding models) | [opencode.ai/docs/go](https://opencode.ai/docs/go/) |
@@ -356,8 +357,7 @@ Providers that use the Responses API can keep reasoning context across a
conversation, which helps with multi-step tasks. Supported providers can also
compact long conversations automatically.
nanobot preserves Responses conversation state automatically for OpenAI
Responses, OpenAI Codex, Azure OpenAI, and compatible GitHub Copilot models.
nanobot preserves Responses conversation state automatically for OpenAI Responses, OpenAI Codex, Azure OpenAI, DeepSeek V4 Flash, and compatible GitHub Copilot models.
Native compaction is also automatic when the provider supports it. The
threshold is derived from the active model's context window and reserved output
headroom; no provider configuration is required.
+82
View File
@@ -100,6 +100,39 @@ Gateway-style setup for model IDs served through OpenRouter.
Use the model ID exactly as OpenRouter lists it.
### Eden AI Gateway
Eden AI exposes an OpenAI-compatible chat-completions endpoint at
`https://api.edenai.run/v3`. Configure the built-in `edenai` provider and use
the full `provider/model` identifier listed by Eden AI:
```json
{
"providers": {
"edenai": {
"apiKey": "${EDENAI_API_KEY}"
}
},
"modelPresets": {
"primary": {
"provider": "edenai",
"model": "anthropic/claude-sonnet-4-5",
"maxTokens": 8192
}
},
"agents": {
"defaults": {
"modelPreset": "primary"
}
}
}
```
Nanobot sends the model ID unchanged, including its provider prefix. Use
Eden AI's [model listing](https://www.edenai.co/docs/v3/llms/listing-models)
to choose a currently available model. The WebUI can also load that catalog
after the Eden AI API key is saved under **Settings → Models**.
### OpenCode Zen and Go
OpenCode Zen and OpenCode Go are OpenCode-managed gateways for coding-agent models.
@@ -231,6 +264,8 @@ Arbitrary custom provider names are OpenAI-compatible only; they do not use the
`providers.openai.apiType` may be set when you need to force a specific OpenAI API surface. Other providers reject `apiType`; leave it unset outside `providers.openai`. Replace the model with a model ID available to your OpenAI account. Direct OpenAI Responses, OpenAI Codex, Azure OpenAI Responses, and eligible GitHub Copilot models share [opaque Responses state retention](./configuration.md#responses-state-and-compaction); native compaction is enabled only where the backend supports it.
DeepSeek is the model-level exception in the OpenAI-compatible provider: `deepseek-v4-flash` automatically uses DeepSeek's native Responses API, while `deepseek-v4-pro` remains on Chat Completions.
### Custom OpenAI-Compatible Endpoint
The `custom` provider fits one OpenAI-compatible endpoint that is not represented by a named provider.
@@ -302,6 +337,53 @@ If your custom endpoint documents a nonstandard thinking toggle, set `providers.
This named custom provider path is not for Anthropic-compatible endpoints. For Anthropic-compatible proxies, use `providers.anthropic.apiBase` and set the preset provider to `anthropic`.
### ModelScope
ModelScope (魔搭社区) exposes an OpenAI-compatible LLM endpoint plus a separate async image generation API. Both are covered by the built-in `modelscope` provider.
Create a ModelScope [access token](https://modelscope.cn/my/myaccesstoken), then choose a model whose page exposes API-Inference. The example below uses [`Qwen/Qwen3-32B`](https://modelscope.cn/models/Qwen/Qwen3-32B); hosted availability and quotas are controlled by ModelScope. See the official [API-Inference guide](https://modelscope.cn/docs/model-service/API-Inference/intro) for current service details.
```json
{
"providers": {
"modelscope": {
"apiKey": "${MODELSCOPE_API_KEY}"
}
},
"modelPresets": {
"primary": {
"provider": "modelscope",
"model": "Qwen/Qwen3-32B",
"maxTokens": 8192,
"contextWindowTokens": 65536
}
},
"agents": {
"defaults": {
"modelPreset": "primary"
}
}
}
```
Use an inference-enabled model ID exactly as ModelScope publishes it (usually `Namespace/model-name`). The default base URL is `https://api-inference.modelscope.cn/v1`; override `providers.modelscope.apiBase` only if your account routes through a different host. Chat model IDs may optionally be prefixed with `modelscope/`; nanobot strips that routing prefix before sending the request.
ModelScope image generation reuses the same provider key but is configured under `tools.imageGeneration`, not in a model preset:
```json
{
"tools": {
"imageGeneration": {
"enabled": true,
"provider": "modelscope",
"model": "Qwen/Qwen-Image-2512"
}
}
}
```
Use the image model's exact ModelScope ID without a leading `modelscope/`; the image client sends this value unchanged and handles ModelScope's async submit/poll flow. The example uses [`Qwen/Qwen-Image-2512`](https://modelscope.cn/models/Qwen/Qwen-Image-2512). See [Image Generation](./image-generation.md#modelscope) for supported sizes, aspect ratios, and the complete provider configuration.
### Ollama
Start Ollama separately, then point nanobot at the OpenAI-compatible endpoint.
+14 -3
View File
@@ -134,10 +134,21 @@ class AutoCompact:
if entry:
return session, self._format_summary(entry[0], entry[1])
# Cold path: summary persisted in session metadata (process restarted).
# Persisted metadata may outlive schema changes; a malformed summary must
# not abort turn preparation.
meta = session.metadata.get("_last_summary")
if isinstance(meta, dict):
return session, self._format_summary(
cast(str, meta["text"]),
datetime.fromisoformat(cast(str, meta["last_active"])),
summary_meta = cast(dict[str, object], meta)
text = summary_meta.get("text")
if isinstance(text, str) and text:
raw_last_active = summary_meta.get("last_active")
try:
last_active = (
datetime.fromisoformat(raw_last_active)
if isinstance(raw_last_active, str)
else session.updated_at
)
except ValueError:
last_active = session.updated_at
return session, self._format_summary(text, last_active)
return session, None
+34 -2
View File
@@ -399,6 +399,7 @@ class AgentLoop:
self._runtime_context_providers: list[RuntimeContextProvider] = []
self._active_tasks: dict[str, set[asyncio.Task[Any]]] = {}
self._background_tasks: set[asyncio.Task[Any]] = set()
self._close_mcp_lock = asyncio.Lock()
self._session_locks: weakref.WeakValueDictionary[str, asyncio.Lock] = (
weakref.WeakValueDictionary()
)
@@ -1338,11 +1339,42 @@ class AgentLoop:
await self._publish_next_deferred_automation_turn(session_key)
async def close_mcp(self) -> None:
"""Drain background work, stop exec sessions, then close MCP connections."""
"""Stop active work, then close exec, subagent, and MCP resources.
Resource teardown must still run if cancellation interrupts task draining.
Gateway shutdown deliberately bounds this coroutine, so keeping the cleanup
phase in ``finally`` prevents a timed-out background task from leaving
subprocess transports alive after the event loop closes.
"""
# The agent loop closes itself from ``run()`` while gateway shutdown also
# performs a guaranteed final close. Serialize those owners so they cannot
# tear down the same subprocess transports concurrently.
close_lock = getattr(self, "_close_mcp_lock", None)
if close_lock is None:
close_lock = self._close_mcp_lock = asyncio.Lock()
async with close_lock:
await self._close_mcp_unlocked()
async def _close_mcp_unlocked(self) -> None:
errors: list[BaseException] = []
active_task_groups = getattr(self, "_active_tasks", {})
active_tasks = tuple({task for tasks in active_task_groups.values() for task in tasks})
active_task_groups.clear()
current_task = asyncio.current_task()
active_tasks = tuple(task for task in active_tasks if task is not current_task)
for task in active_tasks:
if not task.done():
task.cancel()
try:
if active_tasks:
await asyncio.gather(*active_tasks, return_exceptions=True)
if self._background_tasks:
await asyncio.gather(*self._background_tasks, return_exceptions=True)
except BaseException as exc:
errors.append(exc)
finally:
self._background_tasks.clear()
errors: list[BaseException] = []
cleanup_steps = (
self.subagents.close,
self._exec_session_manager.close_all,
+4 -5
View File
@@ -713,11 +713,10 @@ class MemoryStore:
if tools_used
else ""
)
timestamp = cast(str, message.get("timestamp", "?"))
role = cast(str, message["role"])
lines.append(
f"[{timestamp[:16]}] {role.upper()}{tools}: {content}"
)
raw_timestamp = message.get("timestamp")
timestamp = str(raw_timestamp) if raw_timestamp is not None else "?"
role = str(message.get("role") or "unknown")
lines.append(f"[{timestamp[:16]}] {role.upper()}{tools}: {content}")
return "\n".join(lines)
def raw_archive(
+1 -1
View File
@@ -660,7 +660,7 @@ class WriteStdinTool(Tool):
close_stdin=close_stdin if first else False,
terminate=terminate if first else False,
yield_time_ms=step_ms,
max_output_chars=max_output_chars,
max_output_chars=MAX_OUTPUT_CHARS,
owner_session_key=current_request_session_key(),
)
first = False
+5 -6
View File
@@ -493,12 +493,11 @@ class SlackChannel(BaseChannel):
except Exception as e:
self.logger.debug("reactions_add failed: {}", e)
# Thread-scoped session key whenever the user is in a real thread
# (raw_thread_ts is set). DM threads get their own session, separate
# from the DM root, so context doesn't bleed across thread boundaries.
session_key = (
f"slack:{chat_id}:{thread_ts}" if thread_ts and raw_thread_ts else None
)
# Thread-scoped session key whenever the turn lives in a thread: either the
# message arrived inside one (raw_thread_ts) or reply_in_thread opens a new
# thread for this channel message. DM roots have no thread_ts and keep the
# default per-chat session, so context doesn't bleed across thread boundaries.
session_key = f"slack:{chat_id}:{thread_ts}" if thread_ts else None
media_paths: list[str] = []
file_markers: list[str] = []
for file_info in _as_json_list(event.get("files")) or []:
@@ -555,6 +555,113 @@ async def test_dm_thread_message_keeps_thread_ts_and_threaded_session() -> None:
assert kwargs["metadata"]["slack"]["thread_ts"] == "1700000000.000100"
def _channel_mention_request(envelope_id: str, ts: str) -> SimpleNamespace:
return SimpleNamespace(
type="events_api",
envelope_id=envelope_id,
payload={
"event": {
"type": "app_mention",
"user": "U1",
"channel": "C123",
"text": "<@UBOT> hello",
"ts": ts,
}
},
)
@pytest.mark.asyncio
async def test_channel_root_message_uses_thread_scoped_session() -> None:
"""A channel mention that opens a thread belongs to that thread's session."""
channel = SlackChannel(SlackConfig(enabled=True), MessageBus())
channel._bot_user_id = "UBOT"
channel._web_client = _FakeAsyncWebClient()
channel._handle_message = AsyncMock() # type: ignore[method-assign]
client = SimpleNamespace(send_socket_mode_response=AsyncMock())
req = _channel_mention_request("env-c1", "1700000000.000100")
await channel._on_socket_request(client, req)
channel._handle_message.assert_awaited_once()
kwargs = channel._handle_message.await_args.kwargs
assert kwargs["session_key"] == "slack:C123:1700000000.000100"
assert kwargs["metadata"]["slack"]["thread_ts"] == "1700000000.000100"
@pytest.mark.asyncio
async def test_channel_root_messages_do_not_share_one_session() -> None:
"""Two threads opened in the same channel must not collapse into one session."""
channel = SlackChannel(SlackConfig(enabled=True), MessageBus())
channel._bot_user_id = "UBOT"
channel._web_client = _FakeAsyncWebClient()
channel._handle_message = AsyncMock() # type: ignore[method-assign]
client = SimpleNamespace(send_socket_mode_response=AsyncMock())
first = _channel_mention_request("env-c1", "1700000000.000100")
second = _channel_mention_request("env-c2", "1700000000.000200")
await channel._on_socket_request(client, first)
await channel._on_socket_request(client, second)
session_keys = [call.kwargs["session_key"] for call in channel._handle_message.await_args_list]
assert session_keys == [
"slack:C123:1700000000.000100",
"slack:C123:1700000000.000200",
]
@pytest.mark.asyncio
async def test_channel_root_message_without_reply_in_thread_uses_channel_session() -> None:
"""With reply_in_thread disabled no thread is opened, so the channel session is used."""
channel = SlackChannel(SlackConfig(enabled=True, reply_in_thread=False), MessageBus())
channel._bot_user_id = "UBOT"
channel._web_client = _FakeAsyncWebClient()
channel._handle_message = AsyncMock() # type: ignore[method-assign]
client = SimpleNamespace(send_socket_mode_response=AsyncMock())
req = _channel_mention_request("env-c3", "1700000000.000300")
await channel._on_socket_request(client, req)
channel._handle_message.assert_awaited_once()
kwargs = channel._handle_message.await_args.kwargs
assert kwargs["session_key"] is None
assert kwargs["metadata"]["slack"]["thread_ts"] is None
@pytest.mark.asyncio
async def test_channel_thread_reply_keeps_thread_session() -> None:
"""A reply inside a channel thread stays in the session opened by the root message."""
channel = SlackChannel(SlackConfig(enabled=True), MessageBus())
channel._bot_user_id = "UBOT"
channel._web_client = _FakeAsyncWebClient()
channel._handle_message = AsyncMock() # type: ignore[method-assign]
channel._with_thread_context = AsyncMock(return_value="hello") # type: ignore[method-assign]
client = SimpleNamespace(send_socket_mode_response=AsyncMock())
req = SimpleNamespace(
type="events_api",
envelope_id="env-c4",
payload={
"event": {
"type": "app_mention",
"user": "U1",
"channel": "C123",
"text": "<@UBOT> follow up",
"ts": "1700000000.000400",
"thread_ts": "1700000000.000100",
}
},
)
await channel._on_socket_request(client, req)
channel._handle_message.assert_awaited_once()
kwargs = channel._handle_message.await_args.kwargs
assert kwargs["session_key"] == "slack:C123:1700000000.000100"
@pytest.mark.asyncio
async def test_slack_slash_command_skips_thread_context() -> None:
channel = SlackChannel(SlackConfig(enabled=True, allow_from=[]), MessageBus())
@@ -2583,6 +2583,8 @@ async def test_settings_api_returns_safe_subset_and_updates_whitelist(
assert body["agent"]["model_preset"] == "default"
assert body["agent"]["max_tokens"] == 8192
assert body["agent"]["timezone"] == "UTC"
assert "bot_name" not in body["agent"]
assert "bot_icon" not in body["agent"]
assert body["agent"]["tool_hint_max_length"] == 40
presets = {preset["name"]: preset for preset in body["model_presets"]}
assert presets["default"]["active"] is True
@@ -2874,8 +2876,8 @@ async def test_settings_api_returns_safe_subset_and_updates_whitelist(
assert saved.model_presets["fast-writing"].model == "openai/gpt-5.5"
assert saved.model_presets["fast-writing"].provider == "openai"
assert saved.agents.defaults.timezone == "Asia/Shanghai"
assert saved.agents.defaults.bot_name == "Nano"
assert saved.agents.defaults.bot_icon == "N"
assert saved.agents.defaults.bot_name == "nanobot"
assert saved.agents.defaults.bot_icon == "🐈"
assert saved.agents.defaults.tool_hint_max_length == 120
assert saved.providers.openrouter.api_key == "sk-or-next"
assert saved.providers.openrouter.api_base == "https://openrouter.ai/api/v1"
@@ -24,6 +24,7 @@ from nanobot.runtime_context import (
RuntimeContextBlock,
append_runtime_context,
)
from nanobot.security.workspace_access import WORKSPACE_SCOPE_METADATA_KEY
from nanobot.session.keys import UNIFIED_SESSION_KEY
from nanobot.session.manager import Session, SessionManager
from nanobot.triggers.local_store import LocalTriggerStore
@@ -427,6 +428,7 @@ async def test_session_automations_route_lists_local_triggers(
chat_id="abc",
session_key="websocket:abc",
)
trigger_store.enqueue(trigger.id, "Review PR #4591")
channel = _ch(
bus,
session_manager=_seed_session(tmp_path, key="websocket:abc"),
@@ -453,6 +455,7 @@ async def test_session_automations_route_lists_local_triggers(
assert job["kind"] == "local_trigger"
assert job["schedule"]["kind"] == "local"
assert job["payload"]["kind"] == "local_trigger"
assert job["payload"]["message"] == "Review PR #4591"
assert job["payload"]["command"] == f'nanobot trigger {trigger.id} "message"'
assert job["state"]["pending"] is True
finally:
@@ -2201,7 +2204,7 @@ async def test_mcp_presets_routes_require_token_and_return_payload(
@pytest.mark.asyncio
async def test_sessions_list_only_returns_websocket_sessions_by_default(
bus: MagicMock, tmp_path: Path
bus: MagicMock, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
) -> None:
# Seed a realistic multi-channel disk state: CLI, Slack, Lark and
# websocket sessions all live in the same ``sessions/`` directory.
@@ -2215,7 +2218,20 @@ async def test_sessions_list_only_returns_websocket_sessions_by_default(
"websocket:beta",
],
)
channel = _ch(bus, session_manager=sm, port=29906)
project = tmp_path / "project"
project.mkdir()
scoped = sm.get_or_create("websocket:beta")
scoped.metadata[WORKSPACE_SCOPE_METADATA_KEY] = {
"project_path": str(project),
"access_mode": "restricted",
}
sm.save(scoped)
def fail_metadata_read(_key: str) -> None:
raise AssertionError("the session list must use its own index metadata")
monkeypatch.setattr(sm, "read_session_metadata", fail_metadata_read)
channel = _ch(bus, session_manager=sm, workspace_path=tmp_path, port=29906)
server_task = asyncio.create_task(channel.start())
try:
token = channel.gateway.tokens.issue_api_token(300)
@@ -2225,10 +2241,17 @@ async def test_sessions_list_only_returns_websocket_sessions_by_default(
"http://127.0.0.1:29906/api/sessions", headers=auth
)
assert listing.status_code == 200
keys = {s["key"] for s in listing.json()["sessions"]}
sessions = listing.json()["sessions"]
keys = {s["key"] for s in sessions}
# Only websocket-channel sessions are part of the webui surface; CLI /
# Slack / Lark rows would be non-resumable from the browser.
assert keys == {"websocket:alpha", "websocket:beta"}
rows = {row["key"]: row for row in sessions}
assert rows["websocket:beta"]["workspace_scope"]["project_path"] == str(
project.resolve()
)
assert rows["websocket:beta"]["workspace_scope"]["access_mode"] == "restricted"
assert all(not any(key.startswith("_") for key in row) for row in sessions)
finally:
await channel.stop()
await server_task
@@ -2594,6 +2617,7 @@ async def test_webui_automations_route_manages_local_triggers(
by_id = {job["id"]: job for job in listed.json()["jobs"]}
assert by_id[trigger.id]["kind"] == "local_trigger"
assert by_id[trigger.id]["state"]["pending"] is True
assert by_id[trigger.id]["payload"]["message"] == "Review queued PR"
assert by_id[trigger.id]["trigger"]["command"] == f'nanobot trigger {trigger.id} "message"'
disabled = await _http_get(
@@ -2956,6 +2980,139 @@ async def test_webui_thread_resigns_assistant_media_urls(
await server_task
@pytest.mark.asyncio
async def test_sessions_list_negotiates_gzip_across_repeated_headers(
bus: MagicMock, tmp_path: Path
) -> None:
sm = _seed_many(tmp_path, [f"websocket:gzip-{index:03d}" for index in range(80)])
port = _free_port()
channel = _ch(bus, session_manager=sm, workspace_path=tmp_path, port=port)
server_task = asyncio.create_task(channel.start())
try:
token = channel.gateway.tokens.issue_api_token(300)
response = await _http_get(
f"http://127.0.0.1:{port}/api/sessions",
headers=[
("Authorization", f"Bearer {token}"),
("Accept-Encoding", "identity;q=0"),
("Accept-Encoding", "gzip"),
],
)
assert response.status_code == 200
assert response.headers["Content-Encoding"] == "gzip"
assert response.headers["Vary"] == "Accept-Encoding"
assert len(response.json()["sessions"]) == 80
finally:
await channel.stop()
await server_task
@pytest.mark.asyncio
async def test_webui_thread_complete_transcript_skips_session_history_read(
bus: MagicMock, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
) -> None:
from nanobot.webui.transcript import append_transcript_object
monkeypatch.setattr("nanobot.config.paths.get_data_dir", lambda: tmp_path)
key = "websocket:fast-thread"
sm = _seed_session(tmp_path, key=key)
for event in (
{"event": "user", "chat_id": "fast-thread", "text": "hi"},
{"event": "message", "chat_id": "fast-thread", "text": "hello back"},
{"event": "turn_end", "chat_id": "fast-thread"},
):
append_transcript_object(key, event)
read_session_file = MagicMock(
side_effect=AssertionError("complete transcripts must not read canonical history")
)
monkeypatch.setattr(sm, "read_session_file", read_session_file)
port = _free_port()
channel = _ch(
bus,
session_manager=sm,
workspace_path=tmp_path,
port=port,
)
server_task = asyncio.create_task(channel.start())
try:
token = channel.gateway.tokens.issue_api_token(300)
response = await _http_get(
f"http://127.0.0.1:{port}/api/sessions/"
"websocket%3Afast-thread/webui-thread?limit=160&direction=latest",
headers={"Authorization": f"Bearer {token}"},
)
assert response.status_code == 200
assert [message["content"] for message in response.json()["messages"]] == [
"hi",
"hello back",
]
read_session_file.assert_not_called()
finally:
await channel.stop()
await server_task
@pytest.mark.asyncio
async def test_webui_thread_negotiates_gzip_for_large_payloads(
bus: MagicMock, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
) -> None:
from nanobot.webui.transcript import append_transcript_object
monkeypatch.setattr("nanobot.config.paths.get_data_dir", lambda: tmp_path)
sm = SessionManager(tmp_path)
append_transcript_object(
"websocket:gzip-thread",
{
"event": "user",
"chat_id": "gzip-thread",
"text": "compress me " * 1_000,
},
)
port = _free_port()
channel = _ch(bus, session_manager=sm, workspace_path=tmp_path, port=port)
server_task = asyncio.create_task(channel.start())
try:
token = channel.gateway.tokens.issue_api_token(300)
url = (
f"http://127.0.0.1:{port}/api/sessions/"
"websocket%3Agzip-thread/webui-thread?limit=80&direction=latest"
)
compressed = await _http_get(
url,
headers={
"Authorization": f"Bearer {token}",
"Accept-Encoding": "br, gzip",
},
)
assert compressed.status_code == 200
assert compressed.headers["Content-Encoding"] == "gzip"
assert compressed.headers["Vary"] == "Accept-Encoding"
assert int(compressed.headers["Content-Length"]) < len(compressed.content)
assert compressed.json()["messages"][0]["content"].startswith("compress me")
identity = await _http_get(
url,
headers={
"Authorization": f"Bearer {token}",
"Accept-Encoding": "gzip;q=0, br",
},
)
assert identity.status_code == 200
assert "Content-Encoding" not in identity.headers
assert identity.json() == compressed.json()
unauthorized = await _http_get(url, headers={"Accept-Encoding": "gzip"})
assert unauthorized.status_code == 401
assert "Content-Encoding" not in unauthorized.headers
finally:
await channel.stop()
await server_task
@pytest.mark.asyncio
async def test_session_routes_reject_non_websocket_keys(
bus: MagicMock, tmp_path: Path
@@ -248,7 +248,7 @@ class WsTestClient:
async def http_get(
url: str,
headers: dict[str, str] | None = None,
headers: dict[str, str] | list[tuple[str, str]] | None = None,
) -> httpx.Response:
"""GET a local test server without loading an unused TLS trust store."""
request = httpx.Request("GET", url, headers=headers or {})
+25 -2
View File
@@ -230,9 +230,30 @@ class WeixinChannel(BaseChannel):
self.logger.error("Failed to load Weixin account state", exc_info=True)
return False
def _save_state(self) -> None:
def _save_state(self, *, force: bool = False) -> None:
state_file = self._get_state_dir() / "account.json"
with suppress(Exception):
if not force and state_file.exists():
persisted: object = None
try:
persisted = json.loads(state_file.read_text())
except Exception:
persisted = None
persisted_token = ""
if isinstance(persisted, dict):
persisted_mapping = cast(dict[str, object], persisted)
persisted_token = str(persisted_mapping.get("token", "") or "")
configured_token_is_authoritative: bool = bool(self.config.token) and (
self._token == self.config.token
)
if (
persisted_token
and persisted_token != self._token
and not configured_token_is_authoritative
):
# A concurrent QR login may have committed a newer token.
# Never let an older runtime snapshot overwrite it.
return
data = {
"token": self._token,
"get_updates_buf": self._get_updates_buf,
@@ -489,7 +510,7 @@ class WeixinChannel(BaseChannel):
self._token = token
if base_url:
self.config.base_url = base_url
self._save_state()
self._save_state(force=True)
async def connect_close_client(self) -> None:
self._running = False
@@ -613,6 +634,8 @@ class WeixinChannel(BaseChannel):
remaining = self._session_pause_remaining_s()
if remaining > 0:
await asyncio.sleep(remaining)
if not self.config.token:
self._load_state()
return
body: dict[str, Any] = {
@@ -98,6 +98,80 @@ def test_save_and_load_state_persists_context_tokens(tmp_path) -> None:
assert restored._context_tokens == {"wx-user": "ctx-1"}
def test_save_state_preserves_token_committed_by_another_instance(tmp_path) -> None:
channel = WeixinChannel(
WeixinConfig(enabled=True, allow_from=["*"], state_dir=str(tmp_path)),
MessageBus(),
)
channel._token = "old-token"
channel._save_state()
replacement = {
"token": "new-token",
"base_url": "https://new.example",
"get_updates_buf": "",
"context_tokens": {},
"typing_tickets": {},
}
(tmp_path / "account.json").write_text(json.dumps(replacement), encoding="utf-8")
channel._get_updates_buf = "stale-cursor"
channel._save_state()
assert json.loads((tmp_path / "account.json").read_text()) == replacement
def test_save_state_force_overwrites_replaced_token(tmp_path) -> None:
channel = WeixinChannel(
WeixinConfig(enabled=True, allow_from=["*"], state_dir=str(tmp_path)),
MessageBus(),
)
(tmp_path / "account.json").write_text(json.dumps({"token": "old-token"}), encoding="utf-8")
channel.connect_commit_account(token="new-token", base_url="https://new.example")
saved = json.loads((tmp_path / "account.json").read_text())
assert saved["token"] == "new-token"
assert saved["base_url"] == "https://new.example"
def test_save_state_persists_explicit_config_token_over_stale_state(tmp_path) -> None:
channel = WeixinChannel(
WeixinConfig(
enabled=True,
allow_from=["*"],
token="configured-token",
state_dir=str(tmp_path),
),
MessageBus(),
)
channel._token = "configured-token"
channel._get_updates_buf = "current-cursor"
(tmp_path / "account.json").write_text(
json.dumps({"token": "stale-token", "get_updates_buf": "stale-cursor"}),
encoding="utf-8",
)
channel._save_state()
saved = json.loads((tmp_path / "account.json").read_text())
assert saved["token"] == "configured-token"
assert saved["get_updates_buf"] == "current-cursor"
def test_save_state_with_empty_runtime_token_preserves_persisted_account(tmp_path) -> None:
channel = WeixinChannel(
WeixinConfig(enabled=True, allow_from=["*"], state_dir=str(tmp_path)),
MessageBus(),
)
persisted = {"token": "persisted-token", "get_updates_buf": "persisted-cursor"}
(tmp_path / "account.json").write_text(json.dumps(persisted), encoding="utf-8")
channel._save_state()
assert json.loads((tmp_path / "account.json").read_text()) == persisted
@pytest.mark.asyncio
async def test_process_message_deduplicates_inbound_ids() -> None:
channel, bus = _make_channel()
@@ -462,6 +536,56 @@ async def test_poll_once_pauses_session_on_expired_errcode() -> None:
assert channel._session_pause_remaining_s() > 0
@pytest.mark.asyncio
async def test_poll_once_reloads_refreshed_state_after_session_pause(
tmp_path, monkeypatch: pytest.MonkeyPatch
) -> None:
channel = WeixinChannel(
WeixinConfig(enabled=True, allow_from=["*"], state_dir=str(tmp_path)),
MessageBus(),
)
channel._token = "old-token"
channel._save_state()
(tmp_path / "account.json").write_text(
json.dumps({"token": "new-token", "base_url": "https://new.example"}),
encoding="utf-8",
)
channel._session_pause_until = time.time() + 10
monkeypatch.setattr(weixin_mod.asyncio, "sleep", AsyncMock())
await channel._poll_once()
assert channel._token == "new-token"
assert channel.config.base_url == "https://new.example"
@pytest.mark.asyncio
async def test_poll_once_keeps_explicit_token_after_session_pause(
tmp_path, monkeypatch: pytest.MonkeyPatch
) -> None:
channel = WeixinChannel(
WeixinConfig(
enabled=True,
allow_from=["*"],
token="configured-token",
state_dir=str(tmp_path),
),
MessageBus(),
)
channel._token = "configured-token"
(tmp_path / "account.json").write_text(
json.dumps({"token": "stale-token", "base_url": "https://stale.example"}),
encoding="utf-8",
)
channel._session_pause_until = time.time() + 10
monkeypatch.setattr(weixin_mod.asyncio, "sleep", AsyncMock())
await channel._poll_once()
assert channel._token == "configured-token"
assert channel.config.base_url == "https://ilinkai.weixin.qq.com"
@pytest.mark.asyncio
async def test_qr_login_refreshes_expired_qr_and_then_succeeds(
no_qr_poll_delay,
+8 -9
View File
@@ -1,7 +1,5 @@
"""Typer commands for foreground and background gateway control."""
# pyright: reportUnusedFunction=false
from __future__ import annotations
import subprocess
@@ -135,8 +133,9 @@ def create_gateway_app(
console.print()
console.print(result.content)
# Typer consumes these callbacks through decorator registration.
@gateway_app.callback(invoke_without_command=True)
def gateway(
def gateway( # pyright: ignore[reportUnusedFunction]
ctx: typer.Context,
port: int | None = typer.Option(None, "--port", "-p", help="Gateway port"),
workspace: str | None = typer.Option(None, "--workspace", "-w", help="Workspace directory"),
@@ -191,7 +190,7 @@ def create_gateway_app(
)
@gateway_app.command("status")
def gateway_status(
def gateway_status( # pyright: ignore[reportUnusedFunction]
workspace: str | None = typer.Option(None, "--workspace", "-w", help="Workspace directory"),
config: str | None = typer.Option(None, "--config", "-c", help="Path to config file"),
) -> None:
@@ -199,7 +198,7 @@ def create_gateway_app(
print_status(runtime_for_instance(workspace=workspace, config=config).status())
@gateway_app.command("logs")
def gateway_logs(
def gateway_logs( # pyright: ignore[reportUnusedFunction]
tail: int = typer.Option(200, "--tail", help="Number of recent lines to show"),
follow: bool = typer.Option(True, "--follow/--no-follow", help="Follow new log output"),
workspace: str | None = typer.Option(None, "--workspace", "-w", help="Workspace directory"),
@@ -217,7 +216,7 @@ def create_gateway_app(
console.print(line)
@gateway_app.command("stop")
def gateway_stop(
def gateway_stop( # pyright: ignore[reportUnusedFunction]
timeout: int = typer.Option(20, "--timeout", help="Stop timeout in seconds"),
workspace: str | None = typer.Option(None, "--workspace", "-w", help="Workspace directory"),
config: str | None = typer.Option(None, "--config", "-c", help="Path to config file"),
@@ -233,7 +232,7 @@ def create_gateway_app(
raise typer.Exit(1)
@gateway_app.command("restart")
def gateway_restart(
def gateway_restart( # pyright: ignore[reportUnusedFunction]
port: int | None = typer.Option(None, "--port", "-p", help="Gateway port"),
workspace: str | None = typer.Option(None, "--workspace", "-w", help="Workspace directory"),
verbose: bool = typer.Option(False, "--verbose", "-v", help="Verbose output"),
@@ -266,7 +265,7 @@ def create_gateway_app(
raise typer.Exit(1)
@gateway_app.command("install-service")
def gateway_install_service(
def gateway_install_service( # pyright: ignore[reportUnusedFunction]
port: int | None = typer.Option(None, "--port", "-p", help="Gateway port"),
workspace: str | None = typer.Option(None, "--workspace", "-w", help="Workspace directory"),
verbose: bool = typer.Option(False, "--verbose", "-v", help="Verbose output"),
@@ -302,7 +301,7 @@ def create_gateway_app(
raise typer.Exit(1)
@gateway_app.command("uninstall-service")
def gateway_uninstall_service(
def gateway_uninstall_service( # pyright: ignore[reportUnusedFunction]
name: str = typer.Option("nanobot-gateway", "--name", help="Service name"),
manager: ServiceManagerKind = typer.Option("auto", "--manager", help="auto, systemd, or launchd"),
dry_run: bool = typer.Option(False, "--dry-run", help="Print actions without uninstalling"),
+55 -13
View File
@@ -201,6 +201,58 @@ def _print_gateway_health_endpoint(host: str, port: int) -> None:
)
async def _close_gateway_runtime(
agent: AgentLoop,
channels: Any,
tasks: list[asyncio.Task[Any]],
runtime_tasks: asyncio.Future[list[Any]] | None,
*,
task_wait_timeout: float = 15.0,
close_timeout: float = 15.0,
) -> None:
"""Cancel runtime tasks, then deterministically close agent resources.
Order matters: runtime tasks (including the agent loop and any in-flight
turn) are cancelled and awaited -- bounded -- before exec sessions,
subagents, and MCP servers are torn down, so no active turn is using a
shared resource when it closes. The final close is bounded and idempotent:
the agent loop's own finally also calls ``close_mcp()``, so this runs again
as a no-op when that path already completed, and as the guaranteed final
close when it was skipped or cut short (which previously left asyncio
subprocess transports alive past ``loop.close()``, producing
"RuntimeError: Event loop is closed" noise and potentially orphaned
processes at interpreter exit).
"""
# Some SDKs swallow task cancellation while attempting to reconnect.
# Close channel transports before waiting for their runners to exit.
await channels.stop_all()
for task in tasks:
if not task.done():
task.cancel()
pending: set[asyncio.Task[Any]] = set()
if tasks:
# Bounded: a coroutine that swallows cancellation (e.g. an SDK reconnect
# loop) must not hold the stop open until systemd's timeout kills the
# cgroup. Anything still pending is abandoned and closed underneath.
_done, pending = await asyncio.wait(tasks, timeout=task_wait_timeout)
# A task can swallow the first cancellation while unwinding. Re-cancel
# timed-out tasks so an agent loop stuck draining background work reaches
# its resource-cleanup phase before the explicit final close below.
for task in pending:
task.cancel()
if runtime_tasks is not None and not runtime_tasks.done():
runtime_tasks.cancel()
try:
await asyncio.wait_for(agent.close_mcp(), timeout=close_timeout)
except BaseException as exc: # noqa: BLE001 - shutdown must proceed
logger.warning("Gateway shutdown: agent resource cleanup incomplete: {}", exc)
# Retrieving an already-finished gather prevents noisy unhandled exceptions,
# but never wait for it here: its children were bounded individually above.
if runtime_tasks is not None and runtime_tasks.done():
with suppress(asyncio.CancelledError, Exception):
await runtime_tasks
def _run_gateway(
config: Config,
*,
@@ -734,7 +786,6 @@ def _run_gateway(
tasks: list[asyncio.Task[Any]] = []
shutdown_task: asyncio.Task[Any] | None = None
runtime_tasks: asyncio.Future[list[Any]] | None = None
runtime_tasks_drained = False
shutdown_event = asyncio.Event()
cli_terminal._ensure_interactive_tty_mode()
restore_shutdown_handlers = _install_gateway_shutdown_handlers(
@@ -786,7 +837,6 @@ def _run_gateway(
return_when=asyncio.FIRST_COMPLETED,
)
if runtime_tasks in done:
runtime_tasks_drained = True
await runtime_tasks
else:
runtime_tasks.cancel()
@@ -805,17 +855,9 @@ def _run_gateway(
await shutdown_task
cron.stop()
agent.stop()
# Some SDKs swallow task cancellation while attempting to reconnect.
# Close channel transports before waiting for their runners to exit.
await channels.stop_all()
for task in tasks:
if not task.done():
task.cancel()
if tasks:
await asyncio.gather(*tasks, return_exceptions=True)
if runtime_tasks is not None and not runtime_tasks_drained:
with suppress(asyncio.CancelledError, Exception):
await runtime_tasks
# Cancel runtime tasks first, then deterministically close
# exec/MCP resources while the event loop is still alive.
await _close_gateway_runtime(agent, channels, tasks, runtime_tasks)
# Flush all cached sessions to durable storage before exit.
# This prevents data loss on filesystems with write-back
# caching (rclone VFS, NFS, FUSE mounts, etc.).
+16 -11
View File
@@ -1,7 +1,5 @@
"""Interactive onboarding questionnaire for nanobot."""
# pyright: reportMissingTypeStubs=false, reportUnusedFunction=false
import asyncio
import json
import types
@@ -206,35 +204,36 @@ def _select_with_back(
# Key bindings
bindings = KeyBindings()
# KeyBindings consumes these handlers through decorator registration.
@bindings.add(Keys.Up)
def _up(event: KeyPressEvent) -> None:
def _up(event: KeyPressEvent) -> None: # pyright: ignore[reportUnusedFunction]
nonlocal selected_index
selected_index = (selected_index - 1) % len(choices)
event.app.invalidate()
@bindings.add(Keys.Down)
def _down(event: KeyPressEvent) -> None:
def _down(event: KeyPressEvent) -> None: # pyright: ignore[reportUnusedFunction]
nonlocal selected_index
selected_index = (selected_index + 1) % len(choices)
event.app.invalidate()
@bindings.add(Keys.Enter)
def _enter(event: KeyPressEvent) -> None:
def _enter(event: KeyPressEvent) -> None: # pyright: ignore[reportUnusedFunction]
state["result"] = choices[selected_index]
event.app.exit()
@bindings.add("escape")
def _escape(event: KeyPressEvent) -> None:
def _escape(event: KeyPressEvent) -> None: # pyright: ignore[reportUnusedFunction]
state["result"] = _BACK_PRESSED
event.app.exit()
@bindings.add(Keys.Left)
def _left(event: KeyPressEvent) -> None:
def _left(event: KeyPressEvent) -> None: # pyright: ignore[reportUnusedFunction]
state["result"] = _BACK_PRESSED
event.app.exit()
@bindings.add(Keys.ControlC)
def _ctrl_c(event: KeyPressEvent) -> None:
def _ctrl_c(event: KeyPressEvent) -> None: # pyright: ignore[reportUnusedFunction]
state["result"] = None
event.app.exit()
@@ -532,8 +531,9 @@ def _input_back_key_bindings() -> KeyBindings:
"""Return key bindings that make Escape behave like a local back action."""
bindings = KeyBindings()
# KeyBindings consumes this handler through decorator registration.
@bindings.add("escape")
def _escape(event: KeyPressEvent) -> None:
def _escape(event: KeyPressEvent) -> None: # pyright: ignore[reportUnusedFunction]
event.app.exit(result=_BACK_PRESSED)
return bindings
@@ -1668,7 +1668,11 @@ def _quick_start_oauth_login(config: Config, provider_name: str) -> bool:
return False
try:
from oauth_cli_kit import get_token, login_oauth_interactive
# oauth-cli-kit does not publish type information.
from oauth_cli_kit import ( # pyright: ignore[reportMissingTypeStubs]
get_token,
login_oauth_interactive,
)
except ImportError:
console.print("[red]oauth_cli_kit not installed. Run: pip install oauth-cli-kit[/red]")
return False
@@ -1709,7 +1713,8 @@ def _quick_start_oauth_is_authenticated(config: Config, provider_name: str) -> b
if provider_name != "openai_codex":
return False
try:
from oauth_cli_kit import get_token
# oauth-cli-kit does not publish type information.
from oauth_cli_kit import get_token # pyright: ignore[reportMissingTypeStubs]
proxy = _quick_start_codex_proxy(config)
token = get_token(proxy=proxy)
+20 -1
View File
@@ -139,7 +139,7 @@ class AgentDefaults(Base):
validation_alias=AliasChoices("toolHintMaxLength"),
serialization_alias="toolHintMaxLength",
) # Max characters for tool hint display (e.g. "$ cd …/project && npm test")
reasoning_effort: str | None = None # low / medium / high / adaptive / none — LLM thinking effort; None preserves the provider default
reasoning_effort: str | None = None # low / medium / high / xhigh / max / adaptive / none — LLM thinking effort; None preserves the provider default
timezone: str = "UTC" # IANA timezone, e.g. "Asia/Shanghai", "America/New_York"
bot_name: str = "nanobot" # Display name shown in CLI prompts (e.g. "{name} is thinking...")
bot_icon: str = "🐈" # Short icon (emoji or text) shown next to the bot name in CLI; "" to omit
@@ -269,6 +269,7 @@ class ProvidersConfig(Base):
ant_ling: ProviderConfig = Field(default_factory=ProviderConfig) # Ant Ling
aihubmix: ProviderConfig = Field(default_factory=ProviderConfig) # AiHubMix API gateway
siliconflow: ProviderConfig = Field(default_factory=ProviderConfig) # SiliconFlow (硅基流动)
edenai: ProviderConfig = Field(default_factory=ProviderConfig) # Eden AI API gateway
novita: ProviderConfig = Field(default_factory=ProviderConfig) # Novita AI
volcengine: ProviderConfig = Field(default_factory=ProviderConfig) # VolcEngine (火山引擎)
volcengine_coding_plan: ProviderConfig = Field(default_factory=ProviderConfig) # VolcEngine Coding Plan
@@ -504,6 +505,7 @@ class Config(BaseSettings):
model_normalized = model_lower.replace("-", "_")
model_prefix = model_lower.split("/", 1)[0] if "/" in model_lower else ""
normalized_prefix = model_prefix.replace("-", "_")
prefixed_provider = find_by_name(model_prefix) if model_prefix else None
def _kw_matches(kw: str) -> bool:
kw = kw.lower()
@@ -533,6 +535,22 @@ class Config(BaseSettings):
continue
p = getattr(self.providers, spec.name, None)
if p and any(_kw_matches(kw) for kw in spec.keywords):
# Local providers (Ollama, vLLM, …) keep model-family keywords
# like "nemotron" or "llama" to enable bare-model auto-routing,
# but those keywords collide with cloud-hosted variants of the
# same family (e.g. `nvidia/nemotron-...` via OpenRouter). Only
# honor a local keyword match when the user has actually
# configured that local endpoint via `api_base` — mirrors the
# gate already used by the local-fallback loop below.
if spec.is_local:
# A qualified model belongs to its explicit provider or a
# gateway fallback, never to a different local provider
# whose model-family keyword happens to match.
foreign_prefix = bool(
prefixed_provider is not None and prefixed_provider.name != spec.name
)
if not p.api_base or foreign_prefix:
continue
if spec.is_oauth or spec.is_local or spec.is_direct or p.api_key:
return p, spec.name
@@ -541,6 +559,7 @@ class Config(BaseSettings):
# Prefer providers whose detect_by_base_keyword matches the configured api_base
# (e.g. Ollama's "11434" in "http://localhost:11434") over plain registry order.
local_fallback: tuple[ProviderConfig, str] | None = None
if prefixed_provider is None:
for spec in PROVIDERS:
if not spec.is_local:
continue
+39 -24
View File
@@ -75,7 +75,16 @@ def _validate_schedule_for_add(schedule: CronSchedule) -> None:
if schedule.tz and schedule.kind != "cron":
raise ValueError("tz can only be used with cron schedules")
if schedule.kind == "cron" and schedule.tz:
if schedule.kind == "cron":
if not schedule.expr or not schedule.expr.strip():
raise ValueError("cron schedule requires a non-empty 'expr'")
try:
from croniter import croniter
croniter(schedule.expr)
except Exception as exc:
raise ValueError(f"invalid cron expression '{schedule.expr}': {exc}") from None
if schedule.tz:
try:
from zoneinfo import ZoneInfo
@@ -163,9 +172,13 @@ class CronService:
self._store: CronStore | None = None
self._timer_task: asyncio.Task[None] | None = None
self._running = False
self._timer_active = False
self._active_executions = 0
self.max_sleep_ms = max_sleep_ms
def _should_persist_store(self) -> bool:
"""Return whether this instance currently owns the live store."""
return self._running or self._active_executions > 0
def _is_unbound_agent_job(self, job: CronJob) -> bool:
return job.payload.kind == "agent_turn" and not is_bound_cron_job(job)
@@ -278,23 +291,24 @@ class CronService:
logger.exception("load action line error")
continue
self._store.jobs = list(jobs_map.values()) # pyright: ignore[reportOptionalMemberAccess]
if self._running and changed:
if self._should_persist_store() and changed:
self._action_path.write_text("", encoding="utf-8")
self._save_store()
return
def _load_store(self) -> CronStore | None:
def _load_store(self, *, reload_during_execution: bool = False) -> CronStore | None:
"""Load jobs from disk. Reloads automatically if file was modified externally.
- Reload every time because it needs to merge operations on the jobs object from other instances.
- During _on_timer execution, return the existing store to prevent concurrent
- During job execution, return the existing store to prevent concurrent
_load_store calls (e.g. from list_jobs polling) from replacing it mid-execution.
The first execution explicitly reloads once when it takes ownership.
- When the on-disk store exists but is unreadable: keep using the
previous in-memory ``self._store`` if we already have one (so a
transient corruption does not drop live jobs); only the very first
load (during ``start``) can return ``None`` to signal an unrecoverable
state to the caller.
"""
if self._timer_active and self._store:
if self._active_executions > 0 and self._store and not reload_during_execution:
return self._store
loaded = self._load_jobs()
if loaded is None:
@@ -307,12 +321,12 @@ class CronService:
jobs, version = loaded
self._store = CronStore(version=version, jobs=jobs)
self._merge_action()
if self._enforce_store_agent_bindings() and self._running:
if self._enforce_store_agent_bindings() and self._should_persist_store():
self._save_store()
return self._store
def _require_store(self) -> CronStore:
def _require_store(self, *, reload_during_execution: bool = False) -> CronStore:
"""Return a usable store or raise a clear error.
``_load_store`` deliberately returns ``None`` when the first load sees
@@ -322,7 +336,7 @@ class CronService:
``AttributeError`` and, more importantly, prevents follow-up saves from
treating a corrupt store as an empty one.
"""
store = self._load_store()
store = self._load_store(reload_during_execution=reload_during_execution)
if store is None:
raise RuntimeError(
f"cron store at {self.store_path} could not be loaded and was preserved "
@@ -504,19 +518,20 @@ class CronService:
async def _on_timer(self) -> None:
"""Handle timer tick - run due jobs."""
self._load_store()
reload_store = self._active_executions == 0
self._active_executions += 1
try:
store = self._load_store(reload_during_execution=reload_store)
# If a hot reload found a corrupt store on disk, ``self._store`` may
# still hold the previous, known-good in-memory snapshot. Keep using
# it rather than crashing the timer or wiping live jobs.
if not self._store:
if store is None:
self._arm_timer()
return
self._timer_active = True
try:
now = _now_ms()
due_jobs = [
j for j in self._store.jobs
j for j in store.jobs
if j.enabled and j.state.next_run_at_ms and now >= j.state.next_run_at_ms
]
@@ -525,7 +540,7 @@ class CronService:
self._save_store()
finally:
self._timer_active = False
self._active_executions -= 1
self._arm_timer()
async def _execute_job(self, job: CronJob) -> None:
@@ -657,7 +672,7 @@ class CronService:
)
_normalize_agent_turn_job(job)
self._enforce_agent_binding(job)
if self._running:
if self._should_persist_store():
store = self._require_store()
store.jobs.append(job)
self._save_store()
@@ -697,7 +712,7 @@ class CronService:
removed = len(store.jobs) < before
if removed:
if self._running:
if self._should_persist_store():
self._save_store()
self._arm_timer()
else:
@@ -719,7 +734,7 @@ class CronService:
job.state.next_run_at_ms = _compute_next_run(job.schedule, _now_ms())
else:
job.state.next_run_at_ms = None
if self._running:
if self._should_persist_store():
self._save_store()
self._arm_timer()
else:
@@ -775,7 +790,7 @@ class CronService:
else:
job.state.next_run_at_ms = None
if self._running:
if self._should_persist_store():
self._save_store()
self._arm_timer()
else:
@@ -786,10 +801,10 @@ class CronService:
async def run_job(self, job_id: str, force: bool = False) -> bool:
"""Manually run a job without disturbing the service's running state."""
was_running = self._running
self._running = True
reload_store = self._active_executions == 0
self._active_executions += 1
try:
store = self._require_store()
store = self._require_store(reload_during_execution=reload_store)
for job in store.jobs:
if job.id == job_id:
if self._is_unbound_agent_job(job):
@@ -803,8 +818,8 @@ class CronService:
return True
return False
finally:
self._running = was_running
if was_running:
self._active_executions -= 1
if self._running and self._active_executions == 0:
self._arm_timer()
def get_job(self, job_id: str) -> CronJob | None:
+22 -1
View File
@@ -2,6 +2,8 @@
from __future__ import annotations
import json
import os
import shutil
import subprocess
import sys
from dataclasses import dataclass
@@ -179,13 +181,18 @@ def extra_installed(extra: str, deps: list[str] | None) -> bool:
return all(requirement_installed(dep, extra) for dep in deps)
def run_install_command(argv: list[str]) -> subprocess.CompletedProcess[str]:
def run_install_command(
argv: list[str],
*,
env: dict[str, str] | None = None,
) -> subprocess.CompletedProcess[str]:
try:
return subprocess.run(
argv,
capture_output=True,
text=True,
timeout=_INSTALL_TIMEOUT_SECONDS,
env=env,
)
except subprocess.TimeoutExpired as exc:
stdout = exc.stdout.decode(errors="replace") if isinstance(exc.stdout, bytes) else exc.stdout
@@ -234,6 +241,20 @@ def install_extra(
failed_cmd = pip_cmd
failed_proc = proc
if missing_pip(proc):
if shutil.which("uv"):
uv_cmd = ["uv", "pip", "install", "--python", sys.executable, *install_args]
uv_env = os.environ.copy()
if index_url := os.environ.get("PIP_INDEX_URL", "").strip():
uv_env["UV_INDEX_URL"] = index_url
logger.info("pip missing while installing '{}'; running {}", extra, command_text(uv_cmd))
uv_proc = runner(uv_cmd, env=uv_env)
_log_completed_command(f"Optional feature '{extra}' uv install", uv_proc)
if uv_proc.returncode == 0:
importlib.invalidate_caches()
return InstallResult(True, label, pip_cmd)
output = (uv_proc.stderr or uv_proc.stdout or "").strip()
return InstallResult(False, label, pip_cmd, failed_cmd=uv_cmd, output=output)
ensure_cmd = [sys.executable, "-m", "ensurepip", "--upgrade"]
logger.info("pip missing while installing '{}'; running {}", extra, command_text(ensure_cmd))
ensure_proc = runner(ensure_cmd)
+50 -10
View File
@@ -31,6 +31,36 @@ def _gen_tool_id() -> str:
_VALID_TOOL_ID = re.compile(r"^[a-zA-Z0-9_-]+$")
_CLAUDE_MODEL_VERSION = re.compile(
r"claude-(?P<family>[a-z]+)-(?P<major>\d+)"
r"(?:-(?P<minor>\d{1,2})(?=-|$))?"
)
_ADAPTIVE_ONLY_MIN_VERSIONS = {
"opus": (4, 7),
"sonnet": (5, 0),
"fable": (5, 0),
"mythos": (5, 0),
}
_THINKING_DISABLE_MIN_VERSIONS = {
"opus": (5, 0),
"sonnet": (5, 0),
}
_SAMPLING_DEPRECATED_MODELS = {"claude-mythos-preview"}
def _model_version_at_least(
model_name: str,
minimum_versions: dict[str, tuple[int, int]],
) -> bool:
match = _CLAUDE_MODEL_VERSION.search(model_name.lower())
if match is None:
return False
minimum = minimum_versions.get(match.group("family"))
if minimum is None:
return False
version = (int(match.group("major")), int(match.group("minor") or 0))
return version >= minimum
def _sanitize_tool_id(tid: str) -> str:
"""Ensure tool_use/tool_result IDs match Anthropic's required pattern.
@@ -562,13 +592,13 @@ class AnthropicProvider(LLMProvider):
)
max_tokens = max(1, max_tokens)
thinking_enabled = bool(reasoning_effort) and reasoning_effort.lower() != "none"
# Several Anthropic models (opus-4-7, opus-4-8, sonnet-5, fable) deprecated the
# `temperature` parameter — the API returns 400 if it is present.
_model_lower = model_name.lower()
omit_temperature = any(
m in _model_lower for m in ("opus-4-7", "opus-4-8", "sonnet-5", "fable")
reasoning_effort_lower = reasoning_effort.lower() if reasoning_effort else None
thinking_enabled = reasoning_effort_lower not in (None, "", "none")
adaptive_only = _model_version_at_least(model_name, _ADAPTIVE_ONLY_MIN_VERSIONS)
# Mythos Preview rejects sampling parameters but still accepts manual
# thinking budgets, so it is not part of the adaptive-only capability.
omit_temperature = (
adaptive_only or model_name.lower() in _SAMPLING_DEPRECATED_MODELS
)
kwargs: dict[str, Any] = {
@@ -580,16 +610,26 @@ class AnthropicProvider(LLMProvider):
if system:
kwargs["system"] = system
if reasoning_effort == "adaptive":
if reasoning_effort_lower == "none" and _model_version_at_least(
model_name, _THINKING_DISABLE_MIN_VERSIONS
):
# These models think by default, so omission would not honor an
# explicit request to disable thinking.
kwargs["thinking"] = {"type": "disabled"}
elif reasoning_effort_lower == "adaptive":
# Adaptive thinking: model decides when and how much to think
# Supported on claude-sonnet-4-6 and claude-opus-4-6.
# Also auto-enables interleaved thinking between tool calls.
kwargs["thinking"] = {"type": "adaptive"}
if not omit_temperature:
kwargs["temperature"] = 1.0
elif thinking_enabled and adaptive_only:
# Newer Claude models removed manual token budgets. Their effort
# control is independent from the adaptive thinking mode.
kwargs["thinking"] = {"type": "adaptive"}
kwargs["output_config"] = {"effort": reasoning_effort_lower}
elif thinking_enabled:
budget_map = {"low": 1024, "medium": 4096, "high": max(8192, max_tokens)}
budget = budget_map.get(cast(str, reasoning_effort).lower(), 4096)
budget = budget_map.get(reasoning_effort_lower, 4096)
kwargs["thinking"] = {"type": "enabled", "budget_tokens": budget}
kwargs["max_tokens"] = max(max_tokens, budget + 4096)
if not omit_temperature:
+12 -5
View File
@@ -808,7 +808,12 @@ class GeminiImageGenerationClient(ImageGenerationProvider):
generation_config: dict[str, Any] = {"responseModalities": ["TEXT", "IMAGE"]}
image_config = _gemini_flash_image_config(model, aspect_ratio, image_size)
if image_config:
generation_config["responseFormat"] = {"image": image_config}
# Gemini Flash image models accept plain-string values under
# ``generationConfig.imageConfig``. The legacy
# ``responseFormat.image`` block is rejected with INVALID_ARGUMENT
# by gemini-3.1-flash-lite-image (enum-based fields), so it is not
# used here.
generation_config["imageConfig"] = image_config
body: dict[str, Any] = {
"contents": [{"role": "user", "parts": parts}],
@@ -864,11 +869,13 @@ def _gemini_flash_image_config(
aspect_ratio: str | None,
image_size: str | None,
) -> dict[str, str]:
"""Build the ``responseFormat.image`` config for Gemini Flash image models.
"""Build the ``generationConfig.imageConfig`` config for Gemini Flash image models.
Capabilities are model-specific: Gemini 3.1 Flash variants support four
additional extreme ratios, while configurable image sizes are limited to
the documented Gemini 3 image model families.
Values are the documented plain strings (e.g. ``16:9``, ``1K``) that the
live v1beta API accepts under ``imageConfig``. Capabilities are
model-specific: Gemini 3.1 Flash variants support four additional extreme
ratios, while configurable image sizes are limited to the documented
Gemini 3 image model families.
"""
config: dict[str, str] = {}
if aspect_ratio and aspect_ratio in _gemini_flash_supported_aspect_ratios(model):
+21 -6
View File
@@ -958,22 +958,34 @@ class OpenAICompatProvider(LLMProvider):
model: str | None,
reasoning_effort: str | None,
) -> bool:
"""Use Responses API only for direct OpenAI requests that benefit from it."""
"""Choose Responses for providers/models that explicitly support it."""
if self._api_type == "chat_completions":
return False
if self._spec and self._spec.name not in ("openai", "github_copilot"):
spec_name = self._spec.name if self._spec is not None else None
model_name = self._request_model_name(model or self.default_model).lower()
supported_models = {
supported.lower()
for supported in getattr(self._spec, "responses_models", ())
}
model_responses = any(
model_name == supported or model_name.endswith(f"/{supported}")
for supported in supported_models
)
provider_responses = spec_name in ("openai", "github_copilot")
if not provider_responses and not model_responses:
return False
if self._api_type == "responses":
# Explicit configuration means Responses is mandatory; do not
# consult the circuit breaker or fall back to Chat Completions.
return True
if self._spec is None or self._spec.name != "github_copilot":
if provider_responses and (self._spec is None or self._spec.name != "github_copilot"):
if not _is_direct_openai_base(self._effective_base):
return False
model_name = (model or self.default_model).lower()
wants = False
if reasoning_effort and reasoning_effort.lower() != "none":
if model_responses:
wants = True
elif reasoning_effort and reasoning_effort.lower() != "none":
wants = True
elif any(token in model_name for token in ("gpt-5", "o1", "o3", "o4")):
wants = True
@@ -1099,11 +1111,13 @@ class OpenAICompatProvider(LLMProvider):
self._sanitize_empty_content(sanitized_state.pending_messages)
)
)
preserve_reasoning = bool(self._spec and self._spec.name == "deepseek")
instructions, input_items, replayed = prepare_responses_input(
sanitized_messages,
state=sanitized_state,
provider=self._responses_state_provider(),
model=model_name,
preserve_reasoning=preserve_reasoning,
)
body: dict[str, Any] = {
@@ -1131,7 +1145,7 @@ class OpenAICompatProvider(LLMProvider):
if self._supports_temperature(model_name, reasoning_effort):
body["temperature"] = temperature
if not self._supports_temperature(model_name, reasoning_effort):
if not self._supports_temperature(model_name, reasoning_effort) and not preserve_reasoning:
body["include"] = ["reasoning.encrypted_content"]
if reasoning_effort and reasoning_effort.lower() != "none":
body["reasoning"] = {"effort": reasoning_effort}
@@ -1827,6 +1841,7 @@ class OpenAICompatProvider(LLMProvider):
_timed_stream(),
on_content_delta,
on_tool_call_delta=on_tool_call_delta,
on_reasoning_delta=on_thinking_delta,
capture=capture,
)
self._record_responses_success(model, reasoning_effort)
@@ -12,7 +12,11 @@ def _as_json_object(value: object) -> dict[str, Any] | None:
return cast(dict[str, Any], value) if isinstance(value, dict) else None
def convert_messages(messages: list[dict[str, Any]]) -> tuple[str, list[dict[str, Any]]]:
def convert_messages(
messages: list[dict[str, Any]],
*,
preserve_reasoning: bool = False,
) -> tuple[str, list[dict[str, Any]]]:
"""Convert Chat Completions messages to Responses API input items.
Returns ``(system_prompt, input_items)`` where *system_prompt* is extracted
@@ -36,6 +40,13 @@ def convert_messages(messages: list[dict[str, Any]]) -> tuple[str, list[dict[str
continue
if role == "assistant":
if preserve_reasoning:
reasoning = msg.get("reasoning_content")
if isinstance(reasoning, str) and reasoning:
input_items.append({
"type": "reasoning",
"content": [{"type": "output_text", "text": reasoning}],
})
if isinstance(content, str) and content:
message_id = _unique_item_id(f"msg_{idx}", used_item_ids)
input_items.append({
+34 -12
View File
@@ -69,7 +69,9 @@ def _response_object(value: object) -> dict[str, Any] | None:
return object_value
dump = getattr(value, "model_dump", None)
if callable(dump):
return _as_json_object(dump())
dumped = _as_json_object(dump())
if dumped is not None:
return dumped
try:
return _as_json_object(vars(value))
except TypeError:
@@ -444,6 +446,14 @@ def _extract_reasoning_summary_from_output(output: object) -> str | None:
for item in _response_object_list(output):
if item.get("type") != "reasoning":
continue
content = item.get("content")
if isinstance(content, str) and content:
parts.append(content)
elif isinstance(content, list):
for block in _response_object_list(cast(list[object], content)):
text = block.get("text")
if isinstance(text, str) and text:
parts.append(text)
for summary in _response_object_list(item.get("summary")):
if summary.get("type") == "summary_text" and summary.get("text"):
text = summary.get("text")
@@ -483,10 +493,8 @@ def parse_response_output(
if isinstance(refusal, str):
content_parts.append(refusal)
elif item_type == "reasoning":
for s in _response_object_list(item.get("summary")):
if s.get("type") == "summary_text" and s.get("text"):
text = s.get("text")
if isinstance(text, str):
text = _extract_reasoning_summary_from_output([item])
if text:
reasoning_content = (reasoning_content or "") + text
elif item_type == "function_call":
call_id = item.get("call_id") or ""
@@ -532,6 +540,7 @@ async def consume_sdk_stream(
stream: Any,
on_content_delta: Callable[[str], Awaitable[None]] | None = None,
on_tool_call_delta: Callable[[dict[str, Any]], Awaitable[None]] | None = None,
on_reasoning_delta: Callable[[str], Awaitable[None]] | None = None,
capture: ResponsesStreamCapture | None = None,
) -> tuple[str, list[ToolCallRequest], str, dict[str, int], str | None]:
"""Consume an SDK async stream from ``client.responses.create(stream=True)``."""
@@ -542,6 +551,7 @@ async def consume_sdk_stream(
finish_reason = "stop"
usage: dict[str, int] = {}
reasoning_content: str | None = None
streamed_reasoning = False
refusal_seen = False
refusal_deltas: dict[tuple[str | None, int | None], str] = {}
emitted_refusal_text = ""
@@ -572,6 +582,19 @@ async def consume_sdk_stream(
content += delta_text
if on_content_delta and delta_text:
await on_content_delta(delta_text)
elif event_type == "response.reasoning_text.delta":
delta_text = getattr(event, "delta", "") or ""
if delta_text:
reasoning_content = (reasoning_content or "") + delta_text
streamed_reasoning = True
if on_reasoning_delta:
await on_reasoning_delta(delta_text)
elif event_type == "response.reasoning_text.done":
text = getattr(event, "text", "") or ""
if text and not streamed_reasoning and not reasoning_content:
reasoning_content = text
if on_reasoning_delta:
await on_reasoning_delta(text)
elif event_type == "response.refusal.delta":
refusal_seen = True
delta_text = getattr(event, "delta", None)
@@ -689,13 +712,12 @@ async def consume_sdk_stream(
"completion_tokens": int(getattr(usage_obj, "output_tokens", 0) or 0),
"total_tokens": int(getattr(usage_obj, "total_tokens", 0) or 0),
}
for out_item in cast(list[Any], getattr(resp, "output", None) or []):
if getattr(out_item, "type", None) == "reasoning":
for s in cast(list[Any], getattr(out_item, "summary", None) or []):
if getattr(s, "type", None) == "summary_text":
text = getattr(s, "text", None)
if text:
reasoning_content = (reasoning_content or "") + text
if not reasoning_content:
reasoning_content = _extract_reasoning_summary_from_output(
getattr(resp, "output", None)
)
if reasoning_content and on_reasoning_delta:
await on_reasoning_delta(reasoning_content)
elif event_type in {"error", "response.failed"}:
detail = getattr(event, "error", None) or getattr(event, "message", None) or event
raise RuntimeError(f"Response failed: {str(detail)[:500]}")
+9 -2
View File
@@ -43,6 +43,7 @@ def prepare_responses_input(
state: ProviderConversationState | None,
provider: str,
model: str,
preserve_reasoning: bool = False,
) -> tuple[str, list[dict[str, Any]], bool]:
"""Build a request from exact prior items plus only newly appended messages.
@@ -50,7 +51,10 @@ def prepare_responses_input(
When no compatible state exists, it is converted normally as a safe
fallback.
"""
instructions, fallback_items = convert_messages(messages)
instructions, fallback_items = convert_messages(
messages,
preserve_reasoning=preserve_reasoning,
)
if state is None or not responses_state_matches(
state,
provider=provider,
@@ -62,7 +66,10 @@ def prepare_responses_input(
if prior_items is None:
return instructions, fallback_items, False
_, delta_items = convert_messages(state.pending_messages)
_, delta_items = convert_messages(
state.pending_messages,
preserve_reasoning=preserve_reasoning,
)
logger.debug(
"Replaying Responses state: prior_items={} pending_messages={}",
len(prior_items),
+18
View File
@@ -111,6 +111,11 @@ class ProviderSpec:
# Substring match against the wire model name (lowercased).
implicit_reasoning_models: tuple[str, ...] = ()
# Models that expose the OpenAI Responses wire format. This is model-level
# because providers may add Responses support incrementally (DeepSeek V4
# Flash is supported before V4 Pro).
responses_models: tuple[str, ...] = ()
# When the model returns content as a list of {"type":"thinking",...} +
# {"type":"text",...} blocks, extract the thinking text into
# reasoning_content. Mistral's Magistral / reasoning-enabled responses use
@@ -191,6 +196,18 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
supports_prompt_caching=True,
gateway_reasoning_style="reasoning_effort",
),
# Eden AI: OpenAI-compatible gateway. Models use the "provider/model"
# naming scheme (e.g. "anthropic/claude-sonnet-4-5"); the full id is sent upstream.
ProviderSpec(
name="edenai",
keywords=("edenai",),
env_key="EDENAI_API_KEY",
display_name="Eden AI",
backend="openai_compat",
is_gateway=True,
detect_by_base_keyword="edenai",
default_api_base="https://api.edenai.run/v3",
),
# OpenCode Zen: OpenAI-compatible chat-completions gateway for coding models.
# models.dev/OpenCode use provider id "opencode" and model ids like
# "opencode/<model>"; send the bare model upstream.
@@ -461,6 +478,7 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
backend="openai_compat",
default_api_base="https://api.deepseek.com",
thinking_style="thinking_type",
responses_models=("deepseek-v4-flash",),
),
# Gemini: Google's OpenAI-compatible endpoint
ProviderSpec(
+13 -2
View File
@@ -166,7 +166,8 @@ class LocalTriggerStore:
raise ValueError("trigger message is required")
self._ensure_dirs()
with self._lock:
trigger = self._find_unlocked(self._load_triggers_unlocked(), trigger_id)
triggers = self._load_triggers_unlocked()
trigger = self._find_unlocked(triggers, trigger_id)
if trigger is None:
raise TriggerNotFoundError(f"trigger not found: {trigger_id}")
if not trigger.enabled:
@@ -180,10 +181,20 @@ class LocalTriggerStore:
path = self.inbox_dir / f"{delivery.created_at_ms}-{delivery.id}.json"
self._atomic_write(path, json.dumps(_delivery_payload(delivery), ensure_ascii=False))
delivery.path = path
run_record_path: Path | None = None
try:
self.write_delivery_run_record(delivery, trigger=trigger, status="queued")
run_record_path = self.write_delivery_run_record(
delivery,
trigger=trigger,
status="queued",
)
trigger.last_message = _run_record_text(content)
trigger.updated_at_ms = delivery.created_at_ms
self._save_triggers_unlocked(triggers)
except BaseException:
path.unlink(missing_ok=True)
if run_record_path is not None:
run_record_path.unlink(missing_ok=True)
delivery.path = None
raise
return delivery
+3
View File
@@ -61,6 +61,7 @@ class LocalTrigger:
origin_metadata: dict[str, Any] = field(default_factory=dict)
created_at_ms: int = 0
updated_at_ms: int = 0
last_message: str = ""
last_run_at_ms: int | None = None
last_status: TriggerStatus | None = None
last_error: str | None = None
@@ -90,6 +91,7 @@ class LocalTrigger:
origin_metadata=dict(_get(data, "originMetadata", "origin_metadata", {}) or {}),
created_at_ms=_int_or_zero(_get(data, "createdAtMs", "created_at_ms", 0)),
updated_at_ms=_int_or_zero(_get(data, "updatedAtMs", "updated_at_ms", 0)),
last_message=str(_get(data, "lastMessage", "last_message", "") or ""),
last_run_at_ms=_optional_int(_get(data, "lastRunAtMs", "last_run_at_ms")),
last_status=_get(data, "lastStatus", "last_status"), # type: ignore[arg-type]
last_error=_get(data, "lastError", "last_error"),
@@ -108,6 +110,7 @@ class LocalTrigger:
"originMetadata": self.origin_metadata,
"createdAtMs": self.created_at_ms,
"updatedAtMs": self.updated_at_ms,
"lastMessage": self.last_message,
"lastRunAtMs": self.last_run_at_ms,
"lastStatus": self.last_status,
"lastError": self.last_error,
+47 -6
View File
@@ -3,6 +3,7 @@
from __future__ import annotations
import email.utils
import gzip
import hmac
import http
import ipaddress
@@ -16,6 +17,9 @@ from websockets.http11 import Response
QueryParams = dict[str, list[str]]
_JSON_GZIP_MIN_BYTES = 4 * 1024
_JSON_GZIP_LEVEL = 5
def strip_trailing_slash(path: str) -> str:
if len(path) > 1 and path.endswith("/"):
@@ -41,6 +45,15 @@ def case_insensitive_header(headers: Any, key: str) -> str:
return str(value or "").strip()
def combined_list_header(headers: Any, key: str) -> str:
"""Combine repeated values for a comma-separated HTTP list header."""
try:
values = headers.get_all(key)
except (AttributeError, KeyError):
return case_insensitive_header(headers, key)
return ", ".join(str(value).strip() for value in values if str(value).strip())
def safe_host_header(value: str) -> str:
"""Return a safe Host header value, or empty when it should not be echoed."""
value = value.strip()
@@ -62,18 +75,46 @@ def host_for_url(host: str, port: int) -> str:
return f"{host}:{port}"
def http_json_response(data: dict[str, Any], *, status: int = 200) -> Response:
def _accepts_gzip(value: str) -> bool:
wildcard_quality: float | None = None
for item in value.split(","):
name, *params = (part.strip() for part in item.split(";"))
quality = 1.0
for param in params:
key, separator, raw_value = param.partition("=")
if separator and key.strip().lower() == "q":
try:
quality = float(raw_value.strip())
except ValueError:
quality = 0.0
break
if name.lower() == "gzip":
return quality > 0
if name == "*":
wildcard_quality = quality
return wildcard_quality is not None and wildcard_quality > 0
def http_json_response(
data: dict[str, Any],
*,
status: int = 200,
accept_encoding: str | None = None,
) -> Response:
body = json.dumps(data, ensure_ascii=False).encode("utf-8")
headers = Headers(
[
headers = [
("Date", email.utils.formatdate(usegmt=True)),
("Connection", "close"),
("Content-Length", str(len(body))),
("Content-Type", "application/json; charset=utf-8"),
]
)
if accept_encoding is not None:
headers.append(("Vary", "Accept-Encoding"))
if len(body) >= _JSON_GZIP_MIN_BYTES and _accepts_gzip(accept_encoding):
body = gzip.compress(body, compresslevel=_JSON_GZIP_LEVEL, mtime=0)
headers.append(("Content-Encoding", "gzip"))
headers.append(("Content-Length", str(len(body))))
reason = http.HTTPStatus(status).phrase
return Response(status, reason, headers, body)
return Response(status, reason, Headers(headers), body)
def http_response(
+1 -1
View File
@@ -209,7 +209,7 @@ def _serialize_trigger(
},
"payload": {
"kind": "local_trigger",
"message": command,
"message": trigger.last_message or command,
"command": command,
},
"state": {
+86 -19
View File
@@ -16,6 +16,7 @@ from typing import Any, cast
from loguru import logger
from nanobot.config.paths import get_webui_dir
from nanobot.security.workspace_access import WORKSPACE_SCOPE_METADATA_KEY
from nanobot.session.history_visibility import is_hidden_history_message
from nanobot.session.manager import (
_PROVIDER_STATE_RECORD_TYPE, # pyright: ignore[reportPrivateUsage]
@@ -29,9 +30,16 @@ from nanobot.session.manager import (
)
from nanobot.session.model_selection import model_preset_from_metadata
_INDEX_VERSION = 4
_INDEX_VERSION = 6
_INDEX_FILENAME = ".webui_session_index.json"
_MODEL_PRESET_FIELD = "model_preset"
_WORKSPACE_SCOPE_PRESENT_FIELD = "_workspace_scope_present"
_WORKSPACE_SCOPE_VALUE_FIELD = "_workspace_scope_value"
WEBUI_SESSION_INDEX_INTERNAL_FIELDS = frozenset(
{_WORKSPACE_SCOPE_PRESENT_FIELD, _WORKSPACE_SCOPE_VALUE_FIELD}
)
_INDEXED_WORKSPACE_SCOPE_KEYS = ("project_path", "path", "access_mode")
_MAX_INDEXED_WORKSPACE_SCOPE_BYTES = 4096
_WEBUI_ACTIVITY_MTIME_NS = "webui_activity_mtime_ns"
_WEBUI_ACTIVITY_SIZE = "webui_activity_size"
_VISIBLE_TRANSCRIPT_ROLES = {"user", "assistant"}
@@ -61,17 +69,21 @@ def _reconcile_index(session_manager: SessionManager) -> tuple[list[dict[str, An
for path in session_manager.sessions_dir.glob("*.jsonl")
if SessionManager._session_key_from_path(path) is not None # pyright: ignore[reportPrivateUsage]
)
if not paths:
return [], existing_rows != []
webui_dir = get_webui_dir()
rows: list[dict[str, Any]] = []
changed = existing_rows is None
for path in paths:
row = existing_by_file.get(path.name)
if row is not None and _indexed_row_matches_file(row, path):
if row is not None and _indexed_row_matches_file(row, path, webui_dir):
rows.append(row)
continue
changed = True
scanned = _scan_session_row(session_manager, path)
scanned = _scan_session_row(session_manager, path, webui_dir)
if scanned is not None:
rows.append(scanned)
@@ -125,18 +137,20 @@ def _file_signature(path: Path) -> dict[str, int]:
return {"mtime_ns": stat.st_mtime_ns, "size": stat.st_size}
def _indexed_row_matches_file(row: dict[str, Any], path: Path) -> bool:
def _indexed_row_matches_file(row: dict[str, Any], path: Path, webui_dir: Path) -> bool:
if not all(isinstance(row.get(key), str) for key in ("key", "created_at", "updated_at")):
return False
if not isinstance(row.get("title", ""), str) or not isinstance(row.get("preview", ""), str):
return False
if not isinstance(row.get(_WORKSPACE_SCOPE_PRESENT_FIELD), bool):
return False
if row.get("file") != path.name:
return False
try:
signature = _file_signature(path)
except OSError:
return False
activity_signature = _webui_activity_signature(str(row.get("key")))
activity_signature = _webui_activity_signature(str(row.get("key")), webui_dir)
return (
row.get("mtime_ns") == signature["mtime_ns"]
and row.get("size") == signature["size"]
@@ -153,10 +167,57 @@ def _public_row(sessions_dir: Path, row: dict[str, Any]) -> dict[str, Any]:
"title": row.get("title", ""),
"preview": row.get("preview", ""),
_MODEL_PRESET_FIELD: row.get(_MODEL_PRESET_FIELD),
_WORKSPACE_SCOPE_PRESENT_FIELD: row.get(_WORKSPACE_SCOPE_PRESENT_FIELD, False),
_WORKSPACE_SCOPE_VALUE_FIELD: row.get(_WORKSPACE_SCOPE_VALUE_FIELD),
"path": str(sessions_dir / str(row.get("file", ""))),
}
def indexed_workspace_scope(row: dict[str, Any]) -> tuple[bool, object]:
"""Return the cached sidebar scope value while preserving missing vs null."""
return (
row.get(_WORKSPACE_SCOPE_PRESENT_FIELD) is True,
cast(object, row.get(_WORKSPACE_SCOPE_VALUE_FIELD)),
)
def _indexed_workspace_scope_fields(metadata: object) -> dict[str, object]:
if not isinstance(metadata, dict):
return {
_WORKSPACE_SCOPE_PRESENT_FIELD: False,
_WORKSPACE_SCOPE_VALUE_FIELD: None,
}
metadata_data = cast(dict[str, Any], metadata)
if WORKSPACE_SCOPE_METADATA_KEY not in metadata_data:
return {
_WORKSPACE_SCOPE_PRESENT_FIELD: False,
_WORKSPACE_SCOPE_VALUE_FIELD: None,
}
raw_scope = metadata_data.get(WORKSPACE_SCOPE_METADATA_KEY)
indexed_scope: object = False
if raw_scope is None:
indexed_scope = None
elif isinstance(raw_scope, dict):
scope_data = cast(dict[object, object], raw_scope)
recognized = {
key: scope_data[key]
for key in _INDEXED_WORKSPACE_SCOPE_KEYS
if key in scope_data
}
try:
encoded = json.dumps(recognized, ensure_ascii=False)
except (TypeError, ValueError):
pass
else:
if len(encoded.encode("utf-8")) <= _MAX_INDEXED_WORKSPACE_SCOPE_BYTES:
indexed_scope = cast(object, json.loads(encoded))
return {
_WORKSPACE_SCOPE_PRESENT_FIELD: True,
_WORKSPACE_SCOPE_VALUE_FIELD: indexed_scope,
}
def _preview_from_messages(messages: list[dict[str, Any]]) -> str:
fallback_preview = ""
scanned_records = 0
@@ -181,19 +242,18 @@ def _preview_from_messages(messages: list[dict[str, Any]]) -> str:
return fallback_preview
def _webui_activity_paths(session_key: str) -> list[Path]:
def _webui_activity_paths(session_key: str, webui_dir: Path) -> list[Path]:
stem = SessionManager.safe_key(session_key)
webui_dir = get_webui_dir()
return [
webui_dir / f"{stem}.jsonl",
webui_dir / f"{stem}.json",
]
def _webui_activity_signature(session_key: str) -> dict[str, int]:
def _webui_activity_signature(session_key: str, webui_dir: Path) -> dict[str, int]:
latest_mtime_ns = 0
total_size = 0
for path in _webui_activity_paths(session_key):
for path in _webui_activity_paths(session_key, webui_dir):
try:
stat = path.stat()
except OSError:
@@ -231,10 +291,10 @@ def _latest_updated_at(stored: str | None, activity: str | None) -> str | None:
def _visible_message_timestamp(item: dict[str, Any]) -> str | None:
if is_hidden_history_message(item):
return None
if item.get("role") not in _VISIBLE_TRANSCRIPT_ROLES:
return None
if is_hidden_history_message(item):
return None
timestamp = item.get("timestamp")
return timestamp if isinstance(timestamp, str) else None
@@ -256,9 +316,9 @@ def _visible_activity_updated_at(
return _latest_updated_at(visible_message_at, webui_activity) or stored
def _indexed_row_for_session(session: Session, path: Path) -> dict[str, Any]:
def _indexed_row_for_session(session: Session, path: Path, webui_dir: Path) -> dict[str, Any]:
signature = _file_signature(path)
activity_signature = _webui_activity_signature(session.key)
activity_signature = _webui_activity_signature(session.key, webui_dir)
activity_updated_at = _webui_activity_updated_at(activity_signature)
visible_message_at = _last_visible_message_at(session.messages)
return {
@@ -272,6 +332,7 @@ def _indexed_row_for_session(session: Session, path: Path) -> dict[str, Any]:
"title": _metadata_title(session.metadata),
"preview": _preview_from_messages(session.messages),
_MODEL_PRESET_FIELD: model_preset_from_metadata(session.metadata),
**_indexed_workspace_scope_fields(session.metadata),
"file": path.name,
"mtime_ns": signature["mtime_ns"],
"size": signature["size"],
@@ -279,11 +340,16 @@ def _indexed_row_for_session(session: Session, path: Path) -> dict[str, Any]:
}
def _scan_session_row(session_manager: SessionManager, path: Path) -> dict[str, Any] | None:
def _scan_session_row(
session_manager: SessionManager,
path: Path,
webui_dir: Path,
) -> dict[str, Any] | None:
storage_key = SessionManager._session_key_from_path(path) # pyright: ignore[reportPrivateUsage]
if storage_key is None:
return None
try:
signature = _file_signature(path)
with open(path, encoding="utf-8") as f:
first_line = f.readline().strip()
if not first_line:
@@ -330,7 +396,6 @@ def _scan_session_row(session_manager: SessionManager, path: Path) -> dict[str,
continue
if not fallback_preview and item.get("role") == "assistant":
fallback_preview = text
signature = _file_signature(path)
created_at_s = data.get("created_at")
updated_at_s = data.get("updated_at")
if not created_at_s or not updated_at_s:
@@ -338,7 +403,8 @@ def _scan_session_row(session_manager: SessionManager, path: Path) -> dict[str,
created_at_s = created_at_s or fallback_time
updated_at_s = updated_at_s or fallback_time
key = data.get("key") or storage_key
activity_signature = _webui_activity_signature(key)
metadata = data.get("metadata", {})
activity_signature = _webui_activity_signature(key, webui_dir)
activity_updated_at = _webui_activity_updated_at(activity_signature)
return {
"key": key,
@@ -348,9 +414,10 @@ def _scan_session_row(session_manager: SessionManager, path: Path) -> dict[str,
visible_message_at,
activity_updated_at,
),
"title": _metadata_title(data.get("metadata", {})),
"title": _metadata_title(metadata),
"preview": preview or fallback_preview,
_MODEL_PRESET_FIELD: model_preset_from_metadata(data.get("metadata", {})),
_MODEL_PRESET_FIELD: model_preset_from_metadata(metadata),
**_indexed_workspace_scope_fields(metadata),
"file": path.name,
"mtime_ns": signature["mtime_ns"],
"size": signature["size"],
@@ -360,4 +427,4 @@ def _scan_session_row(session_manager: SessionManager, path: Path) -> dict[str,
repaired = session_manager._repair(storage_key) # pyright: ignore[reportPrivateUsage]
if repaired is None:
return None
return _indexed_row_for_session(repaired, path)
return _indexed_row_for_session(repaired, path, webui_dir)
-20
View File
@@ -1234,8 +1234,6 @@ def settings_payload(
"temperature": effective_preset.temperature,
"reasoning_effort": effective_preset.reasoning_effort,
"timezone": defaults.timezone,
"bot_name": defaults.bot_name,
"bot_icon": defaults.bot_icon,
"tool_hint_max_length": defaults.tool_hint_max_length,
},
"model_presets": model_presets,
@@ -1406,24 +1404,6 @@ def update_agent_settings(query: QueryParams) -> dict[str, Any]:
changed = True
restart_required = True
bot_name = _query_first_alias(query, "bot_name", "botName")
if bot_name is not None:
bot_name = bot_name.strip()
if not bot_name:
raise WebUISettingsError("bot_name is required")
if defaults.bot_name != bot_name:
defaults.bot_name = bot_name
changed = True
restart_required = True
bot_icon = _query_first_alias(query, "bot_icon", "botIcon")
if bot_icon is not None:
bot_icon = bot_icon.strip()
if defaults.bot_icon != bot_icon:
defaults.bot_icon = bot_icon
changed = True
restart_required = True
tool_hint_max_length = _query_first_alias(
query,
"tool_hint_max_length",
+131 -61
View File
@@ -28,7 +28,8 @@ WEBUI_TRANSCRIPT_SCHEMA_VERSION = 3
WEBUI_FORK_MARKER_EVENT = "fork_marker"
WEBUI_TRANSCRIPT_INCOMPLETE_KEY = "transcript_incomplete"
_MAX_TRANSCRIPT_FILE_BYTES = 8 * 1024 * 1024
_TARGET_ACTIVE_TRANSCRIPT_BYTES = _MAX_TRANSCRIPT_FILE_BYTES // 2
_ACTIVE_TRANSCRIPT_ROTATE_BYTES = 2 * 1024 * 1024
_TARGET_ACTIVE_TRANSCRIPT_BYTES = _ACTIVE_TRANSCRIPT_ROTATE_BYTES // 2
_TRANSCRIPT_SEGMENT_MANIFEST_VERSION = 2
_TRANSCRIPT_ACTIVE_CHUNK_ID = "active"
_TRANSCRIPT_SEGMENT_RE = re.compile(r"^\d{6}\.jsonl$")
@@ -284,12 +285,12 @@ def _normalize_manifest_entry(session_key: str, entry: Any) -> dict[str, Any] |
}
def _write_segment_manifest(session_key: str, segment_ids: list[str]) -> None:
def _write_segment_manifest(session_key: str, entries: list[dict[str, Any]]) -> None:
directory = webui_transcript_segments_dir(session_key)
directory.mkdir(parents=True, exist_ok=True)
data = {
"version": _TRANSCRIPT_SEGMENT_MANIFEST_VERSION,
"segments": [_segment_manifest_entry(session_key, segment_id) for segment_id in segment_ids],
"segments": entries,
}
path = _webui_transcript_manifest_path(session_key)
tmp_path = path.with_suffix(".json.tmp")
@@ -301,17 +302,14 @@ def _write_segment_manifest(session_key: str, segment_ids: list[str]) -> None:
raise
def _rebuild_segment_manifest(session_key: str) -> list[str]:
def _rebuild_segment_manifest(session_key: str) -> list[dict[str, Any]]:
segment_ids = _segment_ids_on_disk(session_key)
if segment_ids:
_write_segment_manifest(session_key, segment_ids)
entries = [_segment_manifest_entry(session_key, segment_id) for segment_id in segment_ids]
if entries:
_write_segment_manifest(session_key, entries)
else:
_webui_transcript_manifest_path(session_key).unlink(missing_ok=True)
return segment_ids
def _rebuilt_segment_manifest_entries(session_key: str) -> list[dict[str, Any]]:
return [_segment_manifest_entry(session_key, segment_id) for segment_id in _rebuild_segment_manifest(session_key)]
return entries
def _read_segment_manifest_entries(session_key: str) -> list[dict[str, Any]]:
@@ -320,7 +318,7 @@ def _read_segment_manifest_entries(session_key: str) -> list[dict[str, Any]]:
return []
path = _webui_transcript_manifest_path(session_key)
if not path.is_file():
return _rebuilt_segment_manifest_entries(session_key)
return _rebuild_segment_manifest(session_key)
try:
data = json.loads(path.read_text(encoding="utf-8"))
manifest = cast(dict[str, Any], data) if isinstance(data, dict) else None
@@ -330,18 +328,18 @@ def _read_segment_manifest_entries(session_key: str) -> list[dict[str, Any]]:
or manifest.get("version") != _TRANSCRIPT_SEGMENT_MANIFEST_VERSION
or not isinstance(raw_segments, list)
):
return _rebuilt_segment_manifest_entries(session_key)
return _rebuild_segment_manifest(session_key)
entries: list[dict[str, Any]] = []
for entry in cast(list[Any], raw_segments):
normalized = _normalize_manifest_entry(session_key, entry)
if normalized is None:
return _rebuilt_segment_manifest_entries(session_key)
return _rebuild_segment_manifest(session_key)
entries.append(normalized)
if [entry["id"] for entry in entries] != _segment_ids_on_disk(session_key):
return _rebuilt_segment_manifest_entries(session_key)
return _rebuild_segment_manifest(session_key)
return entries
except (OSError, json.JSONDecodeError, TypeError, AttributeError):
return _rebuilt_segment_manifest_entries(session_key)
return _rebuild_segment_manifest(session_key)
def _read_segment_ids(session_key: str) -> list[str]:
@@ -351,26 +349,40 @@ def _read_segment_ids(session_key: str) -> list[str]:
def _append_segment_turns(session_key: str, turns: list[list[dict[str, Any]]]) -> None:
if not turns:
return
segment_ids = _read_segment_ids(session_key)
next_id = int(segment_ids[-1]) + 1 if segment_ids else 1
entries = _read_segment_manifest_entries(session_key)
next_id = int(entries[-1]["id"]) + 1 if entries else 1
batch: list[list[dict[str, Any]]] = []
batch_bytes = 0
def write_batch() -> None:
nonlocal next_id
segment_id = f"{next_id:06d}"
path = _segment_file_path(session_key, segment_id)
_write_records_to_path(path, _flatten_turns(batch))
entries.append({
"id": segment_id,
"bytes": path.stat().st_size,
"turn_count": len(batch),
"user_count": sum(
1
for turn in batch
for row in turn
if _is_user_transcript_row(row)
),
})
next_id += 1
for turn in turns:
turn_bytes = _records_bytes(turn)
if batch and batch_bytes + turn_bytes > _MAX_TRANSCRIPT_FILE_BYTES:
segment_id = f"{next_id:06d}"
_write_records_to_path(_segment_file_path(session_key, segment_id), _flatten_turns(batch))
segment_ids.append(segment_id)
next_id += 1
write_batch()
batch = []
batch_bytes = 0
batch.append(turn)
batch_bytes += turn_bytes
if batch:
segment_id = f"{next_id:06d}"
_write_records_to_path(_segment_file_path(session_key, segment_id), _flatten_turns(batch))
segment_ids.append(segment_id)
_write_segment_manifest(session_key, segment_ids)
write_batch()
_write_segment_manifest(session_key, entries)
def _rotate_active_transcript_if_needed(session_key: str) -> None:
@@ -378,7 +390,7 @@ def _rotate_active_transcript_if_needed(session_key: str) -> None:
if not path.is_file():
return
try:
if path.stat().st_size <= _MAX_TRANSCRIPT_FILE_BYTES:
if path.stat().st_size <= _ACTIVE_TRANSCRIPT_ROTATE_BYTES:
return
except OSError:
return
@@ -426,6 +438,16 @@ def _read_chunk_turns(session_key: str, chunk_id: str) -> list[list[dict[str, An
return _split_transcript_turns(_read_transcript_file(path))
def _cached_chunk_turns(
session_key: str,
chunk_id: str,
turn_cache: dict[str, list[list[dict[str, Any]]]],
) -> list[list[dict[str, Any]]]:
if chunk_id not in turn_cache:
turn_cache[chunk_id] = _read_chunk_turns(session_key, chunk_id)
return turn_cache[chunk_id]
def _encode_page_cursor(before_turn_ordinal: int) -> str:
raw = json.dumps(
{"before_turn": before_turn_ordinal},
@@ -462,7 +484,10 @@ def _coerce_page_limit(limit: int | None) -> int:
return max(1, min(_MAX_TRANSCRIPT_PAGE_LIMIT, int(limit)))
def _chunk_turn_refs(session_key: str) -> list[_TranscriptChunkRef]:
def _chunk_turn_refs(
session_key: str,
turn_cache: dict[str, list[list[dict[str, Any]]]],
) -> list[_TranscriptChunkRef]:
_rotate_active_transcript_if_needed(session_key)
refs: list[_TranscriptChunkRef] = []
ordinal = 0
@@ -474,7 +499,11 @@ def _chunk_turn_refs(session_key: str) -> list[_TranscriptChunkRef]:
refs.append(_TranscriptChunkRef(chunk_id, ordinal, turn_count, int(entry["user_count"])))
ordinal += turn_count
if webui_transcript_path(session_key).is_file():
active_turns = _read_chunk_turns(session_key, _TRANSCRIPT_ACTIVE_CHUNK_ID)
active_turns = _cached_chunk_turns(
session_key,
_TRANSCRIPT_ACTIVE_CHUNK_ID,
turn_cache,
)
active_turn_count = len(active_turns)
if active_turn_count > 0:
refs.append(
@@ -492,6 +521,7 @@ def _count_user_messages_before_ordinal(
session_key: str,
chunks: list[_TranscriptChunkRef],
before_ordinal: int,
turn_cache: dict[str, list[list[dict[str, Any]]]],
) -> int:
total = 0
for chunk in chunks:
@@ -503,7 +533,7 @@ def _count_user_messages_before_ordinal(
if local_end >= chunk.turn_count:
total += chunk.user_count
continue
turns = _read_chunk_turns(session_key, chunk.chunk_id)
turns = _cached_chunk_turns(session_key, chunk.chunk_id, turn_cache)
total += sum(
1
for turn in turns[:local_end]
@@ -521,7 +551,8 @@ def _select_transcript_page(
_manifest_rebuilt: bool = False,
) -> tuple[list[dict[str, Any]], dict[str, Any]]:
page_limit = _coerce_page_limit(limit)
chunks = _chunk_turn_refs(session_key)
turn_cache: dict[str, list[list[dict[str, Any]]]] = {}
chunks = _chunk_turn_refs(session_key, turn_cache)
total_turns = sum(chunk.turn_count for chunk in chunks)
before_ordinal = _decode_page_cursor(before)
upper_ordinal = total_turns if before_ordinal is None else min(before_ordinal, total_turns)
@@ -534,7 +565,7 @@ def _select_transcript_page(
local_upper = min(chunk.turn_count, upper_ordinal - chunk.start_ordinal)
if local_upper <= 0:
continue
turns = _read_chunk_turns(session_key, chunk.chunk_id)
turns = _cached_chunk_turns(session_key, chunk.chunk_id, turn_cache)
if (
chunk.chunk_id != _TRANSCRIPT_ACTIVE_CHUNK_ID
and len(turns) != chunk.turn_count
@@ -585,6 +616,7 @@ def _select_transcript_page(
session_key,
chunks,
first_ref.ordinal,
turn_cache,
),
}
return lines, page
@@ -1182,19 +1214,18 @@ def _is_recoverable_answer_record(record: dict[str, Any]) -> bool:
}
def recover_incomplete_turns_from_session(
lines: list[dict[str, Any]],
session_messages: list[dict[str, Any]] | None,
*,
session_key: str,
) -> list[dict[str, Any]]:
"""Recover marked transcript answers only when one durable session turn matches."""
if not lines or not session_messages:
return lines
session_turns = _session_backfill_turns(session_key, session_messages)
if not session_turns:
return lines
def _needs_incomplete_turn_recovery(lines: list[dict[str, Any]]) -> bool:
return any(
record.get("event") == "turn_end"
and record.get(WEBUI_TRANSCRIPT_INCOMPLETE_KEY) is True
for record in lines
)
def _recover_incomplete_turns(
lines: list[dict[str, Any]],
session_turns: list[_SessionBackfillTurn],
) -> list[dict[str, Any]]:
recovered: list[dict[str, Any]] = []
for turn in _split_transcript_turns(lines):
turn_end = turn[-1] if turn else None
@@ -1244,6 +1275,21 @@ def recover_incomplete_turns_from_session(
return recovered
def recover_incomplete_turns_from_session(
lines: list[dict[str, Any]],
session_messages: list[dict[str, Any]] | None,
*,
session_key: str,
) -> list[dict[str, Any]]:
"""Recover marked transcript answers only when one durable session turn matches."""
if not lines or not session_messages or not _needs_incomplete_turn_recovery(lines):
return lines
session_turns = _session_backfill_turns(session_key, session_messages)
if not session_turns:
return lines
return _recover_incomplete_turns(lines, session_turns)
def _with_backfilled_user(
records: list[dict[str, Any]],
user_event: dict[str, Any],
@@ -1254,18 +1300,19 @@ def _with_backfilled_user(
return records
def inject_missing_user_events_from_session(
session_key: str,
lines: list[dict[str, Any]],
session_messages: list[dict[str, Any]] | None,
) -> list[dict[str, Any]]:
"""Backfill user rows for legacy WebUI transcripts that only stored assistant streams."""
if not lines or not session_messages:
return lines
session_turns = _session_backfill_turns(session_key, session_messages)
if not session_turns:
return lines
def _needs_user_event_backfill(lines: list[dict[str, Any]]) -> bool:
for turn in _split_transcript_turns(lines):
if any(record.get("event") == "user" for record in turn):
continue
if _transcript_turn_signature(turn):
return True
return False
def _inject_missing_user_events(
lines: list[dict[str, Any]],
session_turns: list[_SessionBackfillTurn],
) -> list[dict[str, Any]]:
out: list[dict[str, Any]] = []
session_cursor = 0
for turn in _split_transcript_turns(lines):
@@ -1280,6 +1327,20 @@ def inject_missing_user_events_from_session(
return out
def inject_missing_user_events_from_session(
session_key: str,
lines: list[dict[str, Any]],
session_messages: list[dict[str, Any]] | None,
) -> list[dict[str, Any]]:
"""Backfill user rows for legacy WebUI transcripts that only stored assistant streams."""
if not lines or not session_messages or not _needs_user_event_backfill(lines):
return lines
session_turns = _session_backfill_turns(session_key, session_messages)
if not session_turns:
return lines
return _inject_missing_user_events(lines, session_turns)
def _format_tool_call_trace(call: Any) -> str | None:
if not call or not isinstance(call, dict):
return None
@@ -2358,6 +2419,7 @@ def build_webui_thread_response(
augment_assistant_media: Callable[[list[str]], list[dict[str, Any]]] | None = None,
augment_assistant_text: Callable[[str], str] | None = None,
session_messages: list[dict[str, Any]] | None = None,
session_messages_loader: Callable[[], list[dict[str, Any]] | None] | None = None,
active_turn_started_at: float | None = None,
active_turn_id: str | None = None,
active_turn_transcript_persistence_failed: bool = False,
@@ -2374,12 +2436,20 @@ def build_webui_thread_response(
lines = _annotate_replay_identities(read_transcript_lines(session_key))
if not lines and active_turn_started_at is None:
return None
lines = inject_missing_user_events_from_session(session_key, lines, session_messages)
lines = recover_incomplete_turns_from_session(
lines,
session_messages,
session_key=session_key,
)
needs_user_backfill = _needs_user_event_backfill(lines)
needs_incomplete_recovery = _needs_incomplete_turn_recovery(lines)
if (
session_messages is None
and session_messages_loader is not None
and (needs_user_backfill or needs_incomplete_recovery)
):
session_messages = session_messages_loader()
if session_messages and (needs_user_backfill or needs_incomplete_recovery):
session_turns = _session_backfill_turns(session_key, session_messages)
if needs_user_backfill:
lines = _inject_missing_user_events(lines, session_turns)
if needs_incomplete_recovery:
lines = _recover_incomplete_turns(lines, session_turns)
lines = _ensure_replay_identities(lines)
fork_boundary = fork_boundary_message_count(lines)
msgs = replay_transcript_to_ui_messages(
+33 -10
View File
@@ -191,24 +191,47 @@ class WebUIWorkspaceController:
self._default_restrict_to_workspace,
)
def scope_for_session_key(self, session_key: str) -> WorkspaceScope:
if self._sessions is None:
return self.default_scope()
data = self._sessions.read_session_metadata(session_key)
session_data = data if data is not None else {}
metadata = session_data.get("metadata", {})
if not isinstance(metadata, dict) or WORKSPACE_SCOPE_METADATA_KEY not in metadata:
return self.default_scope()
metadata = cast(dict[str, Any], metadata)
def _scope_from_metadata_value(
self,
raw_scope: object,
*,
default_scope: WorkspaceScope | None = None,
) -> WorkspaceScope:
try:
return validate_workspace_scope_payload(
metadata.get(WORKSPACE_SCOPE_METADATA_KEY),
raw_scope,
default_workspace=self._default_workspace,
default_restrict_to_workspace=self._default_restrict_to_workspace,
source_channel=_WEBUI_SCOPE_CHANNEL,
)
except WorkspaceScopeError:
return default_scope if default_scope is not None else self.default_scope()
def scope_for_indexed_metadata(
self,
raw_scope: object,
*,
scope_present: bool,
default_scope: WorkspaceScope,
) -> WorkspaceScope:
"""Resolve a sidebar-only metadata snapshot without an authority-store read."""
if not scope_present:
return default_scope
return self._scope_from_metadata_value(raw_scope, default_scope=default_scope)
def scope_for_session_key(self, session_key: str) -> WorkspaceScope:
if self._sessions is None:
return self.default_scope()
data = self._sessions.read_session_metadata(session_key)
if not isinstance(data, dict):
return self.default_scope()
metadata = data.get("metadata", {})
if not isinstance(metadata, dict) or WORKSPACE_SCOPE_METADATA_KEY not in metadata:
return self.default_scope()
metadata_data = cast(dict[str, Any], metadata)
return self._scope_from_metadata_value(
cast(object, metadata_data.get(WORKSPACE_SCOPE_METADATA_KEY))
)
def payload(self, *, controls_available: bool) -> dict[str, Any]:
return workspaces_payload(
+64 -11
View File
@@ -27,6 +27,7 @@ from nanobot.command.builtin import builtin_command_palette
from nanobot.cron.session_turns import is_bound_cron_job
from nanobot.cron.types import CronJob, CronSchedule
from nanobot.runtime_context import public_history_messages
from nanobot.security.workspace_access import WorkspaceScope
from nanobot.triggers.local_types import LocalTrigger
from nanobot.utils.subagent_channel_display import scrub_subagent_messages_for_channel
from nanobot.webui.file_preview import (
@@ -38,6 +39,9 @@ from nanobot.webui.gateway_tokens import GatewayTokenStore, token_response_paylo
from nanobot.webui.http_utils import (
case_insensitive_header as _case_insensitive_header,
)
from nanobot.webui.http_utils import (
combined_list_header as _combined_list_header,
)
from nanobot.webui.http_utils import (
host_for_url as _host_for_url,
)
@@ -82,7 +86,11 @@ from nanobot.webui.session_automations import (
session_automation_jobs,
session_automations_payload,
)
from nanobot.webui.session_list_index import list_webui_sessions
from nanobot.webui.session_list_index import (
WEBUI_SESSION_INDEX_INTERNAL_FIELDS,
indexed_workspace_scope,
list_webui_sessions,
)
from nanobot.webui.sidebar_state import (
read_webui_sidebar_state,
write_webui_sidebar_state,
@@ -108,6 +116,30 @@ from nanobot.webui.workspaces import WebUIWorkspaceController
_SLOW_WEBUI_HTTP_LOG_MS = 1_000
_AUTOMATION_VALUES_HEADER = "X-Nanobot-Automation-Values"
# Fix for #5190: On Windows, mimetypes.guess_type() reads the registry key
# HKEY_CLASSES_ROOT\.js\Content Type, which is commonly set to 'text/plain'
# because .js is associated with Windows Script Host rather than web JavaScript.
# That registry value overrides Python's built-in mapping and causes browsers to
# reject ES module scripts with:
# Failed to load module script: Expected a JavaScript-or-Wasm module script
# but the server responded with a MIME type of "text/plain".
# We explicitly register correct MIME types for common web static assets here
# (module-import time) so all callers of mimetypes.guess_type() in this process
# benefit, regardless of host registry configuration.
_MIME_FIXES: dict[str, str] = {
".js": "application/javascript",
".mjs": "application/javascript",
".css": "text/css",
".html": "text/html",
".json": "application/json",
".svg": "image/svg+xml",
".wasm": "application/wasm",
}
for _ext, _ctype in _MIME_FIXES.items():
mimetypes.add_type(_ctype, _ext, strict=True)
if TYPE_CHECKING:
from nanobot.bus.queue import MessageBus
from nanobot.channels.websocket.runtime import WebSocketConfig
@@ -115,7 +147,6 @@ if TYPE_CHECKING:
from nanobot.session.manager import SessionManager
from nanobot.triggers.local_store import LocalTriggerStore
def _decode_api_key(raw_key: str) -> str | None:
key = unquote(raw_key)
_api_key_re = re.compile(r"^[A-Za-z0-9_:.-]{1,128}$")
@@ -422,7 +453,10 @@ class GatewayHTTPHandler:
if self.session_manager is None:
return _http_error(503, "session manager unavailable")
payload = await asyncio.to_thread(self._sessions_list_payload)
return _http_json_response(payload)
return _http_json_response(
payload,
accept_encoding=_combined_list_header(request.headers, "Accept-Encoding"),
)
def _sessions_list_payload(self) -> dict[str, Any]:
assert self.session_manager is not None
@@ -430,16 +464,28 @@ class GatewayHTTPHandler:
from nanobot.session.webui_turns import websocket_turn_wall_started_at
cleaned: list[dict[str, Any]] = []
default_scope: WorkspaceScope | None = None
for s in sessions:
key = s.get("key")
if not (isinstance(key, str) and key.startswith("websocket:")):
continue
row = {k: v for k, v in s.items() if k != "path"}
row = {
k: v
for k, v in s.items()
if k != "path" and k not in WEBUI_SESSION_INDEX_INTERNAL_FIELDS
}
chat_id = key.split(":", 1)[1]
started_at = websocket_turn_wall_started_at(chat_id)
if started_at is not None:
row["run_started_at"] = started_at
scope = self.workspaces.scope_for_session_key(key)
if default_scope is None:
default_scope = self.workspaces.default_scope()
scope_present, raw_scope = indexed_workspace_scope(s)
scope = self.workspaces.scope_for_indexed_metadata(
raw_scope,
scope_present=scope_present,
default_scope=default_scope,
)
row["workspace_scope"] = scope.payload()
cleaned.append(row)
return {"sessions": cleaned}
@@ -481,17 +527,21 @@ class GatewayHTTPHandler:
if not _is_websocket_channel_session_key(decoded_key):
return _http_error(404, "session not found")
scope = self.workspaces.scope_for_session_key(decoded_key)
session_messages: list[dict[str, Any]] | None = None
if self.session_manager is not None:
def load_session_messages() -> list[dict[str, Any]] | None:
if self.session_manager is None:
return None
session_data = self.session_manager.read_session_file(decoded_key)
raw_messages = session_data.get("messages") if isinstance(session_data, dict) else None
if isinstance(raw_messages, list):
if not isinstance(raw_messages, list):
return None
raw_session_messages = cast(list[Any], raw_messages)
session_messages = [
return [
cast(dict[str, Any], raw_message)
for raw_message in raw_session_messages
if isinstance(raw_message, dict)
]
query = _parse_query(request.path)
raw_limit = _query_first(query, "limit")
limit: int | None = None
@@ -524,7 +574,7 @@ class GatewayHTTPHandler:
text,
workspace_path=scope.project_path,
),
session_messages=session_messages,
session_messages_loader=load_session_messages,
active_turn_started_at=active_turn_started_at,
active_turn_id=active_turn_id,
active_turn_transcript_persistence_failed=(
@@ -537,7 +587,10 @@ class GatewayHTTPHandler:
if data is None:
return _http_error(404, "webui thread not found")
data["workspace_scope"] = scope.payload()
return _http_json_response(data)
return _http_json_response(
data,
accept_encoding=_combined_list_header(request.headers, "Accept-Encoding"),
)
def _handle_file_preview(self, request: WsRequest, key: str) -> Response:
if not self.check_api_token(request):
+2 -2
View File
@@ -24,7 +24,7 @@ license-files = [
dependencies = [
"typer>=0.20.0,<1.0.0",
"anthropic>=0.45.0,<1.0.0",
"anthropic>=0.100.0,<1.0.0",
"pydantic>=2.12.0,<3.0.0",
"pydantic-settings>=2.12.0,<3.0.0",
# Feishu's lark-oapi currently requires websockets<16; core supports 15 and 16.
@@ -51,7 +51,7 @@ dependencies = [
"filelock>=3.25.2",
"watchfiles>=1.1.1,<2.0.0",
"packaging>=24.0",
"tzdata>=2025.2; sys_platform == 'win32'",
"tzdata>=2025.2",
"defusedxml>=0.7.1,<1.0.0",
"pypdf>=5.0.0,<6.0.0",
"python-docx>=1.1.0,<2.0.0",
+52
View File
@@ -592,6 +592,58 @@ class TestPrepareSession:
assert summary is not None
assert "Cold summary." in summary
def test_cold_path_tolerates_malformed_last_active(self):
"""A malformed persisted last_active must not raise on the turn path.
prepare_session runs from _compact_session on every turn. Persisted
_last_summary can be hand-edited or written by another version, so a bad
last_active should degrade gracefully (mirror estimate_session_prompt_tokens
and _archive) instead of crashing the turn.
"""
ac = _make_autocompact(ttl=0)
fallback = datetime(2026, 1, 2, 3, 4, 5)
session = _make_session(
metadata={
"_last_summary": {"text": "Cold summary.", "last_active": "not-a-date"},
},
updated_at=fallback,
)
result_session, summary = ac.prepare_session(session, "cli:test")
assert result_session is session
assert summary is not None
assert "Cold summary." in summary
assert fallback.isoformat() in summary
def test_cold_path_tolerates_missing_last_active(self):
"""A _last_summary dict without last_active must not raise."""
ac = _make_autocompact(ttl=0)
fallback = datetime(2026, 1, 2, 3, 4, 5)
session = _make_session(
metadata={"_last_summary": {"text": "Cold summary."}},
updated_at=fallback,
)
result_session, summary = ac.prepare_session(session, "cli:test")
assert result_session is session
assert summary is not None
assert "Cold summary." in summary
assert fallback.isoformat() in summary
def test_cold_path_missing_text_returns_none(self):
"""A _last_summary without a non-empty string text yields no summary."""
ac = _make_autocompact()
session = _make_session(metadata={
"_last_summary": {"last_active": datetime(2026, 1, 1).isoformat()},
})
result_session, summary = ac.prepare_session(session, "cli:test")
assert result_session is session
assert summary is None
def test_no_summary_available_returns_none(self):
"""When no summary is available, should return (session, None)."""
ac = _make_autocompact()
+18
View File
@@ -579,3 +579,21 @@ def test_history_skips_non_dict_jsonl_lines(tmp_path: Path) -> None:
}]
next_cursor = memory.append_history("next", session_key="cli:t")
assert next_cursor == 2
def test_raw_archive_handles_none_timestamp_and_missing_role(tmp_path: Path) -> None:
"""raw_archive and _format_messages must safely format messages with None timestamp or missing role.
Prevents TypeError on NoneType[:16] slicing and KeyError on missing 'role'
when raw-dumping unconsolidated history entries without timestamps or role fields.
"""
memory = MemoryStore(tmp_path)
messages = [
{"content": "message with none timestamp", "timestamp": None, "role": "user"},
{"content": "message with int timestamp", "timestamp": 1720000000, "role": "assistant"},
{"content": "message with missing role", "timestamp": "2026-07-28T12:00:00"},
]
memory.raw_archive(messages, session_key="cli:test")
raw_history = memory.history_file.read_text(encoding="utf-8")
assert "[?] USER: message with none timestamp" in raw_history
assert "[1720000000] ASSISTANT: message with int timestamp" in raw_history
assert "[2026-07-28T12:00] UNKNOWN: message with missing role" in raw_history
+56
View File
@@ -55,6 +55,62 @@ class TestHandleStop:
out = await cmd_stop(ctx)
assert "No active task" in out.content
@pytest.mark.asyncio
async def test_close_mcp_cancels_active_turn_before_resources(self):
loop, _bus = _make_loop()
events: list[str] = []
async def active_turn():
try:
await asyncio.sleep(60)
except asyncio.CancelledError:
events.append("turn_cancelled")
raise
task = asyncio.create_task(active_turn())
await asyncio.sleep(0)
loop._active_tasks["test:c1"] = {task}
async def close_subagents():
events.append("resources_closed")
loop.subagents.close = close_subagents
loop._exec_session_manager.close_all = AsyncMock()
with patch("nanobot.agent.loop.agent_context.close_mcp", AsyncMock()):
await loop.close_mcp()
assert events == ["turn_cancelled", "resources_closed"]
assert task.cancelled()
@pytest.mark.asyncio
async def test_close_mcp_serializes_duplicate_cleanup(self):
loop, _bus = _make_loop()
entered = asyncio.Event()
release = asyncio.Event()
concurrent = 0
max_concurrent = 0
async def close_subagents():
nonlocal concurrent, max_concurrent
concurrent += 1
max_concurrent = max(max_concurrent, concurrent)
entered.set()
await release.wait()
concurrent -= 1
loop.subagents.close = close_subagents
loop._exec_session_manager.close_all = AsyncMock()
with patch("nanobot.agent.loop.agent_context.close_mcp", AsyncMock()):
first = asyncio.create_task(loop.close_mcp())
await entered.wait()
second = asyncio.create_task(loop.close_mcp())
await asyncio.sleep(0)
assert not second.done()
release.set()
await asyncio.gather(first, second)
assert max_concurrent == 1
@pytest.mark.asyncio
async def test_stop_cancels_active_task(self):
from nanobot.bus.events import InboundMessage
+66 -1
View File
@@ -2479,6 +2479,69 @@ def test_optional_features_payload_preserves_legacy_flat_feishu_config(monkeypat
assert "instances" not in saved
@pytest.mark.parametrize(
"index_url",
[
"",
"https://mirror.example/simple",
],
)
def test_enable_uses_uv_when_tool_environment_has_no_pip(
monkeypatch,
index_url,
):
from nanobot import optional_features
calls: list[list[str]] = []
call_envs: list[dict[str, str] | None] = []
def _run(
argv: list[str],
*,
env: dict[str, str] | None = None,
) -> subprocess.CompletedProcess[str]:
calls.append(argv)
call_envs.append(env)
if len(calls) == 1:
return subprocess.CompletedProcess(argv, 1, stdout="", stderr="No module named pip")
if argv[0] == "uv":
return subprocess.CompletedProcess(argv, 0, stdout="", stderr="")
return subprocess.CompletedProcess(
argv,
1,
stdout="",
stderr="No module named ensurepip",
)
monkeypatch.setattr("shutil.which", lambda name: "uv" if name == "uv" else None)
monkeypatch.setenv("HTTPS_PROXY", "http://proxy.example:8080")
monkeypatch.delenv("UV_INDEX_URL", raising=False)
if index_url:
monkeypatch.setenv("PIP_INDEX_URL", index_url)
else:
monkeypatch.delenv("PIP_INDEX_URL", raising=False)
assert optional_features.install_extra("feishu", ["lark-oapi>=1.5.0"], runner=_run).ok is True
assert calls == [
[sys.executable, "-m", "pip", "install", "lark-oapi>=1.5.0"],
[
"uv",
"pip",
"install",
"--python",
sys.executable,
"lark-oapi>=1.5.0",
],
]
assert call_envs[0] is None
assert call_envs[1] is not None
assert call_envs[1]["HTTPS_PROXY"] == "http://proxy.example:8080"
if index_url:
assert call_envs[1]["UV_INDEX_URL"] == index_url
else:
assert "UV_INDEX_URL" not in call_envs[1]
def test_enable_bootstraps_pip_with_ensurepip(monkeypatch):
from nanobot import optional_features
@@ -2490,6 +2553,8 @@ def test_enable_bootstraps_pip_with_ensurepip(monkeypatch):
return subprocess.CompletedProcess(argv, 1, stdout="", stderr="No module named pip")
return subprocess.CompletedProcess(argv, 0, stdout="", stderr="")
monkeypatch.setattr("shutil.which", lambda _name: None)
assert optional_features.install_extra("bedrock", None, runner=_run).ok is True
assert calls == [
[sys.executable, "-m", "pip", "install", "nanobot-ai[bedrock]"],
@@ -2558,7 +2623,7 @@ def test_optional_dependency_metadata_for_enable():
):
assert not any(dep.startswith(dep_name) for dep in required)
for dependency in (
"tzdata>=2025.2; sys_platform == 'win32'",
"tzdata>=2025.2",
"defusedxml>=0.7.1,<1.0.0",
"pypdf>=5.0.0,<6.0.0",
"python-docx>=1.1.0,<2.0.0",
+57
View File
@@ -1160,6 +1160,63 @@ def test_config_falls_back_to_vllm_when_ollama_not_configured():
assert config.get_api_base() == "http://localhost:8000"
def test_config_cloud_nemotron_is_not_hijacked_by_unconfigured_ollama():
"""`nvidia/nemotron-*` via a gateway must not route to Ollama when no
Ollama endpoint is configured. Ollama keeps "nemotron" in its keywords
for bare-model auto-routing (PR #1863), which previously hijacked
cloud-hosted nemotron variants and silently sent traffic to
http://localhost:11434/v1."""
config = Config.model_validate(
{
"agents": {
"defaults": {
"provider": "auto",
"model": "nvidia/nemotron-3-super-120b-a12b",
}
},
"providers": {"openrouter": {"apiKey": "sk-or-test"}},
}
)
assert config.get_provider_name() == "openrouter"
assert config.get_api_base() == "https://openrouter.ai/api/v1"
def test_config_bare_nemotron_still_auto_routes_to_configured_ollama():
"""Preserves PR #1863 intent: when the user has actually configured an
Ollama endpoint, a bare nemotron model still auto-routes there."""
config = Config.model_validate(
{
"agents": {"defaults": {"provider": "auto", "model": "nemotron-3-nano"}},
"providers": {"ollama": {"apiBase": "http://localhost:11434/v1"}},
}
)
assert config.get_provider_name() == "ollama"
assert config.get_api_base() == "http://localhost:11434/v1"
def test_config_cloud_nemotron_is_not_hijacked_by_configured_ollama():
"""An explicit cloud namespace takes precedence over local keywords."""
config = Config.model_validate(
{
"agents": {
"defaults": {
"provider": "auto",
"model": "nvidia/nemotron-3-super-120b-a12b",
}
},
"providers": {
"ollama": {"apiBase": "http://localhost:11434/v1"},
"openrouter": {"apiKey": "sk-or-test"},
},
}
)
assert config.get_provider_name() == "openrouter"
assert config.get_api_base() == "https://openrouter.ai/api/v1"
def test_openai_compat_provider_passes_model_through():
from nanobot.providers.openai_compat_provider import OpenAICompatProvider
+186
View File
@@ -0,0 +1,186 @@
"""Regression tests for gateway runtime resource teardown on stop.
Covers the lifecycle contract of ``_close_gateway_runtime``: runtime tasks
(including the agent loop and in-flight turns) are cancelled and awaited --
bounded -- before exec sessions, subagents, and MCP servers are closed, the
close is deterministic and idempotent, and a stuck or failing cleanup cannot
block the stop.
"""
import asyncio
import time
from contextlib import suppress
from nanobot.cli.gateway_runtime import _close_gateway_runtime
class _FakeAgent:
def __init__(self, events: list[str] | None = None) -> None:
self.close_calls = 0
self.events = events if events is not None else []
self.hang_on_close = False
self.raise_on_close = False
self.background: asyncio.Task[None] | None = None
async def close_mcp(self) -> None:
self.close_calls += 1
if self.hang_on_close:
await asyncio.sleep(3600)
if self.raise_on_close:
raise RuntimeError("cleanup exploded")
if self.background is not None:
await self.background
self.events.append("close_mcp")
class _FakeChannels:
def __init__(self) -> None:
self.stopped = 0
self.events: list[str] = []
async def stop_all(self) -> None:
self.stopped += 1
self.events.append("channels_stopped")
async def _cancellable_task(events: list[str]) -> None:
try:
await asyncio.sleep(3600)
except asyncio.CancelledError:
events.append("cancelled")
raise
async def _stubborn_task(events: list[str]) -> None:
"""Task that swallows cancellation and keeps running."""
try:
while True:
await asyncio.sleep(3600)
except asyncio.CancelledError:
events.append("swallowed")
await asyncio.sleep(3600)
async def test_runtime_tasks_cancelled_before_resources_closed() -> None:
events: list[str] = []
agent = _FakeAgent(events)
channels = _FakeChannels()
task = asyncio.create_task(_cancellable_task(events))
await asyncio.sleep(0) # let the task start (cancellation pre-start skips its body)
await _close_gateway_runtime(agent, channels, [task], None)
assert events == ["cancelled", "close_mcp"] # cancel happens before close
assert channels.stopped == 1
assert agent.close_calls == 1
assert task.cancelled()
async def test_pending_background_work_is_drained_before_close_returns() -> None:
agent = _FakeAgent()
channels = _FakeChannels()
done: dict[str, bool] = {"done": False}
async def background_work() -> None:
await asyncio.sleep(0.01)
done["done"] = True
agent.background = asyncio.create_task(background_work())
await _close_gateway_runtime(agent, channels, [], None)
assert done["done"] is True
assert agent.close_calls == 1
async def test_stubborn_task_does_not_block_past_wait_timeout() -> None:
agent = _FakeAgent()
channels = _FakeChannels()
events: list[str] = []
task = asyncio.create_task(_stubborn_task(events))
await asyncio.sleep(0) # let the task start (cancellation pre-start skips its body)
runtime_tasks = asyncio.gather(task)
start = time.monotonic()
await _close_gateway_runtime(
agent,
channels,
[task],
runtime_tasks,
task_wait_timeout=0.05,
)
elapsed = time.monotonic() - start
for _ in range(10):
await asyncio.sleep(0) # let the swallowed cancellation handler run
assert "swallowed" in events # task was cancelled, then refused to die
assert task.done() # the timed-out task received a second cancellation
assert runtime_tasks.done()
assert agent.close_calls == 1 # resources still closed underneath it
assert elapsed < 1.0 # bounded, not held open by the stubborn task
async def test_hanging_close_is_bounded_and_does_not_raise() -> None:
agent = _FakeAgent()
agent.hang_on_close = True
channels = _FakeChannels()
start = time.monotonic()
await _close_gateway_runtime(agent, channels, [], None, close_timeout=0.05)
elapsed = time.monotonic() - start
assert agent.close_calls == 1
assert channels.stopped == 1
assert elapsed < 1.0
async def test_failing_close_is_logged_but_shutdown_proceeds() -> None:
agent = _FakeAgent()
agent.raise_on_close = True
channels = _FakeChannels()
await _close_gateway_runtime(agent, channels, [], None)
assert agent.close_calls == 1
assert channels.stopped == 1 # teardown continued past the failure
async def test_duplicate_cleanup_is_idempotent() -> None:
agent = _FakeAgent()
channels = _FakeChannels()
task = asyncio.create_task(_cancellable_task([]))
await _close_gateway_runtime(agent, channels, [task], None)
await _close_gateway_runtime(agent, channels, [task], None)
assert agent.close_calls == 2 # second pass is a clean no-op
assert channels.stopped == 2
assert task.cancelled()
async def test_finished_runtime_tasks_gather_is_retrieved() -> None:
agent = _FakeAgent()
channels = _FakeChannels()
finished = asyncio.get_running_loop().create_future()
finished.set_result(None)
runtime_tasks = asyncio.gather(finished)
await asyncio.sleep(0) # let the gather observe the finished child
await _close_gateway_runtime(agent, channels, [], runtime_tasks)
assert runtime_tasks.done()
assert agent.close_calls == 1
async def test_cancelled_runtime_tasks_gather_does_not_raise() -> None:
agent = _FakeAgent()
channels = _FakeChannels()
runtime_tasks = asyncio.gather(asyncio.sleep(3600))
runtime_tasks.cancel()
await _close_gateway_runtime(agent, channels, [], runtime_tasks)
with suppress(asyncio.CancelledError):
await runtime_tasks # settle the cancelled gather without raising
assert runtime_tasks.done() # the cancelled gather was awaited without raising
assert agent.close_calls == 1
+30
View File
@@ -1,4 +1,8 @@
import json
import os
import subprocess
import sys
import textwrap
import warnings
import pytest
@@ -42,6 +46,32 @@ def test_agent_timezone_rejects_unknown_iana_name() -> None:
Config.model_validate({"agents": {"defaults": {"timezone": "Not/AZone"}}})
def test_agent_timezones_use_packaged_data_without_system_database() -> None:
script = textwrap.dedent(
"""\
from zoneinfo import TZPATH
from nanobot.config.schema import Config
assert not TZPATH
for name in ("UTC", "Asia/Shanghai"):
config = Config.model_validate({"agents": {"defaults": {"timezone": name}}})
serialized = config.model_dump(mode="json", by_alias=True)
restored = Config.model_validate(serialized)
assert restored.agents.defaults.timezone == name
"""
)
result = subprocess.run(
[sys.executable, "-c", script],
env=os.environ | {"PYTHONTZPATH": ""},
capture_output=True,
text=True,
check=False,
)
assert result.returncode == 0, result.stderr
def test_provider_api_type_accepts_exact_values_only() -> None:
config = Config.model_validate({
"providers": {
+138
View File
@@ -141,6 +141,33 @@ def test_add_job_accepts_valid_timezone(tmp_path) -> None:
assert job.state.next_run_at_ms is not None
@pytest.mark.parametrize("expr", [None, "", " "])
def test_add_job_rejects_missing_cron_expression(tmp_path, expr: str | None) -> None:
service = CronService(tmp_path / "cron" / "jobs.json")
with pytest.raises(ValueError, match="requires a non-empty 'expr'"):
service.add_job(
name="missing expression",
schedule=CronSchedule(kind="cron", expr=expr),
message="hello",
)
assert service.list_jobs(include_disabled=True) == []
def test_add_job_rejects_invalid_cron_expression_before_persisting(tmp_path) -> None:
service = CronService(tmp_path / "cron" / "jobs.json")
with pytest.raises(ValueError, match="invalid cron expression"):
service.add_job(
name="bad expression",
schedule=CronSchedule(kind="cron", expr="not a cron expression"),
message="hello",
)
assert service.list_jobs(include_disabled=True) == []
def test_write_run_record_uses_cron_runs_dir(tmp_path) -> None:
service = CronService(tmp_path / "cron" / "jobs.json")
@@ -600,6 +627,117 @@ async def test_run_job_preserves_running_service_state(tmp_path) -> None:
service.stop()
@pytest.mark.asyncio
async def test_manual_run_persists_completion_when_callback_lists_jobs(tmp_path) -> None:
store_path = tmp_path / "cron" / "jobs.json"
async def on_job(_job) -> None:
service.list_jobs(include_disabled=True)
await asyncio.sleep(0)
service = CronService(store_path, on_job=on_job)
job = service.add_job(
name="manual",
schedule=CronSchedule(kind="every", every_ms=60_000),
message="hello",
**_bound_chat(),
)
assert await service.run_job(job.id) is True
state = json.loads(store_path.read_text())["jobs"][0]["state"]
assert state["lastStatus"] == "ok"
assert state["lastError"] is None
assert len(state["runHistory"]) == 1
assert state["runHistory"][0]["status"] == "ok"
@pytest.mark.asyncio
async def test_overlapping_manual_runs_preserve_stopped_service_state(tmp_path) -> None:
store_path = tmp_path / "cron" / "jobs.json"
entered = [asyncio.Event(), asyncio.Event()]
release = [asyncio.Event(), asyncio.Event()]
call_count = 0
async def on_job(_job) -> None:
nonlocal call_count
call_index = call_count
call_count += 1
entered[call_index].set()
await release[call_index].wait()
service = CronService(store_path, on_job=on_job)
jobs = [
service.add_job(
name=f"manual-{index}",
schedule=CronSchedule(kind="every", every_ms=60_000),
message="hello",
**_bound_chat(str(index)),
)
for index in range(2)
]
first = asyncio.create_task(service.run_job(jobs[0].id))
await entered[0].wait()
second = asyncio.create_task(service.run_job(jobs[1].id))
try:
await entered[1].wait()
release[0].set()
assert await first is True
assert service._running is False
release[1].set()
assert await second is True
assert service._running is False
assert service._timer_task is None
states = {
item["name"]: item["state"]
for item in json.loads(store_path.read_text())["jobs"]
}
assert states["manual-0"]["lastStatus"] == "ok"
assert states["manual-1"]["lastStatus"] == "ok"
finally:
release[0].set()
release[1].set()
await asyncio.gather(first, second, return_exceptions=True)
service.stop()
@pytest.mark.asyncio
async def test_manual_run_does_not_restart_service_stopped_during_execution(tmp_path) -> None:
store_path = tmp_path / "cron" / "jobs.json"
entered = asyncio.Event()
release = asyncio.Event()
async def on_job(_job) -> None:
entered.set()
await release.wait()
service = CronService(store_path, on_job=on_job)
job = service.add_job(
name="manual-stop",
schedule=CronSchedule(kind="every", every_ms=60_000),
message="hello",
**_bound_chat(),
)
await service.start()
run = asyncio.create_task(service.run_job(job.id))
try:
await entered.wait()
service.stop()
release.set()
assert await run is True
assert service._running is False
assert service._timer_task is None
finally:
release.set()
await asyncio.gather(run, return_exceptions=True)
service.stop()
@pytest.mark.asyncio
async def test_running_service_honors_external_disable(tmp_path) -> None:
store_path = tmp_path / "cron" / "jobs.json"
+72 -8
View File
@@ -4,6 +4,8 @@ from __future__ import annotations
from unittest.mock import patch
import pytest
from nanobot.providers.anthropic_provider import AnthropicProvider
@@ -65,17 +67,24 @@ def test_none_does_not_enable_thinking() -> None:
assert kw["temperature"] == 0.7
def test_empty_effort_does_not_enable_thinking() -> None:
kw = _build(_make_provider(), "")
assert "thinking" not in kw
assert kw["temperature"] == 0.7
def test_opus_4_7_omits_temperature_adaptive() -> None:
kw = _build(_make_provider("claude-opus-4-7"), "adaptive")
assert "temperature" not in kw
assert kw["thinking"] == {"type": "adaptive"}
def test_opus_4_7_omits_temperature_enabled() -> None:
"""Enabled thinking (high) must also omit temperature for opus-4-7."""
def test_opus_4_7_high_uses_adaptive_effort() -> None:
kw = _build(_make_provider("claude-opus-4-7"), "high", max_tokens=4096)
assert "temperature" not in kw
assert kw["thinking"]["type"] == "enabled"
assert kw["thinking"] == {"type": "adaptive"}
assert kw["output_config"] == {"effort": "high"}
assert kw["max_tokens"] == 4096
def test_opus_4_7_omits_temperature_none() -> None:
@@ -90,9 +99,11 @@ def test_opus_4_8_omits_temperature_adaptive() -> None:
assert "temperature" not in kw
def test_opus_4_8_omits_temperature_enabled() -> None:
def test_opus_4_8_high_uses_adaptive_effort() -> None:
kw = _build(_make_provider("claude-opus-4-8"), "high", max_tokens=4096)
assert "temperature" not in kw
assert kw["thinking"] == {"type": "adaptive"}
assert kw["output_config"] == {"effort": "high"}
def test_opus_4_8_omits_temperature_none() -> None:
@@ -105,9 +116,11 @@ def test_fable_omits_temperature_adaptive() -> None:
assert "temperature" not in kw
def test_fable_omits_temperature_enabled() -> None:
def test_fable_high_uses_adaptive_effort() -> None:
kw = _build(_make_provider("claude-fable-5"), "high", max_tokens=4096)
assert "temperature" not in kw
assert kw["thinking"] == {"type": "adaptive"}
assert kw["output_config"] == {"effort": "high"}
def test_fable_omits_temperature_none() -> None:
@@ -121,16 +134,67 @@ def test_sonnet_5_omits_temperature_adaptive() -> None:
assert kw["thinking"] == {"type": "adaptive"}
def test_sonnet_5_omits_temperature_enabled() -> None:
def test_sonnet_5_high_uses_adaptive_effort() -> None:
kw = _build(_make_provider("claude-sonnet-5"), "high", max_tokens=4096)
assert "temperature" not in kw
assert kw["thinking"]["type"] == "enabled"
assert kw["thinking"] == {"type": "adaptive"}
assert kw["output_config"] == {"effort": "high"}
def test_sonnet_5_omits_temperature_none() -> None:
kw = _build(_make_provider("anthropic/claude-sonnet-5"), None)
kw = _build(_make_provider("anthropic/claude-sonnet-5"), "none")
assert "temperature" not in kw
assert kw["thinking"] == {"type": "disabled"}
assert "output_config" not in kw
def test_mythos_preview_omits_temperature_but_keeps_manual_budget() -> None:
kw = _build(_make_provider("claude-mythos-preview"), "high", max_tokens=4096)
assert "temperature" not in kw
assert kw["thinking"] == {"type": "enabled", "budget_tokens": 8192}
assert "output_config" not in kw
@pytest.mark.parametrize(
"reasoning_effort", [None, "none", "adaptive", "low", "medium", "high", "xhigh", "max"]
)
def test_opus_5_omits_temperature(reasoning_effort: str | None) -> None:
kw = _build(_make_provider("claude-opus-5"), reasoning_effort)
assert "temperature" not in kw
def test_opus_5_none_disables_default_thinking() -> None:
kw = _build(_make_provider("claude-opus-5"), "none")
assert kw["thinking"] == {"type": "disabled"}
assert "output_config" not in kw
def test_opus_5_unset_preserves_provider_default() -> None:
kw = _build(_make_provider("claude-opus-5"), None)
assert "thinking" not in kw
assert "output_config" not in kw
@pytest.mark.parametrize("reasoning_effort", ["low", "medium", "high", "xhigh", "max"])
def test_opus_5_uses_adaptive_thinking_with_effort(reasoning_effort: str) -> None:
kw = _build(_make_provider("claude-opus-5"), reasoning_effort, max_tokens=4096)
assert kw["thinking"] == {"type": "adaptive"}
assert kw["output_config"] == {"effort": reasoning_effort}
assert kw["max_tokens"] == 4096
def test_dated_opus_5_model_uses_family_capabilities() -> None:
kw = _build(_make_provider("claude-opus-5-20260724"), "medium")
assert "temperature" not in kw
assert kw["thinking"] == {"type": "adaptive"}
assert kw["output_config"] == {"effort": "medium"}
def test_dated_opus_4_model_does_not_treat_date_as_minor_version() -> None:
kw = _build(_make_provider("claude-opus-4-20250514"), "high")
assert kw["temperature"] == 1.0
assert kw["thinking"] == {"type": "enabled", "budget_tokens": 8192}
assert "output_config" not in kw
def test_ordinary_model_sends_temperature() -> None:
+71
View File
@@ -0,0 +1,71 @@
"""Tests for the Eden AI provider registration."""
from unittest.mock import patch
from nanobot.config.schema import Config, ProvidersConfig
from nanobot.providers.openai_compat_provider import OpenAICompatProvider
from nanobot.providers.registry import PROVIDERS, find_by_name
def test_edenai_config_field_exists() -> None:
assert hasattr(ProvidersConfig(), "edenai")
def test_edenai_registry_contract() -> None:
specs = {spec.name: spec for spec in PROVIDERS}
assert "edenai" in specs
edenai = specs["edenai"]
assert edenai.backend == "openai_compat"
assert edenai.env_key == "EDENAI_API_KEY"
assert edenai.display_name == "Eden AI"
assert edenai.is_gateway is True
assert edenai.detect_by_base_keyword == "edenai"
assert edenai.default_api_base == "https://api.edenai.run/v3"
assert edenai.strip_model_prefix is False
# Eden accepts OpenAI's top-level reasoning_effort parameter. Do not add
# OpenRouter's separate {"reasoning": {"effort": ...}} request shape.
assert edenai.gateway_reasoning_style == ""
def test_edenai_forced_provider_uses_default_api_base() -> None:
config = Config.model_validate(
{
"providers": {"edenai": {"apiKey": "eden-key"}},
"agents": {
"defaults": {
"provider": "edenai",
"model": "anthropic/claude-sonnet-4-5",
}
},
}
)
model = "anthropic/claude-sonnet-4-5"
assert config.get_provider_name(model) == "edenai"
assert config.get_api_key(model) == "eden-key"
assert config.get_api_base(model) == "https://api.edenai.run/v3"
def test_edenai_preserves_model_id_and_reasoning_effort() -> None:
spec = find_by_name("edenai")
with patch("nanobot.providers.openai_compat_provider.AsyncOpenAI"):
provider = OpenAICompatProvider(
api_key="eden-key",
default_model="anthropic/claude-sonnet-4-5",
spec=spec,
)
kwargs = provider._build_kwargs(
messages=[{"role": "user", "content": "hi"}],
tools=None,
model="anthropic/claude-sonnet-4-5",
max_tokens=1024,
temperature=0.7,
reasoning_effort="medium",
tool_choice=None,
)
assert kwargs["model"] == "anthropic/claude-sonnet-4-5"
assert kwargs["reasoning_effort"] == "medium"
assert "reasoning" not in kwargs.get("extra_body", {})
+8 -8
View File
@@ -464,7 +464,7 @@ async def test_gemini_flash_forwards_aspect_ratio_and_image_size() -> None:
image_size="2K",
)
image_config = fake.calls[0]["json"]["generationConfig"]["responseFormat"]["image"]
image_config = fake.calls[0]["json"]["generationConfig"]["imageConfig"]
assert image_config == {"aspectRatio": "16:9", "imageSize": "2K"}
@@ -480,7 +480,7 @@ async def test_gemini_flash_2_5_drops_image_size() -> None:
image_size="1K",
)
image_config = fake.calls[0]["json"]["generationConfig"]["responseFormat"]["image"]
image_config = fake.calls[0]["json"]["generationConfig"]["imageConfig"]
assert image_config == {"aspectRatio": "4:3"}
@@ -496,7 +496,7 @@ async def test_gemini_flash_2_0_drops_image_size() -> None:
image_size="1K",
)
image_config = fake.calls[0]["json"]["generationConfig"]["responseFormat"]["image"]
image_config = fake.calls[0]["json"]["generationConfig"]["imageConfig"]
assert image_config == {"aspectRatio": "16:9"}
@@ -524,8 +524,8 @@ async def test_gemini_flash_scopes_extreme_aspect_ratios_by_model(
aspect_ratio=aspect_ratio,
)
response_format = fake.calls[0]["json"]["generationConfig"].get("responseFormat")
assert response_format == ({"image": expected} if expected else None)
image_config = fake.calls[0]["json"]["generationConfig"].get("imageConfig")
assert image_config == expected
@pytest.mark.parametrize(
@@ -553,8 +553,8 @@ async def test_gemini_flash_scopes_image_size_by_model(
image_size=image_size,
)
response_format = fake.calls[0]["json"]["generationConfig"].get("responseFormat")
assert response_format == ({"image": expected} if expected else None)
image_config = fake.calls[0]["json"]["generationConfig"].get("imageConfig")
assert image_config == expected
@pytest.mark.asyncio
@@ -571,7 +571,7 @@ async def test_gemini_flash_ignores_unsupported_hints() -> None:
image_size="1024x1024",
)
assert "responseFormat" not in fake.calls[0]["json"]["generationConfig"]
assert "imageConfig" not in fake.calls[0]["json"]["generationConfig"]
@pytest.mark.asyncio
+138
View File
@@ -150,6 +150,51 @@ class TestConvertMessages:
assert items[0]["content"][0]["type"] == "output_text"
assert items[0]["content"][0]["text"] == "I'll help"
def test_preserves_deepseek_reasoning_content(self):
_, items = convert_messages([
{"role": "assistant", "reasoning_content": "think first", "content": "answer"},
], preserve_reasoning=True)
assert items == [
{
"type": "reasoning",
"content": [{"type": "output_text", "text": "think first"}],
},
{
"type": "message",
"role": "assistant",
"content": [{"type": "output_text", "text": "answer"}],
"status": "completed",
"id": "msg_0",
},
]
def test_reasoning_content_serialized_as_array_for_deepseek(self):
# Regression for PR #5214: DeepSeek's Responses gateway rejects
# reasoning items whose ``content`` is a plain string with
# "input: invalid type: string ..., expected a sequence" (observed
# after context consolidation cleared provider state and forced
# full-history conversion). ``content`` must be a list of parts,
# matching both the OpenAI Responses schema and DeepSeek's accepted
# wire shape.
_, items = convert_messages([
{
"role": "assistant",
"reasoning_content": "Michael topped up DeepSeek with $10.",
"content": "",
"tool_calls": [{
"id": "call_1|fc_1",
"function": {"name": "list_dir", "arguments": "{}"},
}],
},
], preserve_reasoning=True)
assert items[0]["type"] == "reasoning"
assert items[0]["content"] == [
{"type": "output_text", "text": "Michael topped up DeepSeek with $10."},
]
assert items[1]["type"] == "function_call"
def test_assistant_empty_content_skipped(self):
_, items = convert_messages([{"role": "assistant", "content": ""}])
assert len(items) == 0
@@ -539,6 +584,22 @@ class TestParseResponseOutput:
assert result.content == "42"
assert result.reasoning_content == "I think therefore I am."
def test_deepseek_reasoning_content_extracted(self):
resp = {
"output": [
{"type": "reasoning", "content": "think first"},
{"type": "message", "content": [
{"type": "output_text", "text": "answer"},
]},
],
"status": "completed", "usage": {},
}
result = parse_response_output(resp)
assert result.content == "answer"
assert result.reasoning_content == "think first"
def test_empty_output(self):
resp = {"output": [], "status": "completed", "usage": {}}
result = parse_response_output(resp)
@@ -792,6 +853,59 @@ class TestResponsesConversationState:
}
assert "lossy public transcript" not in str(items)
def test_replayed_and_delta_reasoning_items_keep_array_content(self):
# Regression for PR #5214: token consolidation clears
# ``provider_state``, so the next turn converts the full history
# (including assistant reasoning) instead of replaying server items.
# Both paths must keep reasoning ``content`` as a list - DeepSeek's
# Responses gateway rejects the string form with a serde error.
prior_items = [
{
"type": "reasoning",
"id": "rs_1",
"content": [{"type": "output_text", "text": "prior reasoning"}],
},
{
"type": "message",
"role": "assistant",
"content": [{"type": "output_text", "text": "prior answer"}],
"status": "completed",
"id": "msg_0",
},
]
state = build_responses_state(
provider="openai:test",
model="deepseek-v4-flash",
input_items=prior_items,
output_items=[],
).with_pending_messages([
{
"role": "assistant",
"reasoning_content": "think before acting",
"content": "answer",
},
{"role": "user", "content": "audit the tools"},
])
instructions, items, replayed = prepare_responses_input(
[
{"role": "system", "content": "You are KITT."},
{"role": "user", "content": "audit the tools"},
],
state=state,
provider="openai:test",
model="deepseek-v4-flash",
preserve_reasoning=True,
)
assert instructions == "You are KITT."
assert replayed is True
reasoning_items = [item for item in items if item.get("type") == "reasoning"]
assert len(reasoning_items) == 2 # one replayed, one converted delta
for item in reasoning_items:
assert isinstance(item["content"], list)
assert item["content"][0]["type"] == "output_text"
# ======================================================================
# parsing - consume_sse
@@ -1633,6 +1747,30 @@ class TestConsumeSdkStream:
_, _, _, _, reasoning = await consume_sdk_stream(stream())
assert reasoning == "thinking..."
@pytest.mark.asyncio
async def test_deepseek_reasoning_text_streamed(self):
events = [
MagicMock(type="response.reasoning_text.delta", delta="step 1 "),
MagicMock(type="response.reasoning_text.delta", delta="step 2"),
MagicMock(type="response.reasoning_text.done", text="step 1 step 2"),
]
emitted: list[str] = []
async def stream():
for event in events:
yield event
async def on_reasoning_delta(delta: str) -> None:
emitted.append(delta)
_, _, _, _, reasoning = await consume_sdk_stream(
stream(),
on_reasoning_delta=on_reasoning_delta,
)
assert reasoning == "step 1 step 2"
assert emitted == ["step 1 ", "step 2"]
@pytest.mark.asyncio
async def test_error_event_raises(self):
ev = MagicMock(type="error", error="rate_limit_exceeded")
@@ -10,6 +10,7 @@ from nanobot.providers.openai_compat_provider import (
_RESPONSES_PROBE_INTERVAL_S,
OpenAICompatProvider,
)
from nanobot.providers.openai_responses.state import build_responses_state
@pytest.fixture()
@@ -29,6 +30,32 @@ def test_responses_api_available_by_default(provider):
assert provider._should_use_responses_api("gpt-5", None) is True
def test_deepseek_v4_flash_uses_responses_by_model(provider):
provider._spec = type("Spec", (), {
"name": "deepseek",
"responses_models": ("deepseek-v4-flash",),
"strip_model_prefix": False,
"strip_model_prefixes": (),
})()
provider._effective_base = "https://api.deepseek.com"
provider.default_model = "deepseek-v4-flash"
assert provider._should_use_responses_api("deepseek-v4-flash", None) is True
assert provider._should_use_responses_api("deepseek-v4-pro", None) is False
def test_deepseek_v4_flash_matches_provider_prefixed_model(provider):
provider._spec = type("Spec", (), {
"name": "deepseek",
"responses_models": ("deepseek-v4-flash",),
"strip_model_prefix": False,
"strip_model_prefixes": (),
})()
provider._effective_base = "https://api.deepseek.com"
assert provider._should_use_responses_api("deepseek/deepseek-v4-flash", None) is True
def test_direct_openai_enables_server_compaction(provider):
provider._extra_body = {}
@@ -124,3 +151,140 @@ def test_reasoning_effort_key_is_case_insensitive(provider):
for _ in range(_RESPONSES_FAILURE_THRESHOLD):
provider._record_responses_failure("o3", "High")
assert provider._should_use_responses_api("o3", "high") is False
# ======================================================================
# _should_fallback_from_responses_error
# ======================================================================
class _FakeAPIError(Exception):
def __init__(self, status_code, body):
super().__init__(str(body))
self.status_code = status_code
self.body = body
self.response = None
def test_serde_deserialize_error_does_not_trigger_fallback():
# Serde errors can also identify malformed user-provided request fields.
# The known DeepSeek wire-shape bug is fixed at serialization time instead.
err = _FakeAPIError(400, {
"message": (
"Failed to deserialize the JSON body into the target type: "
"input: invalid type: string \"Michael topped up DeepSeek ...\", "
"expected a sequence at line 1 column 268612"
),
"type": "invalid_request_error",
"param": None,
})
assert OpenAICompatProvider._should_fallback_from_responses_error(err) is False
def test_legacy_compatibility_markers_still_trigger_fallback():
err = _FakeAPIError(400, "parameter `instructions` is unsupported")
assert OpenAICompatProvider._should_fallback_from_responses_error(err) is True
# ======================================================================
# DeepSeek Responses wire shape (PR #5214 root cause)
# ======================================================================
def _deepseek_provider(provider):
provider._spec = type("Spec", (), {
"name": "deepseek",
"responses_models": ("deepseek-v4-flash",),
"strip_model_prefix": False,
"strip_model_prefixes": (),
})()
provider._effective_base = "https://api.deepseek.com"
provider.default_model = "deepseek-v4-flash"
provider._extra_body = {}
return provider
def test_deepseek_full_history_body_keeps_reasoning_content_as_array(provider):
# Full-history fixture: DeepSeek's Responses gateway rejects reasoning
# items whose ``content`` is a plain string ("input: invalid type: string
# ..., expected a sequence"); the wire body must keep it as a part list.
_deepseek_provider(provider)
body = provider._build_responses_body(
messages=[
{
"role": "assistant",
"reasoning_content": "Michael topped up DeepSeek with $10.",
"content": "All systems aligned now.",
},
{"role": "user", "content": "audit the custom tools"},
],
tools=None,
model="deepseek-v4-flash",
max_tokens=1000,
temperature=0.1,
reasoning_effort=None,
tool_choice=None,
)
reasoning_items = [item for item in body["input"] if item.get("type") == "reasoning"]
assert len(reasoning_items) == 1
assert reasoning_items[0]["content"] == [
{"type": "output_text", "text": "Michael topped up DeepSeek with $10."},
]
def test_deepseek_replay_body_keeps_reasoning_content_as_array(provider):
# Replay/consolidation fixture: after token consolidation clears
# provider_state the next turn converts full history on top of the
# replayed prior items. Both replayed and converted reasoning items must
# keep list content on the wire.
_deepseek_provider(provider)
prior_items = [
{
"type": "reasoning",
"id": "rs_1",
"content": [{"type": "output_text", "text": "prior reasoning"}],
},
{
"type": "message",
"role": "assistant",
"content": [{"type": "output_text", "text": "prior answer"}],
"status": "completed",
"id": "msg_0",
},
]
state = build_responses_state(
provider=provider._responses_state_provider(),
model="deepseek-v4-flash",
input_items=prior_items,
output_items=[],
).with_pending_messages([
{
"role": "assistant",
"reasoning_content": "think first",
"content": "answer",
},
{"role": "user", "content": "audit the custom tools"},
])
body = provider._build_responses_body(
messages=[
{"role": "system", "content": "You are KITT."},
{"role": "user", "content": "audit the custom tools"},
],
tools=None,
model="deepseek-v4-flash",
max_tokens=1000,
temperature=0.1,
reasoning_effort=None,
tool_choice=None,
provider_context=ProviderCallContext(conversation_state=state),
)
reasoning_items = [item for item in body["input"] if item.get("type") == "reasoning"]
assert len(reasoning_items) == 2 # one replayed from state, one converted
for item in reasoning_items:
assert isinstance(item["content"], list)
assert item["content"][0]["type"] == "output_text"
+48
View File
@@ -16,11 +16,13 @@ from nanobot.agent import context as agent_context
from nanobot.agent.loop import AgentLoop
from nanobot.agent.tools.context import RequestContext, bind_request_context, reset_request_context
from nanobot.agent.tools.exec_session import (
MAX_OUTPUT_CHARS,
ExecSessionManager,
ListExecSessionsTool,
WriteStdinTool,
_BoundedOutputBuffer,
_SessionPoll,
_truncate_output,
)
from nanobot.agent.tools.registry import is_tool_error_result
from nanobot.agent.tools.shell import ExecTool
@@ -227,6 +229,52 @@ def test_write_stdin_wait_for_keeps_aggregate_within_output_budget():
assert len(result) < 1100
def test_write_stdin_wait_for_searches_before_response_truncation():
async def run() -> tuple[str, list[int]]:
output = "A" * 1500 + "TARGET" + "B" * 1500
observed_limits: list[int] = []
async def write(
*,
session_id: str,
chars: str | None,
close_stdin: bool,
terminate: bool,
yield_time_ms: int,
max_output_chars: int,
owner_session_key: str | None,
) -> _SessionPoll:
del session_id, chars, close_stdin, terminate, yield_time_ms, owner_session_key
observed_limits.append(max_output_chars)
visible, truncated = _truncate_output(output, max_output_chars)
return _SessionPoll(
output=visible,
done=True,
exit_code=0,
truncated_chars=truncated,
)
manager = SimpleNamespace(write=AsyncMock(side_effect=write))
tool = WriteStdinTool(manager=manager)
result = await tool._wait_for_output(
session_id="session",
chars=None,
close_stdin=False,
terminate=False,
wait_for="TARGET",
wait_timeout_ms=1000,
max_output_chars=1000,
)
return result, observed_limits
result, observed_limits = asyncio.run(run())
assert observed_limits == [MAX_OUTPUT_CHARS]
assert "Wait target not observed" not in result
assert "(2,006 chars truncated from output)" in result
assert len(result) < 1100
def test_exec_one_shot_accepts_max_output_tokens_alias(tmp_path):
async def run() -> str:
tool = ExecTool(working_dir=str(tmp_path), timeout=5)
+33
View File
@@ -150,6 +150,36 @@ def test_enqueue_writes_trigger_run_record(tmp_path: Path) -> None:
assert record["content"] == "Review PR #4591"
assert record["origin_metadata"] == {"webui": True}
assert record["updated_at_ms"] > 0
stored = store.get(trigger.id)
assert stored is not None
assert stored.last_message == "Review PR #4591"
def test_enqueue_rolls_back_delivery_and_audit_when_trigger_save_fails(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
store = LocalTriggerStore(tmp_path)
trigger = store.create(
name="PR review",
channel="websocket",
chat_id="chat-1",
session_key="websocket:chat-1",
)
def fail_save(_triggers: list[LocalTrigger]) -> None:
raise OSError("store write failed")
monkeypatch.setattr(store, "_save_triggers_unlocked", fail_save)
with pytest.raises(OSError, match="store write failed"):
store.enqueue(trigger.id, "Review PR #4591")
assert list(store.inbox_dir.glob("*.json")) == []
assert list(store.runs_dir.glob("*.json")) == []
stored = LocalTriggerStore(tmp_path).get(trigger.id)
assert stored is not None
assert stored.last_message == ""
def test_delivery_run_record_truncates_large_content_and_response(tmp_path: Path) -> None:
@@ -168,6 +198,9 @@ def test_delivery_run_record_truncates_large_content_and_response(tmp_path: Path
assert queued_record["content"].startswith("content-")
assert queued_record["content"].endswith("\n... (truncated)")
assert len(queued_record["content"]) < len(large_content)
stored = store.get(trigger.id)
assert stored is not None
assert stored.last_message == queued_record["content"]
store.write_delivery_run_record(
delivery,
+1
View File
@@ -13,6 +13,7 @@ from nanobot.webui.transcript import (
def test_delete_webui_thread_removes_legacy_json_and_transcript(tmp_path, monkeypatch) -> None:
monkeypatch.setattr("nanobot.config.paths.get_data_dir", lambda: tmp_path)
monkeypatch.setattr("nanobot.webui.transcript._MAX_TRANSCRIPT_FILE_BYTES", 520)
monkeypatch.setattr("nanobot.webui.transcript._ACTIVE_TRANSCRIPT_ROTATE_BYTES", 520)
monkeypatch.setattr("nanobot.webui.transcript._TARGET_ACTIVE_TRANSCRIPT_BYTES", 260)
key = "websocket:k1"
json_path = webui_thread_file_path(key)
+140 -1
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
import nanobot.webui.transcript as transcript_module
from nanobot.session.history_visibility import HIDDEN_HISTORY_META
from nanobot.webui.transcript import (
WEBUI_TRANSCRIPT_SCHEMA_VERSION,
@@ -38,6 +39,7 @@ def test_append_stamps_created_at_ms(tmp_path, monkeypatch) -> None:
def _force_small_transcript_budget(monkeypatch, *, limit: int = 520, target: int = 260) -> None:
monkeypatch.setattr("nanobot.webui.transcript._MAX_TRANSCRIPT_FILE_BYTES", limit)
monkeypatch.setattr("nanobot.webui.transcript._ACTIVE_TRANSCRIPT_ROTATE_BYTES", limit)
monkeypatch.setattr("nanobot.webui.transcript._TARGET_ACTIVE_TRANSCRIPT_BYTES", target)
@@ -122,6 +124,28 @@ def test_segmented_transcript_paginates_latest_and_older_without_overlap(
]
def test_latest_page_reads_active_chunk_once(tmp_path, monkeypatch) -> None:
monkeypatch.setattr("nanobot.config.paths.get_data_dir", lambda: tmp_path)
key = "websocket:single-active-read"
for idx in range(1, 7):
_append_numbered_turn(key, "single-active-read", idx)
original = transcript_module._read_chunk_turns
read_chunk_ids: list[str] = []
def track_read(session_key: str, chunk_id: str) -> list[list[dict]]:
read_chunk_ids.append(chunk_id)
return original(session_key, chunk_id)
monkeypatch.setattr(transcript_module, "_read_chunk_turns", track_read)
latest = build_webui_thread_response(key, limit=4, direction="latest")
assert latest is not None
assert _message_contents(latest) == _numbered_turn_texts(5, 6)
assert read_chunk_ids == ["active"]
def test_page_cursor_survives_active_rotation_after_latest_page(
tmp_path,
monkeypatch,
@@ -148,15 +172,53 @@ def test_segment_manifest_can_be_rebuilt_when_missing_or_corrupt(tmp_path, monke
key = "websocket:manifest"
_write_segmented_turns(tmp_path, monkeypatch, key, "manifest", 4)
manifest = webui_transcript_segments_dir(key) / "manifest.json"
segment_dir = webui_transcript_segments_dir(key)
segment_names = sorted(path.name for path in segment_dir.glob("*.jsonl"))
assert segment_names
original = transcript_module._read_transcript_file
segment_reads: list[str] = []
def track_read(path):
if path.parent == segment_dir and path.suffix == ".jsonl":
segment_reads.append(path.name)
return original(path)
monkeypatch.setattr(transcript_module, "_read_transcript_file", track_read)
manifest = segment_dir / "manifest.json"
manifest.write_text("{not json", encoding="utf-8")
entries = transcript_module._read_segment_manifest_entries(key)
assert [entry["id"] for entry in entries] == [path.removesuffix(".jsonl") for path in segment_names]
assert segment_reads == segment_names
lines = read_transcript_lines(key)
assert len([line for line in lines if line.get("event") == "user"]) == 4
assert manifest.read_text(encoding="utf-8").lstrip().startswith("{")
def test_rotation_does_not_reread_existing_segments(tmp_path, monkeypatch) -> None:
key = "websocket:manifest-append"
_write_segmented_turns(tmp_path, monkeypatch, key, "manifest-append", 4)
segment_dir = webui_transcript_segments_dir(key)
assert list(segment_dir.glob("*.jsonl"))
original = transcript_module._read_transcript_file
segment_reads: list[str] = []
def track_read(path):
if path.parent == segment_dir and path.suffix == ".jsonl":
segment_reads.append(path.name)
return original(path)
monkeypatch.setattr(transcript_module, "_read_transcript_file", track_read)
for idx in range(5, 9):
_append_numbered_turn(key, "manifest-append", idx)
assert segment_reads == []
def test_delete_webui_transcript_removes_segments(tmp_path, monkeypatch) -> None:
from nanobot.webui.thread_disk import webui_thread_file_path
from nanobot.webui.transcript import delete_webui_transcript, webui_transcript_path
@@ -786,6 +848,83 @@ def test_build_response_restores_session_users_for_legacy_transcript(
]
def test_complete_transcript_does_not_load_session_messages(tmp_path, monkeypatch) -> None:
monkeypatch.setattr("nanobot.config.paths.get_data_dir", lambda: tmp_path)
key = "websocket:complete-fast-path"
for event in (
{"event": "user", "chat_id": "complete-fast-path", "text": "question"},
{"event": "message", "chat_id": "complete-fast-path", "text": "answer"},
{"event": "turn_end", "chat_id": "complete-fast-path"},
):
append_transcript_object(key, event)
def fail_if_loaded() -> list[dict]:
raise AssertionError("complete transcripts must not read canonical session history")
out = build_webui_thread_response(
key,
limit=4,
direction="latest",
session_messages_loader=fail_if_loaded,
)
assert out is not None
assert [(message["role"], message["content"]) for message in out["messages"]] == [
("user", "question"),
("assistant", "answer"),
]
def test_legacy_recovery_loads_session_and_builds_backfill_turns_once(
tmp_path,
monkeypatch,
) -> None:
monkeypatch.setattr("nanobot.config.paths.get_data_dir", lambda: tmp_path)
key = "websocket:lazy-legacy-recovery"
append_transcript_object(
key,
{"event": "message", "chat_id": "lazy-legacy-recovery", "text": "answer"},
)
append_transcript_object(
key,
{
"event": "turn_end",
"chat_id": "lazy-legacy-recovery",
"transcript_incomplete": True,
},
)
loader_calls = 0
backfill_calls = 0
original = transcript_module._session_backfill_turns
def load_session_messages() -> list[dict]:
nonlocal loader_calls
loader_calls += 1
return [
{"role": "user", "content": "question"},
{"role": "assistant", "content": "answer"},
]
def track_backfill(session_key: str, session_messages: list[dict]):
nonlocal backfill_calls
backfill_calls += 1
return original(session_key, session_messages)
monkeypatch.setattr(transcript_module, "_session_backfill_turns", track_backfill)
out = build_webui_thread_response(key, session_messages_loader=load_session_messages)
assert out is not None
assert loader_calls == 1
assert backfill_calls == 1
assert [(message["role"], message["content"]) for message in out["messages"]] == [
("user", "question"),
("assistant", "answer"),
]
assert out["has_pending_tool_calls"] is False
def test_build_response_restores_session_users_without_duplicating_new_transcript_users(
tmp_path,
monkeypatch,
+81 -2
View File
@@ -1,9 +1,14 @@
import json
from unittest.mock import MagicMock
import pytest
from nanobot.security.workspace_access import WorkspaceScopeError, default_workspace_scope
from nanobot.session.manager import SessionManager
from nanobot.security.workspace_access import (
WORKSPACE_SCOPE_METADATA_KEY,
WorkspaceScopeError,
default_workspace_scope,
)
from nanobot.session.manager import SessionManager, SessionStore
from nanobot.webui.workspaces import (
WebUIWorkspaceController,
read_webui_default_access_mode,
@@ -135,6 +140,33 @@ def test_webui_default_access_applies_to_unscoped_old_sessions(tmp_path, monkeyp
assert new_scope.access_mode == "full"
def test_indexed_scope_preserves_missing_and_explicit_null_semantics(tmp_path, monkeypatch) -> None:
monkeypatch.setattr("nanobot.webui.workspaces.get_webui_dir", lambda: tmp_path / "webui")
default = tmp_path / "default"
default.mkdir()
write_webui_default_access_mode("full")
controller = WebUIWorkspaceController(
session_manager=None,
default_workspace=default,
default_restrict_to_workspace=True,
)
webui_default = controller.default_scope()
missing = controller.scope_for_indexed_metadata(
None,
scope_present=False,
default_scope=webui_default,
)
explicit_null = controller.scope_for_indexed_metadata(
None,
scope_present=True,
default_scope=webui_default,
)
assert missing.access_mode == "full"
assert explicit_null.access_mode == "restricted"
def test_webui_default_access_does_not_override_explicit_session_scope(tmp_path, monkeypatch) -> None:
monkeypatch.setattr("nanobot.webui.workspaces.get_webui_dir", lambda: tmp_path / "webui")
default = tmp_path / "default"
@@ -185,6 +217,53 @@ def test_scope_for_session_key_reads_metadata_without_full_history(
assert scope.access_mode == "full"
def test_scope_for_session_key_always_reads_the_active_store(tmp_path, monkeypatch) -> None:
monkeypatch.setattr("nanobot.webui.workspaces.get_webui_dir", lambda: tmp_path / "webui")
default = tmp_path / "default"
project = tmp_path / "project"
default.mkdir()
project.mkdir()
workspace = tmp_path / "session-data"
full_scope = default_workspace_scope(project, restrict_to_workspace=False)
restricted_scope = default_workspace_scope(project, restrict_to_workspace=True)
residual_sessions = SessionManager(workspace)
residual = residual_sessions.get_or_create("websocket:cached")
residual.metadata[WORKSPACE_SCOPE_METADATA_KEY] = full_scope.metadata()
residual_sessions.save(residual)
store = MagicMock(spec=SessionStore)
store.read_metadata.side_effect = [
{
"key": "websocket:cached",
"created_at": None,
"updated_at": None,
"metadata": {WORKSPACE_SCOPE_METADATA_KEY: full_scope.metadata()},
},
{
"key": "websocket:cached",
"created_at": None,
"updated_at": None,
"metadata": {WORKSPACE_SCOPE_METADATA_KEY: restricted_scope.metadata()},
},
]
sessions = SessionManager(workspace, store=store)
controller = WebUIWorkspaceController(
session_manager=sessions,
default_workspace=default,
default_restrict_to_workspace=True,
)
first = controller.scope_for_session_key("websocket:cached")
second = controller.scope_for_session_key("websocket:cached")
assert first.project_path == project.resolve()
assert first.access_mode == "full"
assert second.project_path == project.resolve()
assert second.access_mode == "restricted"
assert store.read_metadata.call_count == 2
def test_remote_existing_chat_can_reduce_its_workspace_access(tmp_path, monkeypatch) -> None:
monkeypatch.setattr("nanobot.webui.workspaces.get_webui_dir", lambda: tmp_path / "webui")
default = tmp_path / "default"
+38
View File
@@ -0,0 +1,38 @@
"""Tests for shared embedded WebUI HTTP helpers."""
import gzip
import json
from nanobot.webui.http_utils import http_json_response
def test_http_json_response_compresses_large_payload_when_gzip_is_accepted() -> None:
payload = {"message": "响应内容" * 2_000}
response = http_json_response(payload, accept_encoding="br, gzip; q=0.5")
assert response.headers["Content-Encoding"] == "gzip"
assert response.headers["Vary"] == "Accept-Encoding"
assert int(response.headers["Content-Length"]) == len(response.body)
assert json.loads(gzip.decompress(response.body)) == payload
def test_http_json_response_preserves_identity_when_gzip_is_rejected() -> None:
payload = {"message": "x" * 8_000}
response = http_json_response(payload, accept_encoding="gzip;q=0, br")
assert "Content-Encoding" not in response.headers
assert response.headers["Vary"] == "Accept-Encoding"
assert int(response.headers["Content-Length"]) == len(response.body)
assert json.loads(response.body) == payload
def test_http_json_response_does_not_compress_small_payload() -> None:
payload = {"ok": True}
response = http_json_response(payload, accept_encoding="gzip")
assert "Content-Encoding" not in response.headers
assert response.headers["Vary"] == "Accept-Encoding"
assert json.loads(response.body) == payload
+98 -5
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
import io
import os
from datetime import datetime
from pathlib import Path
@@ -9,6 +10,7 @@ import pytest
import nanobot.webui.session_list_index as session_list_index
from nanobot.cron.session_turns import CRON_HISTORY_META
from nanobot.providers.base import ProviderConversationState
from nanobot.security.workspace_access import WORKSPACE_SCOPE_METADATA_KEY
from nanobot.session.automation_turns import AUTOMATION_HISTORY_META
from nanobot.session.history_visibility import HIDDEN_HISTORY_META
from nanobot.session.manager import SessionManager
@@ -28,7 +30,7 @@ def test_webui_session_list_reuses_valid_index_without_scanning_files(
assert list_webui_sessions(manager)[0]["preview"] == "indexed preview"
assert list_webui_sessions(manager)[0]["model_preset"] == "fast"
def fail_scan(session_manager: SessionManager, path: Path) -> None:
def fail_scan(session_manager: SessionManager, path: Path, webui_dir: Path) -> None:
raise AssertionError(f"unexpected session file scan: {path}")
monkeypatch.setattr(session_list_index, "_scan_session_row", fail_scan)
@@ -40,6 +42,89 @@ def test_webui_session_list_reuses_valid_index_without_scanning_files(
assert rows[0]["model_preset"] == "fast"
def test_webui_session_list_indexes_workspace_scope_and_preserves_null(
tmp_path: Path,
) -> None:
manager = SessionManager(tmp_path)
project = tmp_path / "project"
project.mkdir()
scoped = manager.get_or_create("websocket:scoped")
scoped.metadata[WORKSPACE_SCOPE_METADATA_KEY] = {
"project_path": str(project),
"access_mode": "full",
"future_extension": "x" * 5000,
}
manager.save(scoped)
explicit_null = manager.get_or_create("websocket:null")
explicit_null.metadata[WORKSPACE_SCOPE_METADATA_KEY] = None
manager.save(explicit_null)
manager.save(manager.get_or_create("websocket:missing"))
rows = {row["key"]: row for row in list_webui_sessions(manager)}
assert session_list_index.indexed_workspace_scope(rows["websocket:scoped"]) == (
True,
{"project_path": str(project), "access_mode": "full"},
)
assert session_list_index.indexed_workspace_scope(rows["websocket:null"]) == (True, None)
assert session_list_index.indexed_workspace_scope(rows["websocket:missing"]) == (False, None)
scoped.metadata[WORKSPACE_SCOPE_METADATA_KEY]["access_mode"] = "restricted"
manager.save(scoped)
refreshed = {row["key"]: row for row in list_webui_sessions(manager)}
assert session_list_index.indexed_workspace_scope(refreshed["websocket:scoped"])[1] == {
"project_path": str(project),
"access_mode": "restricted",
}
def test_webui_session_list_does_not_cache_old_snapshot_with_new_signature(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
manager = SessionManager(tmp_path)
session_key = "websocket:scope-race"
session = manager.get_or_create(session_key)
session.metadata[WORKSPACE_SCOPE_METADATA_KEY] = {
"project_path": str(tmp_path),
"access_mode": "full",
}
session.add_message("user", "hello")
manager.save(session)
session_path = manager._get_session_path(session_key)
original_open = open
scope_changed = False
class RacingReader(io.StringIO):
def __next__(self) -> str:
nonlocal scope_changed
if not scope_changed:
scope_changed = True
current = manager.get_or_create(session_key)
current.metadata[WORKSPACE_SCOPE_METADATA_KEY] = {
"project_path": str(tmp_path),
"access_mode": "restricted",
}
manager.save(current)
return super().__next__()
def racing_open(path, *args, **kwargs):
if Path(path) == session_path:
with original_open(path, *args, **kwargs) as source:
return RacingReader(source.read())
return original_open(path, *args, **kwargs)
monkeypatch.setattr(session_list_index, "open", racing_open, raising=False)
first = list_webui_sessions(manager)[0]
second = list_webui_sessions(manager)[0]
assert session_list_index.indexed_workspace_scope(first)[1]["access_mode"] == "full"
assert session_list_index.indexed_workspace_scope(second)[1]["access_mode"] == "restricted"
def test_webui_session_list_rejects_invalid_internal_model_preset_metadata(
tmp_path: Path,
) -> None:
@@ -74,9 +159,13 @@ def test_webui_session_list_rescans_only_changed_file(tmp_path: Path, monkeypatc
original_scan = session_list_index._scan_session_row
scanned: list[str] = []
def record_scan(session_manager: SessionManager, path: Path) -> dict | None:
def record_scan(
session_manager: SessionManager,
path: Path,
webui_dir: Path,
) -> dict | None:
scanned.append(path.name)
return original_scan(session_manager, path)
return original_scan(session_manager, path, webui_dir)
monkeypatch.setattr(session_list_index, "_scan_session_row", record_scan)
@@ -247,9 +336,13 @@ def test_webui_session_list_rescans_when_transcript_changes(
original_scan = session_list_index._scan_session_row
scanned: list[str] = []
def record_scan(session_manager: SessionManager, path: Path) -> dict | None:
def record_scan(
session_manager: SessionManager,
path: Path,
webui_dir: Path,
) -> dict | None:
scanned.append(path.name)
return original_scan(session_manager, path)
return original_scan(session_manager, path, webui_dir)
monkeypatch.setattr(session_list_index, "_scan_session_row", record_scan)
+20
View File
@@ -86,6 +86,26 @@ def test_settings_payload_includes_versioned_docs(
}
def test_settings_payload_exposes_edenai_provider(
tmp_path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
config_path = tmp_path / "config.json"
config = Config()
config.providers.edenai.api_key = "eden-test-key"
save_config(config, config_path)
monkeypatch.setattr("nanobot.config.loader._current_config_path", config_path)
payload = settings_payload()
edenai = next(row for row in payload["providers"] if row["name"] == "edenai")
assert edenai["label"] == "Eden AI"
assert edenai["configured"] is True
assert edenai["default_api_base"] == "https://api.edenai.run/v3"
assert edenai["model_catalog"] == "catalog"
assert edenai["model_selectable"] is True
def test_settings_payload_includes_relocated_capabilities(
tmp_path,
monkeypatch: pytest.MonkeyPatch,
+3 -3
View File
@@ -135,15 +135,15 @@
},
"pt-BR": {
boot: "Carregando nanobot…",
description: "Interface web do nanobot — converse com o seu workspace do nanobot."
description: "Interface web do nanobot — converse com o seu espaço de trabalho do nanobot."
},
vi: {
boot: "Đang tải nanobot…",
description: "Giao diện web nanobot — trò chuyện với workspace nanobot của bạn."
description: "Giao diện web nanobot — trò chuyện với không gian làm việc nanobot của bạn."
},
id: {
boot: "Memuat nanobot…",
description: "UI web nanobot — ngobrol dengan workspace nanobot Anda."
description: "UI web nanobot — ngobrol dengan ruang kerja nanobot Anda."
}
};
+4 -2
View File
@@ -116,12 +116,13 @@ const RenameChatDialog = lazy(async () => {
});
function SurfaceLoadingFallback() {
const { t } = useTranslation();
return (
<div
aria-busy="true"
className="flex h-full w-full flex-col gap-5 px-5 py-8 sm:px-8 lg:px-12"
>
<span className="sr-only">Loading</span>
<span className="sr-only">{t("settings.status.loading")}</span>
<div className="h-4 w-20 animate-pulse rounded bg-muted/70 motion-reduce:animate-none" />
<div className="h-9 w-48 animate-pulse rounded bg-muted/70 motion-reduce:animate-none" />
<div className="mt-4 h-12 w-full max-w-3xl animate-pulse rounded-md bg-muted/55 motion-reduce:animate-none" />
@@ -1901,8 +1902,9 @@ function Shell({
const sidebarProps = {
sessions,
activeKey,
activeKey: view === "chat" ? activeKey : null,
loading,
newChatActive: view === "chat" && activeKey === null,
onNewChat,
onSelect: onSelectChat,
onRequestDelete,
+3 -1
View File
@@ -31,7 +31,9 @@ export function AttachmentTile({ attachment, className, inline = false, variant
target="_blank"
rel="noreferrer noopener"
className="block bg-muted/20"
aria-label={attachment.name ? `Open ${attachment.name}` : t("lightbox.open", { defaultValue: "Open image" })}
aria-label={attachment.name
? t("message.openAttachment", { name: attachment.name })
: t("lightbox.open", { defaultValue: "Open image" })}
>
<img
src={attachment.url}
+11 -89
View File
@@ -1,7 +1,6 @@
import {
memo,
useEffect,
useLayoutEffect,
useMemo,
useRef,
useState,
@@ -25,6 +24,10 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import {
SIDEBAR_SELECTION_ITEM_CLASS,
SidebarSelectionHighlight,
} from "@/components/SidebarSelectionHighlight";
import { deriveTitle, relativeTime, visibleSessionPreview } from "@/lib/format";
import {
COLLAPSED_CHATS_VISIBLE_COUNT,
@@ -104,11 +107,7 @@ export const ChatList = memo(function ChatList({
}: ChatListProps) {
const { t } = useTranslation();
const [visibleLimit, setVisibleLimit] = useState(INITIAL_VISIBLE_SESSIONS);
const listContentRef = useRef<HTMLDivElement>(null);
const activeRowRef = useRef<HTMLDivElement>(null);
const activeHighlightRef = useRef<HTMLDivElement>(null);
const activeHighlightSurfaceRef = useRef<HTMLDivElement>(null);
const highlightVisibleRef = useRef(false);
const labels = useMemo<ChatGroupLabels>(() => ({
pinned: t("chat.groups.pinned"),
all: t("chat.groups.all"),
@@ -163,74 +162,6 @@ export const ChatList = memo(function ChatList({
setVisibleLimit(INITIAL_VISIBLE_SESSIONS);
}, [showArchived, sort]);
useLayoutEffect(() => {
let resetTransitionFrame: number | null = null;
const updateHighlight = () => {
const content = listContentRef.current;
const row = activeRowRef.current;
const highlight = activeHighlightRef.current;
const surface = activeHighlightSurfaceRef.current;
if (!highlight || !surface) return;
if (!content || !row) {
surface.style.opacity = "0";
surface.style.transform = "scale(0.97)";
highlightVisibleRef.current = false;
return;
}
const shouldFloatIn = !highlightVisibleRef.current;
if (shouldFloatIn) {
highlight.style.transitionProperty = "none";
}
const contentRect = content.getBoundingClientRect();
const rowRect = row.getBoundingClientRect();
highlight.style.width = `${rowRect.width}px`;
highlight.style.height = `${rowRect.height}px`;
highlight.style.transform = `translate3d(${rowRect.left - contentRect.left}px, ${
rowRect.top - contentRect.top
}px, 0)`;
if (shouldFloatIn) {
void highlight.offsetWidth;
}
surface.style.opacity = "1";
surface.style.transform = "scale(1)";
highlightVisibleRef.current = true;
if (shouldFloatIn) {
resetTransitionFrame = window.requestAnimationFrame(() => {
highlight.style.removeProperty("transition-property");
resetTransitionFrame = null;
});
}
};
updateHighlight();
const resizeObserver =
typeof ResizeObserver === "undefined"
? null
: new ResizeObserver(updateHighlight);
if (resizeObserver) {
if (listContentRef.current) resizeObserver.observe(listContentRef.current);
if (activeRowRef.current) resizeObserver.observe(activeRowRef.current);
}
window.addEventListener("resize", updateHighlight);
return () => {
if (resetTransitionFrame !== null) {
window.cancelAnimationFrame(resetTransitionFrame);
}
activeHighlightRef.current?.style.removeProperty("transition-property");
resizeObserver?.disconnect();
window.removeEventListener("resize", updateHighlight);
};
}, [activeKey, density, limitedGroups, showPreviews, showTimestamps]);
if (loading && sessions.length === 0) {
return (
<div className="px-3 py-6 text-[12px] text-muted-foreground">
@@ -256,8 +187,10 @@ export const ChatList = memo(function ChatList({
return (
<div className="h-full min-h-0 min-w-0 overflow-x-hidden overflow-y-auto overscroll-contain scrollbar-thin scrollbar-track-transparent">
<div
ref={listContentRef}
<SidebarSelectionHighlight
targetRef={activeRowRef}
activeId={activeKey}
scope="sessions"
data-chat-list-content
className="relative min-w-0 space-y-3 px-2 py-1.5"
>
@@ -333,7 +266,8 @@ export const ChatList = memo(function ChatList({
ref={active ? activeRowRef : undefined}
data-chat-row={s.key}
className={cn(
"group flex min-w-0 max-w-full items-center gap-2 rounded-xl px-2 text-[13px] transition-colors",
"group flex min-w-0 max-w-full items-center gap-2 rounded-xl px-2 text-[13px]",
SIDEBAR_SELECTION_ITEM_CLASS,
compact ? "min-h-7" : "min-h-8",
active
? "text-sidebar-accent-foreground"
@@ -475,19 +409,7 @@ export const ChatList = memo(function ChatList({
</button>
</div>
) : null}
<div
ref={activeHighlightRef}
data-testid="active-chat-highlight"
aria-hidden="true"
className="pointer-events-none absolute left-0 top-0 z-0 !mt-0 transition-[transform,width,height] duration-300 ease-out will-change-transform motion-reduce:transition-none"
>
<div
ref={activeHighlightSurfaceRef}
data-testid="active-chat-highlight-surface"
className="h-full w-full scale-[0.97] rounded-xl bg-sidebar-foreground/[0.055] opacity-0 transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none dark:bg-white/[0.07]"
/>
</div>
</div>
</SidebarSelectionHighlight>
</div>
);
});
+5 -2
View File
@@ -1,4 +1,5 @@
import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import {
INLINE_TOKEN_HIGHLIGHT_COLOR,
@@ -140,6 +141,7 @@ export function CliAppMentionToken({
variant: "composer" | "message";
isHero?: boolean;
}) {
const { t } = useTranslation();
const color = app.brand_color || INLINE_TOKEN_HIGHLIGHT_COLOR;
const mentionName = label.startsWith("@") ? label.slice(1) : label;
const logoUrls = useMemo(() => logoFallbackUrls(app.logo_url), [app.logo_url]);
@@ -150,7 +152,7 @@ export function CliAppMentionToken({
return (
<InlineTokenHighlight
testId={`${testIdPrefix}-cli-mention-${app.name}`}
title={`CLI app: ${app.display_name || app.name}`}
title={t("thread.composer.mentions.cliTitle", { name: app.display_name || app.name })}
color={color}
>
<span
@@ -195,6 +197,7 @@ export function McpPresetMentionToken({
variant: "composer" | "message";
isHero?: boolean;
}) {
const { t } = useTranslation();
const color = preset.brand_color || INLINE_TOKEN_HIGHLIGHT_COLOR;
const mentionName = label.startsWith("@") ? label.slice(1) : label;
const logoUrls = useMemo(() => logoFallbackUrls(preset.logo_url), [preset.logo_url]);
@@ -205,7 +208,7 @@ export function McpPresetMentionToken({
return (
<InlineTokenHighlight
testId={`${testIdPrefix}-mcp-mention-${preset.name}`}
title={`MCP server: ${preset.display_name || preset.name}`}
title={t("thread.composer.mentions.mcpTitle", { name: preset.display_name || preset.name })}
color={color}
>
<span
@@ -411,6 +411,7 @@ function inlineLinkPreviewFromChildren(children: ReactNode): InlineLinkPreview |
}
function InlineLinkPreviewRow({ link }: { link: InlineLinkPreview }) {
const { t } = useTranslation();
const { favicon, onFaviconError, onFaviconLoad } = useFaviconFallback(link.host);
const label = link.prefix
? `${link.prefix}${link.title}`
@@ -421,7 +422,7 @@ function InlineLinkPreviewRow({ link }: { link: InlineLinkPreview }) {
href={link.href}
target="_blank"
rel="noreferrer noopener"
aria-label={`Open link: ${label}`}
aria-label={t("message.openLink", { label })}
className={cn(
"not-prose inline-flex max-w-full items-center gap-2 align-baseline",
"text-blue-500 no-underline underline-offset-2 hover:underline dark:text-blue-300",
+33 -8
View File
@@ -253,6 +253,9 @@ export function MessageBubble({
const hasText = userContent.trim().length > 0;
const showDeliveryStatus =
message.deliveryStatus === "sending" || message.deliveryStatus === "failed";
const createdAtLabel = formatMessageEndTime(message.createdAt);
const showCreatedAt = createdAtLabel.length > 0;
const createdAtTitle = showCreatedAt ? fmtDateTime(message.createdAt) : "";
const quotedContext = parsedMessage.quotedContext;
const slashCommand = matchingSlashCommand(userContent, slashCommands);
const messageText = slashCommand ? (
@@ -298,9 +301,19 @@ export function MessageBubble({
{messageText}
</p>
) : null}
{showDeliveryStatus || (hasText && showCopyAction) ? (
{showDeliveryStatus || showCreatedAt || (hasText && showCopyAction) ? (
<TooltipProvider delayDuration={220} skipDelayDuration={80}>
<div className="flex min-h-8 items-center justify-end gap-1.5 text-muted-foreground">
{showCreatedAt ? (
<time
data-message-created-at
dateTime={new Date(message.createdAt).toISOString()}
className="text-[11px] leading-none text-muted-foreground/70 tabular-nums"
title={createdAtTitle}
>
{createdAtLabel}
</time>
) : null}
<UserDeliveryStatus
status={message.deliveryStatus}
errorKind={message.deliveryErrorKind}
@@ -338,11 +351,22 @@ export function MessageBubble({
message.role === "assistant" && !message.isStreaming
? formatMessageEndTime(completedAt)
: "";
const assistantTimestamp =
typeof completedAt === "number" && Number.isFinite(completedAt)
? completedAt
: message.createdAt;
const assistantTimestampLabel =
message.role === "assistant" && !message.isStreaming
? formatMessageEndTime(assistantTimestamp)
: "";
const showCompletedAt =
completedAtLabel.length > 0
&& (!empty || hasReasoning || media.length > 0);
const completedAtTitle = showCompletedAt ? fmtDateTime(completedAt) : "";
const showAssistantFooterRow = showCopyButton || showForkButton || showCompletedAt;
const showAssistantTimestamp =
assistantTimestampLabel.length > 0
&& (!empty || hasReasoning || media.length > 0);
const assistantTimestampTitle = showAssistantTimestamp ? fmtDateTime(assistantTimestamp) : "";
const showAssistantFooterRow = showCopyButton || showForkButton || showAssistantTimestamp;
const showAssistantFooterSlot =
message.role === "assistant"
&& (!empty || hasReasoning || media.length > 0);
@@ -414,14 +438,15 @@ export function MessageBubble({
<TooltipContent side="top" align="center">{forkLabel}</TooltipContent>
</Tooltip>
) : null}
{showCompletedAt ? (
{showAssistantTimestamp ? (
<time
data-assistant-completed-at
dateTime={new Date(completedAt!).toISOString()}
{...(showCompletedAt ? { "data-assistant-completed-at": true } : {})}
data-message-timestamp
dateTime={new Date(assistantTimestamp).toISOString()}
className="text-[11px] leading-none text-muted-foreground/70 tabular-nums"
title={completedAtTitle}
title={assistantTimestampTitle}
>
{completedAtLabel}
{assistantTimestampLabel}
</time>
) : null}
</div>
+38 -9
View File
@@ -1,4 +1,9 @@
import { useState, type ReactNode } from "react";
import {
type ReactNode,
type RefObject,
useRef,
useState,
} from "react";
import {
Archive,
Brain,
@@ -13,6 +18,10 @@ import { useTranslation } from "react-i18next";
import { ChatList } from "@/components/ChatList";
import { ConnectionBadge } from "@/components/ConnectionBadge";
import {
SIDEBAR_SELECTION_ACTION_ITEM_CLASS,
SidebarSelectionHighlight,
} from "@/components/SidebarSelectionHighlight";
import { Button } from "@/components/ui/button";
import type {
ChatSummary,
@@ -24,6 +33,7 @@ interface SidebarProps {
sessions: ChatSummary[];
activeKey: string | null;
loading: boolean;
newChatActive: boolean;
onNewChat: () => void;
onSelect: (key: string) => void;
onRequestDelete: (key: string, label: string) => void;
@@ -82,6 +92,12 @@ export function Sidebar(props: SidebarProps) {
const collapsed = Boolean(props.collapsed);
const toggleLabel = t("thread.header.toggleSidebar");
const newChatShortcut = newChatShortcutLabel();
const activeActionRef = useRef<HTMLButtonElement>(null);
const activeActionId = props.newChatActive
? "new-chat"
: props.activeUtility
? `utility:${props.activeUtility}`
: null;
return (
<nav
@@ -133,9 +149,12 @@ export function Sidebar(props: SidebarProps) {
)}
</div>
<div
<SidebarSelectionHighlight
targetRef={activeActionRef}
activeId={activeActionId}
scope="actions"
className={cn(
"space-y-1.5 px-2 pb-2",
"relative space-y-1.5 px-2 pb-2",
collapsed && "flex w-14 flex-col items-center px-0",
)}
>
@@ -143,6 +162,8 @@ export function Sidebar(props: SidebarProps) {
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"
@@ -159,6 +180,7 @@ export function Sidebar(props: SidebarProps) {
onClick={props.onOpenApps}
onIntent={props.onSettingsIntent}
active={props.activeUtility === "apps"}
selectionRef={activeActionRef}
icon={<Blocks className="h-4 w-4" />}
/>
<SidebarActionButton
@@ -167,6 +189,7 @@ export function Sidebar(props: SidebarProps) {
onClick={props.onOpenSkills}
onIntent={props.onSettingsIntent}
active={props.activeUtility === "skills"}
selectionRef={activeActionRef}
icon={<Brain className="h-4 w-4" />}
/>
<SidebarActionButton
@@ -175,6 +198,7 @@ export function Sidebar(props: SidebarProps) {
onClick={props.onOpenAutomations}
onIntent={props.onSettingsIntent}
active={props.activeUtility === "automations"}
selectionRef={activeActionRef}
icon={<CalendarClock className="h-4 w-4" />}
/>
{props.archivedCount ? (
@@ -185,7 +209,7 @@ export function Sidebar(props: SidebarProps) {
icon={<Archive className="h-4 w-4" />}
/>
) : null}
</div>
</SidebarSelectionHighlight>
<div
className={cn(
"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden transition-opacity duration-200",
@@ -255,6 +279,7 @@ function SidebarActionButton({
shortcut,
ariaKeyShortcuts,
onIntent,
selectionRef,
}: {
collapsed: boolean;
label: string;
@@ -265,13 +290,15 @@ function SidebarActionButton({
shortcut?: string;
ariaKeyShortcuts?: string;
onIntent?: () => void;
selectionRef?: RefObject<HTMLButtonElement>;
}) {
const title = shortcut ? `${label} (${shortcut})` : collapsed ? label : undefined;
return (
<Button
ref={active ? selectionRef : undefined}
type="button"
variant="ghost"
variant={null}
aria-label={label}
aria-current={active ? "page" : undefined}
aria-keyshortcuts={ariaKeyShortcuts}
@@ -280,12 +307,14 @@ function SidebarActionButton({
onFocus={onIntent}
onPointerEnter={onIntent}
className={cn(
"touch-target group h-8 min-w-0 gap-2 overflow-hidden rounded-full font-medium text-sidebar-foreground/85 hover:bg-sidebar-accent/75 hover:text-sidebar-foreground",
"transition-[width,padding,border-radius,color,background-color] duration-300 ease-out",
"touch-target group h-8 min-w-0 gap-2 overflow-hidden rounded-xl font-medium",
SIDEBAR_SELECTION_ACTION_ITEM_CLASS,
collapsed
? "w-9 justify-center gap-0 rounded-xl px-0"
? "w-9 justify-center gap-0 px-0"
: "w-full justify-start gap-2 px-3 text-[12.5px]",
active && "bg-sidebar-accent text-sidebar-foreground shadow-[inset_0_0_0_1px_hsl(var(--sidebar-border)/0.55)]",
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]",
className,
)}
>
@@ -0,0 +1,101 @@
import {
type HTMLAttributes,
type RefObject,
useLayoutEffect,
useRef,
} from "react";
interface SidebarSelectionHighlightProps extends HTMLAttributes<HTMLDivElement> {
targetRef: RefObject<HTMLElement>;
activeId: string | null;
scope: string;
}
export const SIDEBAR_SELECTION_ITEM_CLASS =
"relative z-[1] transition-[color] duration-150 ease-out motion-reduce:transition-none";
export const SIDEBAR_SELECTION_ACTION_ITEM_CLASS =
"relative z-[1] transition-[width,padding,color] [transition-duration:300ms,300ms,150ms] ease-out motion-reduce:transition-none";
export function SidebarSelectionHighlight({
targetRef,
activeId,
scope,
children,
...containerProps
}: SidebarSelectionHighlightProps) {
const containerRef = useRef<HTMLDivElement>(null);
const highlightRef = useRef<HTMLDivElement>(null);
const positionedRef = useRef(false);
useLayoutEffect(() => {
const highlight = highlightRef.current;
const container = containerRef.current;
const target = targetRef.current;
if (!highlight) return;
if (!activeId || !container || !target) {
highlight.style.opacity = "0";
positionedRef.current = false;
return;
}
let restoreTransitionFrame: number | null = null;
const position = () => {
const containerRect = container.getBoundingClientRect();
const targetRect = target.getBoundingClientRect();
if (targetRect.width === 0 || targetRect.height === 0) {
highlight.style.opacity = "0";
positionedRef.current = false;
return;
}
const firstPosition = !positionedRef.current;
if (firstPosition) highlight.style.transitionProperty = "none";
highlight.style.width = `${targetRect.width}px`;
highlight.style.height = `${targetRect.height}px`;
highlight.style.transform = `translate3d(${targetRect.left - containerRect.left}px, ${
targetRect.top - containerRect.top
}px, 0)`;
highlight.style.opacity = "1";
positionedRef.current = true;
if (firstPosition) {
restoreTransitionFrame = window.requestAnimationFrame(() => {
highlight.style.removeProperty("transition-property");
restoreTransitionFrame = null;
});
}
};
position();
const resizeObserver =
typeof ResizeObserver === "undefined" ? null : new ResizeObserver(position);
resizeObserver?.observe(container);
resizeObserver?.observe(target);
window.addEventListener("resize", position);
return () => {
if (restoreTransitionFrame !== null) {
window.cancelAnimationFrame(restoreTransitionFrame);
}
highlight?.style.removeProperty("transition-property");
resizeObserver?.disconnect();
window.removeEventListener("resize", position);
};
});
return (
<div {...containerProps} ref={containerRef}>
{children}
<div
ref={highlightRef}
data-testid={`${scope}-selection-highlight`}
data-active-id={activeId ?? undefined}
aria-hidden="true"
className="pointer-events-none absolute left-0 top-0 z-0 !mt-0 rounded-xl bg-sidebar-foreground/[0.055] opacity-0 transition-[transform,width,height] duration-300 ease-out will-change-transform motion-reduce:transition-none dark:bg-white/[0.07]"
/>
</div>
);
}
+3 -1
View File
@@ -1,4 +1,5 @@
import { Fragment } from "react";
import { useTranslation } from "react-i18next";
import {
CliAppMentionToken,
@@ -69,6 +70,7 @@ export function UserMessageText({
cliApps: CliAppInfo[];
mcpPresets: McpPresetInfo[];
}) {
const { t } = useTranslation();
const segments = splitUserMessageSegments(text, cliApps, mcpPresets);
return (
<>
@@ -80,7 +82,7 @@ export function UserMessageText({
<InlineTokenHighlight
key={`skill-${segment.name}-${index}`}
testId={`message-skill-reference-${segment.name.toLowerCase()}`}
title={`Skill: ${segment.name}`}
title={t("message.skill", { name: segment.name })}
color={INLINE_TOKEN_HIGHLIGHT_COLOR}
className="font-medium"
>
+26 -34
View File
@@ -65,6 +65,10 @@ import { useTranslation } from "react-i18next";
import { channelUiPresentation } from "@/channel-plugins/registry";
import { LanguageSwitcher } from "@/components/LanguageSwitcher";
import {
SIDEBAR_SELECTION_ITEM_CLASS,
SidebarSelectionHighlight,
} from "@/components/SidebarSelectionHighlight";
import { SkillsCatalogSettings } from "@/components/settings/SkillsCatalogSettings";
import { TokenUsageHeatmap } from "@/components/settings/TokenUsageHeatmap";
import { ToggleButton } from "@/components/settings/ToggleButton";
@@ -230,8 +234,6 @@ interface AgentSettingsDraft {
temperature: number;
reasoningEffort: string;
timezone: string;
botName: string;
botIcon: string;
toolHintMaxLength: number;
}
@@ -471,8 +473,6 @@ const DEFAULT_AGENT_SETTINGS_DRAFT: AgentSettingsDraft = {
temperature: 0.1,
reasoningEffort: "",
timezone: "UTC",
botName: "nanobot",
botIcon: "",
toolHintMaxLength: 40,
};
@@ -540,8 +540,6 @@ function agentDraftFromPayload(
temperature: activePreset?.temperature ?? payload.agent.temperature,
reasoningEffort: activePreset?.reasoning_effort ?? "",
timezone: payload.agent.timezone,
botName: payload.agent.bot_name,
botIcon: payload.agent.bot_icon,
toolHintMaxLength: payload.agent.tool_hint_max_length,
};
}
@@ -1077,11 +1075,7 @@ export function SettingsView({
const runtimeDirty = useMemo(() => {
if (!settings) return false;
return (
form.timezone !== settings.agent.timezone ||
form.botName !== settings.agent.bot_name ||
form.botIcon !== settings.agent.bot_icon
);
return form.timezone !== settings.agent.timezone;
}, [form, settings]);
const imageGenerationDirty = useMemo(() => {
@@ -1402,8 +1396,6 @@ export function SettingsView({
try {
const payload = await updateSettings(token, {
timezone: form.timezone,
botName: form.botName,
botIcon: form.botIcon,
});
applyPayload(payload);
if (payload.requires_restart) {
@@ -2497,6 +2489,7 @@ function SettingsSidebar({
hostChromeInset?: boolean;
}) {
const { t } = useTranslation();
const activeNavItemRef = useRef<HTMLButtonElement>(null);
const activeItem = SETTINGS_NAV_ITEMS.find((item) => item.key === activeSection)
?? SETTINGS_NAV_ITEMS[0];
const ActiveIcon = activeItem.icon;
@@ -2569,19 +2562,26 @@ function SettingsSidebar({
</DropdownMenuContent>
</DropdownMenu>
<div className="hidden space-y-1 lg:block">
<SidebarSelectionHighlight
targetRef={activeNavItemRef}
activeId={activeSection}
scope="settings"
className="relative hidden space-y-1 lg:block"
>
{SETTINGS_NAV_ITEMS.map(({ key, icon: Icon, fallback }) => {
const active = key === activeSection;
return (
<button
ref={active ? activeNavItemRef : undefined}
key={key}
type="button"
aria-current={active ? "page" : undefined}
onClick={() => onSelectSection(key)}
className={cn(
"touch-target flex h-9 w-full items-center gap-2 rounded-[10px] px-2.5 text-left text-[13px] font-medium transition-colors",
"touch-target flex h-9 w-full items-center gap-2 rounded-xl px-2.5 text-left text-[13px] font-medium",
SIDEBAR_SELECTION_ITEM_CLASS,
active
? "bg-sidebar-accent text-foreground"
? "text-sidebar-accent-foreground"
: "text-muted-foreground/78 hover:bg-muted/45 hover:text-foreground",
)}
>
@@ -2592,7 +2592,7 @@ function SettingsSidebar({
</button>
);
})}
</div>
</SidebarSelectionHighlight>
</nav>
<div className="hidden lg:mt-auto lg:block lg:pt-4">
@@ -7678,7 +7678,7 @@ function McpAppsCatalogRow({
onClick={() => setSetupOpen(false)}
className="h-7 rounded-full px-2.5 text-[11.5px] font-semibold text-muted-foreground"
>
{tx("actions.cancel", "Cancel")}
{tx("settings.actions.cancel", "Cancel")}
</Button>
</div>
<div className="mt-3 grid gap-2">
@@ -8403,23 +8403,15 @@ function RuntimeSettings({
return (
<div className="space-y-7">
<section>
<SettingsSectionTitle>{tx("settings.sections.identity", "Identity")}</SettingsSectionTitle>
<SettingsSectionTitle>{tx("settings.sections.regional", "Regional")}</SettingsSectionTitle>
<SettingsGroup>
<SettingsRow title={tx("settings.rows.botName", "Bot name")} description={tx("settings.help.botName", "Shown wherever nanobot uses a display name.")}>
<Input
value={form.botName}
onChange={(event) => setForm((prev) => ({ ...prev, botName: event.target.value }))}
className="h-8 w-[220px] rounded-full text-[13px]"
/>
</SettingsRow>
<SettingsRow title={tx("settings.rows.botIcon", "Bot icon")} description={tx("settings.help.botIcon", "Short emoji or text shown with the bot name.")}>
<Input
value={form.botIcon}
onChange={(event) => setForm((prev) => ({ ...prev, botIcon: event.target.value }))}
className="h-8 w-[120px] rounded-full text-center text-[13px]"
/>
</SettingsRow>
<SettingsRow title={tx("settings.rows.timezone", "Timezone")} description={tx("settings.help.timezone", "Used for schedules and time-aware replies.")}>
<SettingsRow
title={tx("settings.rows.timezone", "Timezone")}
description={tx(
"settings.help.timezone",
"Used for schedules and time-aware replies.",
)}
>
<TimezonePicker
value={form.timezone}
onChange={(timezone) => setForm((prev) => ({ ...prev, timezone }))}
@@ -304,10 +304,13 @@ export function ChannelValidationDetails({ validation }: { validation: ChannelVa
}
export function ChannelValidationChecks({ validation }: { validation: ChannelValidationPayload }) {
const { t } = useTranslation();
if (!validation.checks.length) return null;
return (
<div className="border-t border-border/60 px-4 py-4">
<div className="mb-2 text-[12px] font-semibold text-foreground">Connection checks</div>
<div className="mb-2 text-[12px] font-semibold text-foreground">
{t("settings.channels.connectionChecks")}
</div>
<div className="space-y-2">
{validation.checks.slice(0, 6).map((check) => (
<div key={check.id} className="flex gap-2 text-[12px] leading-5">
@@ -326,7 +329,7 @@ export function ChannelValidationChecks({ validation }: { validation: ChannelVal
rel="noreferrer"
className="inline-flex items-center gap-1 text-foreground underline decoration-border underline-offset-4"
>
Open
{t("settings.channels.open")}
<ExternalLink className="h-3 w-3" aria-hidden />
</a>
) : null}
+4 -2
View File
@@ -1,4 +1,5 @@
import { type RefObject, useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
import type { UIMessage } from "@/lib/types";
@@ -49,6 +50,7 @@ export function PromptRail({
onJumpToPrompt,
scrollRef,
}: PromptRailProps) {
const { t } = useTranslation();
const railRef = useRef<HTMLDivElement>(null);
const measuredPromptsRef = useRef<MeasuredPrompt[]>([]);
const promptAnchors = useMemo(() => userPromptAnchors(messages), [messages]);
@@ -142,7 +144,7 @@ export function PromptRail({
return (
<div
ref={railRef}
aria-label="User prompt navigation"
aria-label={t("thread.promptNavigator.railAria")}
className={cn(
"thread-prompt-rail group pointer-events-auto absolute top-3 z-20 w-9 opacity-100",
"transition-opacity duration-200",
@@ -159,7 +161,7 @@ export function PromptRail({
<button
key={marker.ids.join("|")}
type="button"
aria-label={`Jump to prompt: ${marker.label}`}
aria-label={t("thread.promptNavigator.jumpTo", { label: marker.label })}
onClick={() => onJumpToPrompt(marker.ids[marker.ids.length - 1])}
onBlur={() => setFocusedMarkerIndex(null)}
onFocus={() => setFocusedMarkerIndex(index)}
+12 -7
View File
@@ -75,6 +75,7 @@ import {
} from "@/hooks/useAttachedImages";
import { useClipboardAndDrop } from "@/hooks/useClipboardAndDrop";
import { useLogoFallback } from "@/hooks/useLogoFallback";
import { useMediaQuery } from "@/hooks/useMediaQuery";
import type { SendAttachment, SendOptions } from "@/hooks/useNanobotStream";
import { usePageVisibility } from "@/hooks/usePageVisibility";
import { useVoiceRecorder, type VoiceRecorderErrorKey } from "@/hooks/useVoiceRecorder";
@@ -862,6 +863,7 @@ export function ThreadComposer({
const [cursorPosition, setCursorPosition] = useState(0);
const [recentSlashCommands, setRecentSlashCommands] = useState<string[]>(() => readSlashRecents());
const [queuedPrompts, setQueuedPrompts] = useState<QueuedPrompt[]>([]);
const hasTouchPrimaryPointer = useMediaQuery("(hover: none) and (pointer: coarse)");
const textareaRef = useRef<HTMLTextAreaElement>(null);
const formRef = useRef<HTMLFormElement>(null);
const fileInputRef = useRef<HTMLInputElement>(null);
@@ -964,12 +966,12 @@ export function ThreadComposer({
} = useClipboardAndDrop(addFiles);
useEffect(() => {
if (disabled) return;
if (disabled || hasTouchPrimaryPointer) return;
const el = textareaRef.current;
if (!el) return;
const id = requestAnimationFrame(() => el.focus());
return () => cancelAnimationFrame(id);
}, [disabled]);
}, [disabled, hasTouchPrimaryPointer]);
useEffect(() => {
if (!focusRequest || disabled) return;
@@ -1300,13 +1302,13 @@ export function ThreadComposer({
};
}, [filteredMentionCandidates.length, filteredSlashCommands.length, showAnyPalette]);
const resizeTextarea = useCallback(() => {
const resizeTextarea = useCallback((restoreFocus = true) => {
requestAnimationFrame(() => {
const el = textareaRef.current;
if (!el) return;
el.style.height = "auto";
el.style.height = `${Math.min(el.scrollHeight, 260)}px`;
el.focus();
if (restoreFocus) el.focus();
});
}, []);
@@ -1477,13 +1479,13 @@ export function ThreadComposer({
[cliAppMention, resizeTextarea, value],
);
const clearComposerText = useCallback(() => {
const clearComposerText = useCallback((restoreFocus = true) => {
setValue("");
setInlineError(null);
setSlashMenuDismissed(false);
setCliAppMenuDismissed(false);
setCursorPosition(0);
resizeTextarea();
resizeTextarea(restoreFocus);
}, [resizeTextarea]);
const queueGuidancePrompt = useCallback(() => {
@@ -1692,11 +1694,12 @@ export function ThreadComposer({
}
: options,
);
if (hasTouchPrimaryPointer) textareaRef.current?.blur();
setQueuedPrompts([]);
// Bubble owns the data URL copy; safe to revoke every staged blob
// preview here without affecting the rendered message.
clear();
clearComposerText();
clearComposerText(!hasTouchPrimaryPointer);
onQuotedContextChange?.(null);
}, [
activeCliMentionApps,
@@ -1704,6 +1707,7 @@ export function ThreadComposer({
canSend,
clear,
clearComposerText,
hasTouchPrimaryPointer,
handleStop,
isStreaming,
maxTextBytes,
@@ -1795,6 +1799,7 @@ export function ThreadComposer({
};
const onInput: React.FormEventHandler<HTMLTextAreaElement> = (e) => {
if ((e.nativeEvent as InputEvent).isComposing) return;
const el = e.currentTarget;
el.style.height = "auto";
el.style.height = `${Math.min(el.scrollHeight, 260)}px`;
+23 -6
View File
@@ -186,6 +186,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
const pendingPromptJumpRef = useRef<string | null>(null);
const restoreScrollAfterPrependRef =
useRef<{ height: number; top: number } | null>(null);
const composerInputScrollTopRef = useRef<number | null>(null);
const composerDockHeightRef = useRef(0);
const [atBottom, setAtBottom] = useState(true);
const [composerDockHeight, setComposerDockHeight] = useState(0);
@@ -542,7 +543,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
const near = distance < NEAR_BOTTOM_PX;
const owner = threadMotionRef.current?.observeScroll(near) ?? "automatic";
const logicallyAtBottom = owner === "automatic" || near;
const logicallyAtBottom = owner === "automatic" || (owner === "navigation" && near);
setAtBottom((current) =>
current === logicallyAtBottom ? current : logicallyAtBottom,
);
@@ -557,6 +558,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
if (!direction) return;
threadMotionRef.current?.handleUserScrollIntent(
canScrollInDirection(el, direction),
direction === "forward",
);
};
const handleWheel = (event: WheelEvent) => {
@@ -572,20 +574,21 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
const handlePointerDown = (event: PointerEvent) => {
if (event.button === 0 && event.target === el) yieldCameraToUser();
};
let touchStartY: number | null = null;
let lastTouchY: number | null = null;
const handleTouchStart = (event: TouchEvent) => {
touchStartY = event.touches[0]?.clientY ?? null;
lastTouchY = event.touches[0]?.clientY ?? null;
};
const handleTouchMove = (event: TouchEvent) => {
const currentY = event.touches[0]?.clientY;
const scrollDeltaY =
touchStartY !== null && currentY !== undefined
? touchStartY - currentY
lastTouchY !== null && currentY !== undefined
? lastTouchY - currentY
: 0;
lastTouchY = currentY ?? null;
handleDirectionalInput(directionFromDelta(scrollDeltaY));
};
const handleTouchEnd = () => {
touchStartY = null;
lastTouchY = null;
};
const handleKeyDown = (event: KeyboardEvent) => {
if (
@@ -686,9 +689,23 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
data-testid="thread-composer-dock"
onInputCapture={(event) => {
if (event.target instanceof HTMLTextAreaElement) {
composerInputScrollTopRef.current = scrollRef.current?.scrollTop ?? null;
threadMotionRef.current?.handleComposerInput();
}
}}
onInput={(event) => {
if (!(event.target instanceof HTMLTextAreaElement)) return;
const previousScrollTop = composerInputScrollTopRef.current;
composerInputScrollTopRef.current = null;
const scrollEl = scrollRef.current;
if (scrollEl && previousScrollTop !== null) {
// Textarea autosizing briefly collapses to `height: auto` while
// measuring. Chrome can clamp the sibling thread scrollport in
// that intermediate layout; restore it before paint, then let
// ResizeObserver handle any real final composer height change.
scrollEl.scrollTop = previousScrollTop;
}
}}
className={cn(
"row-start-2 z-10 w-full",
hasMessages ? "relative bg-background" : "relative self-center",
+34 -5
View File
@@ -168,6 +168,9 @@ export class ThreadMotionCoordinator {
private measurementFrameId: number | null = null;
private geometryDirty = false;
private composerInputDuringTurn = false;
// A user leaving the live tail must first move beyond the near-bottom
// boundary, or explicitly reverse toward latest, before follow can resume.
private resumeFollowArmed = false;
constructor(options: ThreadMotionCoordinatorOptions) {
this.camera = options.camera;
@@ -198,6 +201,7 @@ export class ThreadMotionCoordinator {
if (isNewTurn) {
this.camera.cancel();
this.composerInputDuringTurn = false;
this.resumeFollowArmed = false;
this.promptPositioned = turn.entry === "restored";
this.mode = this.promptPositioned && turn.hasOutput
? "follow-output"
@@ -249,15 +253,31 @@ export class ThreadMotionCoordinator {
this.handleUserScrollIntent(true);
}
handleUserScrollIntent(canScroll: boolean): void {
handleUserScrollIntent(canScroll: boolean, towardLatest = false): void {
if (this.mode === "browsing-history" && towardLatest && !canScroll) {
this.transitionToAutoFollow(false);
return;
}
const event = canScroll ? "user-scroll" : "boundary-scroll";
if (!this.transition(event)) return;
const transitioned = this.transition(event);
if (this.mode === "browsing-history" && canScroll) {
this.resumeFollowArmed = towardLatest;
} else if (transitioned && this.mode === "browsing-history") {
this.resumeFollowArmed = false;
}
if (!transitioned) return;
this.camera.cancel();
}
resumeAutoFollow(): void {
this.transitionToAutoFollow(true);
}
private transitionToAutoFollow(cancelCamera: boolean): void {
if (!this.transition("resume-follow")) return;
this.camera.cancel();
this.resumeFollowArmed = false;
if (cancelCamera) this.camera.cancel();
this.onAutoFollow?.();
this.invalidateGeometry();
}
@@ -317,11 +337,19 @@ export class ThreadMotionCoordinator {
case "navigating-history":
if (!this.camera.isFollowing()) {
this.transition("navigation-settled");
if (nearBottom) this.resumeAutoFollow();
if (nearBottom) {
this.resumeAutoFollow();
} else {
this.resumeFollowArmed = true;
}
}
return "navigation";
case "browsing-history":
if (!nearBottom) return "user";
if (!nearBottom) {
this.resumeFollowArmed = true;
return "user";
}
if (!this.resumeFollowArmed) return "user";
this.resumeAutoFollow();
return "automatic";
default:
@@ -339,6 +367,7 @@ export class ThreadMotionCoordinator {
this.camera.cancel();
this.turn = { id: null, promptId: null, hasOutput: false };
this.composerInputDuringTurn = false;
this.resumeFollowArmed = false;
this.mode = "idle";
this.promptPositioned = false;
}
+7 -3
View File
@@ -1,6 +1,7 @@
import * as React from "react";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";
import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
@@ -30,7 +31,9 @@ interface DialogContentProps
const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
DialogContentProps
>(({ className, children, showCloseButton = true, ...props }, ref) => (
>(({ className, children, showCloseButton = true, ...props }, ref) => {
const { t } = useTranslation();
return (
<DialogPortal>
<DialogOverlay />
<div className="fixed inset-0 z-50 flex items-center justify-center p-4">
@@ -46,13 +49,14 @@ const DialogContent = React.forwardRef<
{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" />
<span className="sr-only">Close</span>
<span className="sr-only">{t("common.close")}</span>
</DialogPrimitive.Close>
) : null}
</DialogPrimitive.Content>
</div>
</DialogPortal>
));
);
});
DialogContent.displayName = DialogPrimitive.Content.displayName;
const DialogHeader = ({
+7 -3
View File
@@ -2,6 +2,7 @@ import * as React from "react";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";
import { cva, type VariantProps } from "class-variance-authority";
import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
@@ -74,7 +75,9 @@ const SheetContent = React.forwardRef<
...props
},
ref,
) => (
) => {
const { t } = useTranslation();
return (
<SheetPortal>
<SheetOverlay />
<DialogPrimitive.Content
@@ -98,12 +101,13 @@ const SheetContent = React.forwardRef<
)}
>
<X className="h-4 w-4" />
<span className="sr-only">Close</span>
<span className="sr-only">{t("common.close")}</span>
</DialogPrimitive.Close>
) : null}
</DialogPrimitive.Content>
</SheetPortal>
));
);
});
SheetContent.displayName = DialogPrimitive.Content.displayName;
const SheetTitle = React.forwardRef<
+1 -1
View File
@@ -20,7 +20,7 @@ import type {
} from "@/lib/types";
const EMPTY_MESSAGES: UIMessage[] = [];
const INITIAL_HISTORY_PAGE_LIMIT = 160;
const INITIAL_HISTORY_PAGE_LIMIT = 80;
const OLDER_HISTORY_PAGE_LIMIT = 120;
const CHAT_CREATE_TIMEOUT_MS = 60_000;
+49 -9
View File
@@ -38,6 +38,15 @@
},
"meta": {
"description": "nanobot web UI — chat with your nanobot workspace."
},
"pairing": {
"title": "Pair a chat user",
"description": "Enter the pairing code shown in the chat.",
"code": "Pairing code",
"matched": "Matched {{channel}}. Connecting...",
"expiresInline": "Code expires {{expires}}.",
"queueCount": "{{count}} pending",
"noMatch": "No pending request matches this code."
}
},
"sidebar": {
@@ -99,7 +108,7 @@
"webBehavior": "Behavior",
"cliApps": "CLI apps",
"mcp": "MCP services",
"identity": "Identity",
"regional": "Regional",
"webuiSafety": "Web safety",
"capabilities": "Capabilities",
"apps": "Apps",
@@ -190,8 +199,6 @@
"defaultImageSize": "Default size",
"maxImagesPerTurn": "Max images per turn",
"imageSaveDir": "Save directory",
"botName": "Bot name",
"botIcon": "Bot icon",
"timezone": "Timezone",
"workspacePath": "Default workspace",
"localServiceAccess": "Local services",
@@ -235,8 +242,6 @@
"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.",
"botName": "Shown wherever nanobot uses a display name.",
"botIcon": "Short emoji or text shown with the bot name.",
"timezone": "Used for schedules and time-aware replies.",
"cliAppsCatalog": "Install only the app-specific CLI adapters nanobot can run locally; native apps stay untouched.",
"cliAppsFilter": "Search by app, category, or capability.",
@@ -344,6 +349,7 @@
"statusMissingCredentials": "Needs key",
"statusMissingDependency": "Needs dependency",
"statusComingSoon": "Coming soon",
"comingSoon": "Coming soon",
"statusNotInstalled": "Not enabled",
"toolScope": "Tools",
"allTools": "All",
@@ -376,7 +382,10 @@
"configured": "Configured",
"notConfigured": "Not configured",
"pending": "Pending",
"restartingEngine": "Restarting"
"restartingEngine": "Restarting",
"checking": "Checking",
"running": "Running",
"needsSetup": "Needs setup"
},
"status": {
"loading": "Loading settings...",
@@ -404,6 +413,7 @@
"delete": "Delete",
"deleting": "Deleting...",
"cancel": "Cancel",
"dismiss": "Dismiss",
"open": "Open",
"export": "Export",
"opening": "Opening...",
@@ -513,9 +523,19 @@
"selectProvider": "Select provider",
"selectAspect": "Select aspect",
"selectSize": "Select size",
"selectModel": "Select image model",
"searchOrTypeModel": "Search or type model ID",
"typeModelId": "Type the model ID supported by this provider.",
"configureProvider": "Configure provider",
"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..."
},
"api": {
"title": "API server",
"openaiCompatible": "OpenAI-compatible API",
@@ -583,6 +603,8 @@
"advanced": "Advanced",
"checkAndEnable": "Check and enable",
"checkConnection": "Check connection",
"connectionChecks": "Connection checks",
"open": "Open",
"checkedAndEnabled": "Checked and enabled.",
"checking": "Checking...",
"checkOnly": "Check only",
@@ -678,6 +700,8 @@
"protected": "Protected",
"editTitle": "Edit automation",
"save": "Save",
"commandCopied": "Copied",
"copyCommand": "Copy",
"deleteTitle": "Delete automation",
"deleteDescription": "This removes {{name}} from the cron store. Past chat messages stay in the session.",
"cancel": "Cancel",
@@ -737,6 +761,7 @@
"fields": {
"name": "Name",
"message": "Message",
"command": "Command",
"scheduleType": "Schedule type",
"every": "Every",
"unit": "Unit",
@@ -1197,7 +1222,9 @@
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "Use @{{name}} as a local CLI app",
"mcpDescription": "Use @{{name}} as an MCP server"
"mcpDescription": "Use @{{name}} as an MCP server",
"cliTitle": "CLI app: {{name}}",
"mcpTitle": "MCP server: {{name}}"
},
"encoding": "Encoding…",
"remove": "Remove attachment",
@@ -1233,7 +1260,8 @@
"title": "Prompts",
"search": "Search prompts",
"noResults": "No matching prompts.",
"jumpTo": "Jump to prompt: {{label}}"
"jumpTo": "Jump to prompt: {{label}}",
"railAria": "User prompt navigation"
}
},
"message": {
@@ -1272,6 +1300,14 @@
"cliRunRan": "Used",
"cliRunFailed": "Failed",
"imageAttachment": "Image attachment",
"videoAttachment": "Video attachment",
"fileAttachment": "File attachment",
"attachmentUnavailable": "Attachment unavailable",
"dataTable": "Data table",
"fileEditPreparing": "Preparing file edit…",
"openLink": "Open link: {{label}}",
"openAttachment": "Open {{name}}",
"skill": "Skill: {{name}}",
"automationSourceFallback": "Automation",
"automationTriggered": "Triggered automatically",
"askAboutSelection": "Ask about this",
@@ -1297,6 +1333,7 @@
},
"filePreview": {
"aria": "File preview",
"breadcrumb": "File path",
"close": "Close file preview",
"loading": "Loading preview...",
"failed": "Could not preview this file.",
@@ -1311,7 +1348,10 @@
"copied": "Copied"
},
"common": {
"dismiss": "Dismiss"
"dismiss": "Dismiss",
"close": "Close",
"current": "Current",
"cancel": "Cancel"
},
"errors": {
"messageTooBig": {
+169 -129
View File
@@ -38,6 +38,15 @@
},
"meta": {
"description": "Interfaz web de nanobot: conversa con tu espacio de trabajo de nanobot."
},
"pairing": {
"title": "Vincular a un usuario del chat",
"description": "Introduce el código de vinculación que aparece en el chat.",
"code": "Código de vinculación",
"matched": "Coincidencia: {{channel}}. Conectando...",
"expiresInline": "El código caduca {{expires}}.",
"queueCount": "{{count}} pendientes",
"noMatch": "No hay ninguna solicitud pendiente que coincida con este código."
}
},
"sidebar": {
@@ -54,7 +63,7 @@
"label": "Idioma",
"ariaLabel": "Cambiar idioma"
},
"apps": "Apps",
"apps": "Aplicaciones",
"automations": "Automatizaciones",
"skills": {
"title": "Habilidades"
@@ -79,7 +88,7 @@
"channels": "Canales",
"runtime": "Sistema",
"advanced": "Seguridad",
"cliApps": "Apps CLI",
"cliApps": "Aplicaciones CLI",
"mcp": "MCP",
"apps": "Aplicaciones",
"automations": "Automatizaciones",
@@ -97,7 +106,7 @@
"imageDefaults": "Valores predeterminados",
"webSearch": "Búsqueda web",
"webBehavior": "Comportamiento",
"identity": "Identidad",
"regional": "Configuración regional",
"webuiSafety": "Seguridad de WebUI",
"capabilities": "Capacidades",
"cliApps": "Aplicaciones CLI",
@@ -136,10 +145,8 @@
"defaultImageSize": "Tamaño predeterminado",
"maxImagesPerTurn": "Máx. imágenes por turno",
"imageSaveDir": "Directorio de guardado",
"botName": "Nombre del bot",
"botIcon": "Icono del bot",
"timezone": "Zona horaria",
"workspacePath": "Workspace predeterminado",
"workspacePath": "Espacio de trabajo predeterminado",
"localServiceAccess": "Servicios locales",
"webuiDefaultAccess": "Acceso predeterminado",
"currentModel": "Configuración actual",
@@ -150,12 +157,12 @@
"logs": "Registros",
"diagnostics": "Diagnóstico",
"contextWindow": "Ventana de contexto",
"transcription": "Transcripcion",
"transcription": "Transcripción",
"transcriptionProvider": "Proveedor",
"transcriptionProviderStatus": "Estado del proveedor",
"transcriptionProviderStatus": "Estado del proveedor de transcripción",
"transcriptionModel": "Modelo",
"transcriptionLanguage": "Idioma",
"voiceLimits": "Limites"
"voiceLimits": "Límites"
},
"help": {
"theme": "Cambia entre apariencia clara y oscura.",
@@ -164,42 +171,40 @@
"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 Default para editar modelo y proveedor desde WebUI.",
"presetModel": "Cambia a Predeterminado para editar el modelo y el proveedor desde WebUI.",
"density": "Solo se guarda en este navegador.",
"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 el diff.",
"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.",
"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.",
"imageProviderStatus": "La generación de imágenes reutiliza credenciales de Proveedores.",
"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 el prompt no elige una proporción.",
"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.",
"botName": "Se muestra donde nanobot usa un nombre visible.",
"botIcon": "Emoji o texto corto junto al nombre del bot.",
"timezone": "Se usa para horarios y respuestas con conciencia temporal.",
"localServiceAccess": "Permite que comandos shell con Full Access alcancen servicios localhost.",
"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.",
"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.",
"cliAppsCatalog": "Instala solo adaptadores CLI de apps que nanobot puede ejecutar localmente; las apps nativas no se modifican.",
"cliAppsFilter": "Busca por app, categoría o capacidad.",
"cliAppsCatalog": "Instala solo adaptadores CLI de aplicaciones que nanobot puede ejecutar localmente; las aplicaciones nativas 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 de runtime para soporte.",
"localServiceAccessNative": "Permite que comandos shell con Full Access alcancen servicios en este Mac.",
"diagnostics": "Exporta un pequeño informe del tiempo de ejecución para 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.",
"transcription": "Transcribe la entrada del microfono antes de enviarla. Los mensajes de voz de los canales usan la misma configuracion.",
"transcriptionProvider": "Usa las credenciales del proveedor correspondiente en Proveedores.",
"transcriptionProviderStatus": "Las claves API permanecen en proveedores, no en la configuracion de transcripcion.",
"transcriptionModel": "Dejalo como el valor predeterminado resuelto salvo que el proveedor necesite un id de modelo personalizado.",
"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."
},
"values": {
@@ -219,7 +224,7 @@
"expanded": "Expandido",
"default": "Predeterminado",
"summary": "Resumen",
"diff": "Diff",
"diff": "Diferencias",
"collapsedDiff": "Diff contraído",
"on": "Activado",
"off": "Desactivado",
@@ -228,7 +233,10 @@
"configured": "Configurado",
"notConfigured": "Sin configurar",
"pending": "Pendiente",
"restartingEngine": "Reiniciando"
"restartingEngine": "Reiniciando",
"checking": "Comprobando",
"running": "En ejecución",
"needsSetup": "Requiere configuración"
},
"status": {
"loading": "Cargando ajustes...",
@@ -256,6 +264,7 @@
"deleting": "Eliminando...",
"edit": "Editar",
"cancel": "Cancelar",
"dismiss": "Descartar",
"open": "Abrir",
"export": "Exportar",
"opening": "Abriendo...",
@@ -269,15 +278,15 @@
"notConfiguredSection": "Sin configurar",
"showMore": "Mostrar {{count}} más",
"showLess": "Mostrar menos",
"apiKey": "API key",
"apiBase": "API base",
"apiKeyPlaceholder": "Introduce la API key",
"apiKeyConfiguredPlaceholder": "Deja vacío para conservar la key actual",
"apiKey": "Clave API",
"apiBase": "Base de la API",
"apiKeyPlaceholder": "Introduce la clave API",
"apiKeyConfiguredPlaceholder": "Déjalo vacío para conservar la clave actual",
"configuredKeyHint": "Key configurada",
"apiBasePlaceholder": "Usar el valor predeterminado del proveedor",
"apiKeyRequired": "Se requiere una API key para configurar este proveedor.",
"showApiKey": "Mostrar API key",
"hideApiKey": "Ocultar API key",
"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",
@@ -288,19 +297,19 @@
},
"webSearch": {
"provider": "Proveedor de búsqueda",
"providerHelp": "Elige el backend que usará la herramienta web search.",
"providerHelp": "Elige el backend que usará la herramienta de búsqueda web.",
"selectProvider": "Seleccionar proveedor",
"credentials": "Credenciales",
"noCredentialRequired": "No requiere key",
"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.",
"baseUrl": "Base URL",
"baseUrl": "URL base",
"baseUrlHelp": "SearXNG necesita la URL de tu propia instancia.",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "Este proveedor de búsqueda requiere una API key.",
"baseUrlRequired": "SearXNG requiere una Base URL.",
"apiKeyRequired": "Este proveedor de búsqueda requiere una clave API.",
"baseUrlRequired": "SearXNG requiere una URL base.",
"missingCredential": "Añade la credencial requerida antes de guardar.",
"saveHint": "Los cambios se aplican a nuevas solicitudes de web search."
"saveHint": "Los cambios se aplican a nuevas solicitudes de búsqueda web."
}
},
"overview": {
@@ -315,7 +324,7 @@
},
"usage": {
"title": "Actividad de tokens",
"shortTitle": "Token Usage",
"shortTitle": "Uso de 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",
@@ -362,9 +371,19 @@
"selectProvider": "Seleccionar proveedor",
"selectAspect": "Seleccionar proporción",
"selectSize": "Seleccionar tamaño",
"selectModel": "Seleccionar modelo de imagen",
"searchOrTypeModel": "Buscar o escribir ID del modelo",
"typeModelId": "Escribe el ID de modelo compatible con este proveedor.",
"configureProvider": "Configurar proveedor",
"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..."
},
"models": {
"selectModel": "Seleccionar modelo",
"addConfiguration": "Agregar configuración",
@@ -437,8 +456,8 @@
"statusUnsupported": "No compatible",
"statusNotInstalled": "No instalada",
"unsupported": "No compatible",
"loading": "Cargando apps CLI...",
"empty": "Ninguna app CLI coincide con este filtro.",
"loading": "Cargando aplicaciones CLI...",
"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.",
@@ -462,11 +481,11 @@
},
"mcp": {
"allCategories": "Todas las categorías",
"summary": "{{installed}} de {{total}} presets habilitados",
"summary": "{{installed}} de {{total}} preajustes habilitados",
"filterAll": "Todos",
"filterInstalled": "Habilitados",
"filterNotInstalled": "No habilitados",
"searchPlaceholder": "Buscar presets MCP",
"searchPlaceholder": "Buscar preajustes MCP",
"moreOptions": "Más opciones de MCP",
"moreOptionsSubtitle": "Añade un servidor personalizado o importa mcp.json.",
"customTitle": "MCP personalizado",
@@ -477,9 +496,9 @@
"serverUrl": "URL",
"transport": "Transporte",
"command": "Comando",
"args": "Args JSON",
"headers": "Headers JSON",
"env": "Env JSON",
"args": "Argumentos JSON",
"headers": "Encabezados JSON",
"env": "Entorno JSON",
"timeout": "Tiempo límite de herramienta",
"advancedOptions": "Opciones avanzadas",
"hideAdvanced": "Ocultar avanzado",
@@ -488,8 +507,8 @@
"importConfig": "Importar",
"restartRequired": "Reinicia nanobot para conectar las herramientas MCP actualizadas.",
"toolsFound": "{{count}} herramientas",
"loading": "Cargando presets MCP...",
"empty": "Ningún preset MCP coincide con este filtro.",
"loading": "Cargando preajustes MCP...",
"empty": "Ningún preajuste MCP coincide con este filtro.",
"openDocs": "Abrir docs",
"test": "Probar",
"remove": "Eliminar",
@@ -507,6 +526,7 @@
"statusMissingCredentials": "Necesita clave",
"statusMissingDependency": "Necesita dependencia",
"statusComingSoon": "Próximamente",
"comingSoon": "Próximamente",
"statusNotInstalled": "No habilitado",
"toolScope": "Herramientas",
"allTools": "Todas",
@@ -532,24 +552,24 @@
},
"apps": {
"description": "Añade herramientas a nanobot y luego úsalas con @ en el chat.",
"cliLabel": "App",
"cliLabel": "Aplicación",
"mcpLabel": "Integración",
"channelLabel": "Canal",
"featureLabel": "Función",
"filterAll": "Listo",
"filterPlugins": "Complementos",
"filterCli": "Apps",
"filterCli": "Aplicaciones",
"filterMcp": "Integraciones",
"enabledSummary": "{{count}} listos",
"caption": "{{cli}} apps · {{mcp}} integraciones",
"searchPlaceholder": "Buscar apps",
"caption": "{{cli}} aplicaciones · {{mcp}} integraciones",
"searchPlaceholder": "Buscar aplicaciones",
"featured": "Herramientas",
"loading": "Cargando apps...",
"loading": "Cargando aplicaciones...",
"empty": "Ninguna herramienta coincide con esta vista.",
"restartRequired": "Reinicia nanobot para aplicar apps y funciones actualizadas."
"restartRequired": "Reinicia nanobot para aplicar las aplicaciones y funciones actualizadas."
},
"channels": {
"description": "Conecta nanobot con apps de chat. Instalar 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.",
"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",
"searchPlaceholder": "Buscar canales",
"backToChannels": "Todos los canales",
@@ -570,6 +590,8 @@
"advanced": "Avanzado",
"checkAndEnable": "Comprobar y activar",
"checkConnection": "Comprobar conexión",
"connectionChecks": "Comprobaciones de conexión",
"open": "Abrir",
"checkedAndEnabled": "Comprobado y activado.",
"checking": "Comprobando...",
"checkOnly": "Solo comprobar",
@@ -665,6 +687,8 @@
"protected": "Protegida",
"editTitle": "Editar automatización",
"save": "Guardar",
"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.",
"cancel": "Cancelar",
@@ -724,6 +748,7 @@
"fields": {
"name": "Nombre",
"message": "Mensaje",
"command": "Comando",
"scheduleType": "Tipo de programación",
"every": "Cada",
"unit": "Unidad",
@@ -789,48 +814,48 @@
"customGroup": "Personalizadas",
"builtinGroup": "Integradas",
"otherGroup": "Otras",
"searchInstalled": "Buscar skills instaladas",
"searchInstalled": "Buscar habilidades instaladas",
"filterAll": "Todas",
"filterEnabled": "Activadas",
"filterDisabled": "Desactivadas",
"noMatching": "No hay skills coincidentes.",
"noMatching": "No hay habilidades coincidentes.",
"statusDisabled": "Desactivada",
"statusEnabled": "Activada",
"statusNeedsSetup": "Requiere configuración",
"showLess": "Mostrar menos",
"showMore": "Mostrar más",
"enabledControl": "Usar esta skill",
"enabledDescription": "Permite que el agente cargue esta skill cuando sus requisitos estén listos.",
"enabledControl": "Usar esta habilidad",
"enabledDescription": "Permite que el agente cargue esta habilidad cuando sus requisitos estén listos.",
"enableSkill": "Activar {{name}}",
"disableSkill": "Desactivar {{name}}",
"updateFailed": "No se pudo actualizar esta skill.",
"deleteTitle": "Eliminar skill",
"deleteDescription": "Elimina esta skill del espacio de trabajo actual.",
"updateFailed": "No se pudo actualizar esta habilidad.",
"deleteTitle": "Eliminar habilidad",
"deleteDescription": "Elimina esta habilidad del espacio de trabajo actual.",
"deleteAction": "Eliminar",
"deleteFailed": "No se pudo eliminar esta skill.",
"deleteFailed": "No se pudo eliminar esta habilidad.",
"deleteConfirmTitle": "¿Eliminar {{name}}?",
"deleteConfirmDescription": "Esto elimina los archivos de la skill del espacio de trabajo actual. Esta acción no se puede deshacer.",
"deleteConfirmAction": "Eliminar skill",
"instructionsTitle": "Instrucciones de la skill",
"deleteConfirmDescription": "Esto elimina los archivos de la habilidad del espacio de trabajo actual. Esta acción no se puede deshacer.",
"deleteConfirmAction": "Eliminar habilidad",
"instructionsTitle": "Instrucciones de la habilidad",
"setupRequired": "Requiere configuración",
"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 skills.",
"marketplaceInstallFailed": "No se pudo instalar este skill.",
"marketplaceSearchPlaceholder": "Buscar skills",
"marketplaceSearchLabel": "Buscar skills",
"marketplaceSearchFailed": "No se pudieron buscar los mercados de habilidades.",
"marketplaceInstallFailed": "No se pudo instalar esta habilidad.",
"marketplaceSearchPlaceholder": "Buscar habilidades",
"marketplaceSearchLabel": "Buscar habilidades",
"marketplaceSearching": "Buscando",
"marketplaceProviderFilter": "Origen del skill",
"marketplaceProviderFilter": "Origen de la habilidad",
"marketplaceProviderAll": "Todos",
"marketplaceTrendingTitle": "Tendencias por mercado",
"marketplaceTrendingDescription": "Cada mercado conserva su propio ranking y métricas de instalación.",
"marketplaceViewAll": "Ver todos",
"marketplaceTrendingUnavailable": "Los skills populares no están disponibles temporalmente.",
"marketplaceEmpty": "No se encontraron skills para “{{query}}”.",
"marketplaceTrendingUnavailable": "Las habilidades populares no están disponibles temporalmente.",
"marketplaceEmpty": "No se encontraron habilidades para “{{query}}”.",
"marketplaceConfirmTitle": "¿Instalar {{name}}?",
"marketplaceConfirmDescription": "Este skill de terceros procede de {{provider}} ({{source}}) y puede incluir instrucciones o scripts ejecutables.",
"marketplaceConfirmInstall": "Instalar skill",
"marketplaceConfirmDescription": "Esta habilidad de terceros procede de {{provider}} ({{source}}) y puede incluir instrucciones o scripts ejecutables.",
"marketplaceConfirmInstall": "Instalar habilidad",
"marketplaceOpen": "Abrir {{name}} en {{provider}}",
"marketplaceOpenProvider": "Abrir {{provider}}",
"marketplaceInstalls24h": "{{formattedCount}} instalaciones / 24 h",
@@ -868,7 +893,7 @@
"voice": {
"selectProvider": "Seleccionar proveedor",
"configureProvider": "Configurar proveedor",
"languageAuto": "Auto"
"languageAuto": "Automático"
}
},
"chat": {
@@ -882,34 +907,34 @@
"actions": "Acciones del tema {{title}}",
"newInProject": "Iniciar un tema nuevo en {{project}}",
"activity": {
"running": "Agent running",
"complete": "Agent finished",
"updated": "New activity"
"running": "Agente en ejecución",
"complete": "Agente terminado",
"updated": "Nueva actividad"
},
"pin": "Pin",
"unpin": "Unpin",
"rename": "Rename",
"pin": "Fijar",
"unpin": "Desfijar",
"rename": "Renombrar",
"renameTitle": "Renombrar tema",
"renameDescription": "Elige un nombre local de la barra lateral para este tema.",
"renamePlaceholder": "Nombre del tema",
"renameProjectTitle": "Rename project",
"renameProjectDescription": "Choose a local sidebar name for this project.",
"renameProjectPlaceholder": "Project name",
"renameSave": "Save",
"archive": "Archive",
"unarchive": "Unarchive",
"showArchived": "Show archived",
"hideArchived": "Hide archived",
"renameProjectTitle": "Renombrar proyecto",
"renameProjectDescription": "Elige un nombre local para este proyecto en la barra lateral.",
"renameProjectPlaceholder": "Nombre del proyecto",
"renameSave": "Guardar",
"archive": "Archivar",
"unarchive": "Desarchivar",
"showArchived": "Mostrar archivados",
"hideArchived": "Ocultar archivados",
"delete": "Eliminar",
"newChat": "Nuevo tema",
"groups": {
"pinned": "Pinned",
"pinned": "Fijados",
"all": "Temas",
"projects": "Projects",
"today": "Today",
"yesterday": "Yesterday",
"earlier": "Earlier",
"archived": "Archived"
"projects": "Proyectos",
"today": "Hoy",
"yesterday": "Ayer",
"earlier": "Anteriores",
"archived": "Archivados"
}
},
"deleteConfirm": {
@@ -975,25 +1000,25 @@
},
"more": {
"title": "Más",
"prompt": "Muéstrame algunas formas útiles en las que puedes ayudar en este workspace."
"prompt": "Muéstrame algunas formas útiles en las que puedes ayudar en este espacio de trabajo."
}
},
"imageQuickActions": {
"icon": {
"title": "Diseñar un icono de app",
"prompt": "Genera un icono de app 1:1 limpio para nanobot: robot amigable, estilo vectorial simple, paleta suave azul y blanca, sin texto."
"title": "Diseñar un icono de aplicación",
"prompt": "Genera un icono de aplicación 1:1 limpio para nanobot: robot amigable, estilo vectorial simple, paleta suave azul y blanca, sin texto."
},
"sticker": {
"title": "Crear un sticker",
"prompt": "Genera una imagen estilo sticker de un pequeño asistente robot, con fondo de apariencia transparente, expresivo y divertido."
"title": "Crear una pegatina",
"prompt": "Genera una imagen estilo pegatina de un pequeño asistente robot, con fondo de apariencia transparente, expresivo y divertido."
},
"poster": {
"title": "Crear un póster",
"prompt": "Genera un concepto de póster pulido para un asistente personal de IA, composición moderna, jerarquía visual fuerte, apto para una landing page."
"prompt": "Genera un concepto de póster pulido para un asistente personal de IA, composición moderna, jerarquía visual fuerte, apto para una página de destino."
},
"product": {
"title": "Mockup de producto",
"prompt": "Genera una imagen limpia de mockup de producto para una app web de IA conversacional, interfaz mínima, iluminación premium, marco de dispositivo realista."
"title": "Maqueta de producto",
"prompt": "Genera una imagen limpia de maqueta de producto para una aplicación web de IA conversacional, interfaz mínima, iluminación premium, marco de dispositivo realista."
},
"portrait": {
"title": "Retrato estilizado",
@@ -1071,7 +1096,7 @@
"aspectAria": "Relación de aspecto de imagen",
"aspectLabel": "Formato de imagen",
"aspect": {
"auto": "Auto",
"auto": "Automático",
"1_1": "Cuadrado 1:1",
"3_4": "Vertical 3:4",
"9_16": "Historia 9:16",
@@ -1114,7 +1139,7 @@
},
"stop": {
"title": "Detener tarea actual",
"description": "Cancela el turno activo del agent en este chat."
"description": "Cancela el turno activo del agente en este chat."
},
"restart": {
"title": "Reiniciar nanobot",
@@ -1122,11 +1147,11 @@
},
"status": {
"title": "Mostrar estado",
"description": "Muestra el estado del runtime, provider y channels."
"description": "Muestra el estado del tiempo de ejecución, proveedor y canales."
},
"model": {
"title": "Modelo",
"description": "Muestra o cambia el preset de modelo activo."
"description": "Muestra o cambia el preajuste de modelo activo."
},
"history": {
"title": "Mostrar historial",
@@ -1153,8 +1178,8 @@
"description": "Indica al agente que trate esto como un objetivo sostenido en varios pasos."
},
"trigger": {
"title": "Crear trigger local",
"description": "Crea un trigger de CLI vinculado a esta sesion de chat."
"title": "Crear un activador local",
"description": "Crea un activador de CLI vinculado a esta sesión de chat."
},
"help": {
"title": "Mostrar ayuda",
@@ -1178,7 +1203,7 @@
},
"encoding": "Procesando…",
"remove": "Quitar adjunto",
"normalizedSizeHint": "{{orig}} → {{current}} (auto)",
"normalizedSizeHint": "{{orig}} → {{current}} (automático)",
"textTooLarge": "El texto del mensaje es demasiado grande (máximo {{max}})",
"imageRejected": {
"unsupported_type": "Tipo de archivo no compatible",
@@ -1193,14 +1218,16 @@
"io": "No se pudo leer este archivo"
},
"mentions": {
"ariaLabel": "Apps",
"label": "Apps",
"cliGroup": "Apps CLI",
"ariaLabel": "Aplicaciones",
"label": "Aplicaciones",
"cliGroup": "Aplicaciones CLI",
"mcpGroup": "Servicios MCP",
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "Usar @{{name}} como app CLI local",
"mcpDescription": "Usar @{{name}} como servidor MCP"
"cliDescription": "Usar @{{name}} como aplicación CLI local",
"mcpDescription": "Usar @{{name}} como servidor MCP",
"cliTitle": "Aplicación CLI: {{name}}",
"mcpTitle": "Servidor MCP: {{name}}"
},
"workspace": {
"accessAria": "Modo de acceso al espacio de trabajo",
@@ -1216,11 +1243,12 @@
"loadEarlier": "Cargar mensajes anteriores",
"forkedFromHistory": "Bifurcado desde el historial",
"promptNavigator": {
"open": "Abrir navegador de prompts",
"title": "Prompts",
"search": "Buscar prompts",
"noResults": "No hay prompts coincidentes.",
"jumpTo": "Ir al prompt: {{label}}"
"open": "Abrir el navegador de instrucciones",
"title": "Instrucciones",
"search": "Buscar instrucciones",
"noResults": "No hay instrucciones coincidentes.",
"jumpTo": "Ir a la instrucción: {{label}}",
"railAria": "Navegación por instrucciones del usuario"
}
},
"message": {
@@ -1244,19 +1272,27 @@
"agentActivityLiveSummary": "En curso… · {{reasoning}} pasos · {{tools}} llamadas a herramientas",
"agentActivityLiveToolsOnly": "En curso… · {{tools}} llamadas a herramientas",
"imageAttachment": "Imagen adjunta",
"videoAttachment": "Archivo de vídeo",
"fileAttachment": "Archivo adjunto",
"attachmentUnavailable": "Adjunto no disponible",
"dataTable": "Tabla de datos",
"fileEditPreparing": "Preparando la edición del archivo…",
"openLink": "Abrir enlace: {{label}}",
"openAttachment": "Abrir {{name}}",
"skill": "Habilidad: {{name}}",
"askAboutSelection": "Preguntar sobre esto",
"forkFromHere": "Bifurcar",
"copyReply": "Copiar",
"copiedReply": "Copiado",
"turnLatencyTitle": "Tiempo de respuesta (extremo a extremo)",
"fileEditViewDiff": "Ver diff",
"fileEditViewLargeDiff": "Ver diff grande",
"fileEditViewDiff": "Ver diferencias",
"fileEditViewLargeDiff": "Ver diferencias grandes",
"fileEditDiffLineCount": "{{count}} líneas",
"fileEditUnchangedLinesHidden": "{{count}} líneas sin cambios ocultas",
"fileEditShowMoreLines": "Mostrar {{count}} líneas más",
"fileEditShowFewerLines": "Mostrar menos líneas",
"fileEditOpenFile": "Abrir archivo",
"fileEditDiffTruncated": "Diff truncado. Abre el archivo para ver el cambio completo.",
"fileEditDiffTruncated": "Diferencias truncadas. Abre el archivo para ver el cambio completo.",
"activityThinkingFor": "Pensando durante {{duration}}",
"activityThought": "Pensamiento completado",
"activityThoughtFor": "Pensó durante {{duration}}",
@@ -1266,9 +1302,9 @@
"cliActivityRunningOne": "Usando {{name}}",
"cliActivityRanOne": "Usó {{name}}",
"cliActivityFailedOne": "Falló {{name}}",
"cliActivityRunningMany": "Usando {{count}} apps CLI",
"cliActivityRanMany": "Usó {{count}} apps CLI",
"cliActivityFailedMany": "Fallaron {{count}} apps CLI",
"cliActivityRunningMany": "Usando {{count}} aplicaciones CLI",
"cliActivityRanMany": "Usó {{count}} aplicaciones CLI",
"cliActivityFailedMany": "Fallaron {{count}} aplicaciones CLI",
"cliRunRunning": "Usando",
"cliRunRan": "Usado",
"cliRunFailed": "Falló",
@@ -1284,6 +1320,7 @@
},
"filePreview": {
"aria": "Vista previa de archivo",
"breadcrumb": "Ruta del archivo",
"close": "Cerrar vista previa de archivo",
"loading": "Cargando vista previa...",
"failed": "No se pudo previsualizar este archivo.",
@@ -1298,7 +1335,10 @@
"copied": "Copiado"
},
"common": {
"dismiss": "Cerrar"
"dismiss": "Cerrar",
"close": "Cerrar",
"current": "Actual",
"cancel": "Cancelar"
},
"errors": {
"messageTooBig": {
+143 -103
View File
@@ -38,6 +38,15 @@
},
"meta": {
"description": "Interface web nanobot — discutez avec votre espace de travail nanobot."
},
"pairing": {
"title": "Associer un utilisateur du chat",
"description": "Saisissez le code dassociation affiché dans le chat.",
"code": "Code dassociation",
"matched": "Correspondance {{channel}}. Connexion...",
"expiresInline": "Le code expire {{expires}}.",
"queueCount": "{{count}} en attente",
"noMatch": "Aucune demande en attente ne correspond à ce code."
}
},
"sidebar": {
@@ -54,7 +63,7 @@
"label": "Langue",
"ariaLabel": "Changer de langue"
},
"apps": "Apps",
"apps": "Applications",
"automations": "Automatisations",
"skills": {
"title": "Compétences"
@@ -79,7 +88,7 @@
"channels": "Canaux",
"runtime": "Système",
"advanced": "Sécurité",
"cliApps": "Apps CLI",
"cliApps": "Applications CLI",
"mcp": "MCP",
"apps": "Applications",
"automations": "Automatisations",
@@ -97,7 +106,7 @@
"imageDefaults": "Valeurs par défaut",
"webSearch": "Recherche web",
"webBehavior": "Comportement",
"identity": "Identité",
"regional": "Paramètres régionaux",
"webuiSafety": "Sécurité WebUI",
"capabilities": "Capacités",
"cliApps": "Applications CLI",
@@ -136,8 +145,6 @@
"defaultImageSize": "Taille par défaut",
"maxImagesPerTurn": "Images max. par tour",
"imageSaveDir": "Dossier denregistrement",
"botName": "Nom du bot",
"botIcon": "Icône du bot",
"timezone": "Fuseau horaire",
"workspacePath": "Espace de travail par défaut",
"localServiceAccess": "Services locaux",
@@ -152,8 +159,8 @@
"contextWindow": "Fenêtre de contexte",
"transcription": "Transcription",
"transcriptionProvider": "Fournisseur",
"transcriptionProviderStatus": "Etat du fournisseur",
"transcriptionModel": "Modele",
"transcriptionProviderStatus": "État du fournisseur",
"transcriptionModel": "Modèle",
"transcriptionLanguage": "Langue",
"voiceLimits": "Limites"
},
@@ -164,10 +171,10 @@
"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 à Default pour modifier le modèle et le fournisseur depuis WebUI.",
"presetModel": "Passez à la valeur par défaut pour modifier le modèle et le fournisseur depuis la WebUI.",
"density": "Enregistré seulement dans ce navigateur.",
"activityMode": "Choisissez le niveau de détail dactivité agent affiché par défaut.",
"fileEditDisplay": "Choisissez si lactivité de modification affiche le nombre de lignes ou le diff.",
"activityMode": "Choisissez le niveau de détail de lactivité de lagent affiché par défaut.",
"fileEditDisplay": "Choisissez si lactivité 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.",
"timeout": "Nombre de secondes avant lexpiration dune requête de recherche.",
@@ -176,30 +183,28 @@
"imageProvider": "Choisissez le fournisseur inscrit utilisé par generate_image.",
"imageProviderStatus": "La génération dimages réutilise les identifiants des fournisseurs.",
"imageModel": "Nom du modèle envoyé au fournisseur dimages sélectionné.",
"defaultAspectRatio": "Utilisé lorsque le prompt ne choisit pas de ratio.",
"defaultAspectRatio": "Utilisé lorsque linstruction ne choisit pas de ratio.",
"defaultImageSize": "Indication de taille envoyée aux fournisseurs compatibles.",
"maxImagesPerTurn": "Limite supérieure pour une requête generate_image.",
"botName": "Affiché là où nanobot utilise un nom visible.",
"botIcon": "Emoji ou texte court affiché avec le nom du bot.",
"timezone": "Utilisé pour les horaires et les réponses tenant compte du temps.",
"localServiceAccess": "Autorise les commandes shell Full Access à atteindre les services localhost.",
"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.",
"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.",
"cliAppsCatalog": "Installe uniquement les adaptateurs CLI dapps que nanobot peut exécuter localement ; les apps natives restent inchangées.",
"cliAppsFilter": "Recherchez par app, catégorie ou capacité.",
"cliAppsCatalog": "Installe uniquement les adaptateurs CLI dapplications que nanobot peut exécuter localement ; les applications natives restent inchangées.",
"cliAppsFilter": "Recherchez par application, catégorie ou capacité.",
"logs": "Ouvre le dossier des journaux du moteur natif.",
"diagnostics": "Exporte un petit rapport dexécution pour le support.",
"localServiceAccessNative": "Autorise les commandes shell Full Access à atteindre les services sur ce Mac.",
"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.",
"transcription": "Transcrit l'entree micro avant l'envoi. Les messages vocaux des canaux utilisent les memes reglages.",
"transcriptionProvider": "Utilise les identifiants du fournisseur correspondant dans Fournisseurs.",
"transcriptionProviderStatus": "Les cles API restent dans les fournisseurs, pas dans les reglages de transcription.",
"transcriptionModel": "Laissez le modele resolu par defaut sauf si votre fournisseur exige un id personnalise.",
"transcription": "Transcrit lentrée du micro avant lenvoi. Les messages vocaux des canaux utilisent les mêmes réglages.",
"transcriptionProvider": "Utilise les identifiants du fournisseur correspondant dans la section Fournisseurs.",
"transcriptionProviderStatus": "Les clés API restent dans les fournisseurs, pas dans les réglages de transcription.",
"transcriptionModel": "Laissez le modèle résolu par défaut, sauf si votre fournisseur exige un identifiant personnalisé.",
"transcriptionLanguage": "Indice ISO-639 facultatif, comme en, zh, ja ou ko."
},
"values": {
@@ -219,7 +224,7 @@
"expanded": "Développé",
"default": "Par défaut",
"summary": "Résumé",
"diff": "Diff",
"diff": "Différences",
"collapsedDiff": "Diff replié",
"on": "Activé",
"off": "Désactivé",
@@ -228,7 +233,10 @@
"configured": "Configuré",
"notConfigured": "Non configuré",
"pending": "En attente",
"restartingEngine": "Redémarrage"
"restartingEngine": "Redémarrage",
"checking": "Vérification",
"running": "En cours",
"needsSetup": "Configuration requise"
},
"status": {
"loading": "Chargement des réglages...",
@@ -256,6 +264,7 @@
"deleting": "Suppression...",
"edit": "Modifier",
"cancel": "Annuler",
"dismiss": "Ignorer",
"open": "Ouvrir",
"export": "Exporter",
"opening": "Ouverture...",
@@ -269,15 +278,15 @@
"notConfiguredSection": "Non configurés",
"showMore": "Afficher {{count}} de plus",
"showLess": "Afficher moins",
"apiKey": "API key",
"apiBase": "API base",
"apiKeyPlaceholder": "Saisir l'API key",
"apiKeyConfiguredPlaceholder": "Laisser vide pour conserver la key actuelle",
"apiKey": "Clé API",
"apiBase": "URL de base de lAPI",
"apiKeyPlaceholder": "Saisir la clé API",
"apiKeyConfiguredPlaceholder": "Laisser vide pour conserver la clé actuelle",
"configuredKeyHint": "Key configurée",
"apiBasePlaceholder": "Utiliser la valeur par défaut du fournisseur",
"apiKeyRequired": "Une API key est requise pour configurer ce fournisseur.",
"showApiKey": "Afficher l'API key",
"hideApiKey": "Masquer l'API key",
"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",
@@ -288,19 +297,19 @@
},
"webSearch": {
"provider": "Fournisseur de recherche",
"providerHelp": "Choisissez le backend utilisé par l'outil web search.",
"providerHelp": "Choisissez le service utilisé par loutil de recherche web.",
"selectProvider": "Choisir un fournisseur",
"credentials": "Identifiants",
"noCredentialRequired": "Aucune key requise",
"noCredentialHelp": "DuckDuckGo fonctionne sans API key enregistrée.",
"noCredentialRequired": "Aucune clé requise",
"noCredentialHelp": "DuckDuckGo fonctionne sans clé API enregistrée.",
"apiKeyHelp": "Enregistrée dans la config et masquée après l'enregistrement.",
"baseUrl": "Base URL",
"baseUrl": "URL de base",
"baseUrlHelp": "SearXNG nécessite l'URL de votre propre instance.",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "Ce fournisseur de recherche nécessite une API key.",
"baseUrlRequired": "SearXNG nécessite une Base URL.",
"apiKeyRequired": "Ce fournisseur de recherche nécessite une clé API.",
"baseUrlRequired": "SearXNG nécessite une URL de base.",
"missingCredential": "Ajoutez l'identifiant requis avant d'enregistrer.",
"saveHint": "Les changements s'appliquent aux nouvelles requêtes web search."
"saveHint": "Les changements sappliquent aux nouvelles requêtes de recherche web."
}
},
"overview": {
@@ -315,7 +324,7 @@
},
"usage": {
"title": "Activité des tokens",
"shortTitle": "Token Usage",
"shortTitle": "Utilisation des tokens",
"subtitle": "Usage signalé par le fournisseur sur les 12 derniers mois.",
"empty": "Lactivité des tokens apparaîtra après les nouvelles réponses du modèle.",
"totalTokens": "Tokens cumulés",
@@ -362,8 +371,18 @@
"selectProvider": "Choisir un fournisseur",
"selectAspect": "Choisir un ratio",
"selectSize": "Choisir une taille",
"selectModel": "Choisir un modèle dimage",
"searchOrTypeModel": "Rechercher ou saisir lID du modèle",
"typeModelId": "Saisissez lID de modèle pris en charge par ce fournisseur.",
"configureProvider": "Configurer le fournisseur",
"missingCredential": "Configura este proveedor antes de activar la generación de imágenes."
"missingCredential": "Configurez ce fournisseur avant dactiver la génération dimages."
},
"capabilities": {
"providerSupport": "Prise en charge du fournisseur",
"providerInstallOnSave": "La prise en charge requise sera installée automatiquement lors de lenregistrement de ce fournisseur.",
"searchSupport": "Prise en charge du fournisseur de recherche",
"searchInstallOnSave": "La prise en charge dOlostep sera installée automatiquement lors de lenregistrement.",
"installing": "Installation de la prise en charge..."
},
"models": {
"selectModel": "Choisir un modèle",
@@ -437,8 +456,8 @@
"statusUnsupported": "Non compatible",
"statusNotInstalled": "Non installée",
"unsupported": "Non compatible",
"loading": "Chargement des apps CLI...",
"empty": "Aucune app CLI ne correspond à ce filtre.",
"loading": "Chargement des applications CLI...",
"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.",
@@ -462,11 +481,11 @@
},
"mcp": {
"allCategories": "Toutes les catégories",
"summary": "{{installed}} presets activés sur {{total}}",
"summary": "{{installed}} préréglages activés sur {{total}}",
"filterAll": "Tout",
"filterInstalled": "Activés",
"filterNotInstalled": "Non activés",
"searchPlaceholder": "Rechercher des presets MCP",
"searchPlaceholder": "Rechercher des préréglages MCP",
"moreOptions": "Plus d'options MCP",
"moreOptionsSubtitle": "Ajoutez un serveur personnalisé ou importez mcp.json.",
"customTitle": "MCP personnalisé",
@@ -477,9 +496,9 @@
"serverUrl": "URL",
"transport": "Transport",
"command": "Commande",
"args": "Args JSON",
"headers": "Headers JSON",
"env": "Env JSON",
"args": "Arguments JSON",
"headers": "En-têtes JSON",
"env": "Environnement JSON",
"timeout": "Délai d'outil",
"advancedOptions": "Options avancées",
"hideAdvanced": "Masquer les options avancées",
@@ -488,8 +507,8 @@
"importConfig": "Importer",
"restartRequired": "Redémarrez nanobot pour connecter les outils MCP mis à jour.",
"toolsFound": "{{count}} outils",
"loading": "Chargement des presets MCP...",
"empty": "Aucun preset MCP ne correspond à ce filtre.",
"loading": "Chargement des préréglages MCP...",
"empty": "Aucun préréglage MCP ne correspond à ce filtre.",
"openDocs": "Ouvrir la doc",
"test": "Tester",
"remove": "Supprimer",
@@ -507,6 +526,7 @@
"statusMissingCredentials": "Clé requise",
"statusMissingDependency": "Dépendance requise",
"statusComingSoon": "Bientôt disponible",
"comingSoon": "Bientôt disponible",
"statusNotInstalled": "Non activé",
"toolScope": "Outils",
"allTools": "Tous",
@@ -531,24 +551,24 @@
},
"apps": {
"description": "Ajoutez des outils à nanobot, puis utilisez-les avec @ dans le chat.",
"cliLabel": "App",
"cliLabel": "Application",
"mcpLabel": "Intégration",
"channelLabel": "Canal",
"featureLabel": "Fonction",
"filterAll": "Prêts",
"filterPlugins": "Extensions",
"filterCli": "Apps",
"filterCli": "Applications",
"filterMcp": "Intégrations",
"enabledSummary": "{{count}} prêts",
"caption": "{{cli}} apps · {{mcp}} intégrations",
"searchPlaceholder": "Rechercher des apps",
"caption": "{{cli}} applications · {{mcp}} intégrations",
"searchPlaceholder": "Rechercher des applications",
"featured": "Outils",
"loading": "Chargement des apps...",
"loading": "Chargement des applications...",
"empty": "Aucun outil ne correspond à cette vue.",
"restartRequired": "Redémarrez nanobot pour appliquer les apps et fonctions mises à jour."
"restartRequired": "Redémarrez nanobot pour appliquer les applications et fonctions mises à jour."
},
"channels": {
"description": "Connectez nanobot aux apps de discussion. L'installation du support ajoute seulement le paquet d'intégration ; la plupart des canaux nécessitent encore des tokens ou des réglages d'espace de travail.",
"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",
"searchPlaceholder": "Rechercher des canaux",
"backToChannels": "Tous les canaux",
@@ -569,6 +589,8 @@
"advanced": "Avancé",
"checkAndEnable": "Vérifier et activer",
"checkConnection": "Vérifier la connexion",
"connectionChecks": "Vérifications de connexion",
"open": "Ouvrir",
"checkedAndEnabled": "Vérifié et activé.",
"checking": "Vérification...",
"checkOnly": "Vérifier uniquement",
@@ -664,6 +686,8 @@
"protected": "Protégée",
"editTitle": "Modifier lautomatisation",
"save": "Enregistrer",
"commandCopied": "Copié",
"copyCommand": "Copier",
"deleteTitle": "Supprimer lautomatisation",
"deleteDescription": "Cela supprime {{name}} du stockage cron. Les anciens messages de chat restent dans la session.",
"cancel": "Annuler",
@@ -723,6 +747,7 @@
"fields": {
"name": "Nom",
"message": "Message",
"command": "Commande",
"scheduleType": "Type de planning",
"every": "Toutes les",
"unit": "Unité",
@@ -757,7 +782,7 @@
"signInAgain": "Se reconnecter",
"signOut": "Se déconnecter",
"signedInAs": "Connecté en tant que {{account}}",
"signInHelp": "Inicia sesión desde este dispositivo; no se guarda API key en config.",
"signInHelp": "Connectez-vous depuis cet appareil ; aucune clé API nest enregistrée dans la configuration.",
"remoteSignInHelp": "Sélectionnez Se connecter pour ouvrir xAI sur votre ordinateur, puis collez le code dautorisation affiché après la connexion.",
"codexRemoteSignInHelp": "Connectez-vous dans ce navigateur, puis recollez dans nanobot lURL complète de rappel localhost.",
"signInRequired": "Connexion requise",
@@ -840,7 +865,7 @@
"marketplaceInstall": "Installer",
"marketplaceNoTrend": "Pas encore de tendance",
"marketplaceTrendLabel": "Tendance des installations sur 8 semaines",
"featured": "Compétences agent",
"featured": "Compétences de lagent",
"empty": "Aucune compétence disponible.",
"sourceWorkspace": "Personnalisée",
"sourceBuiltin": "Intégrée",
@@ -867,7 +892,7 @@
"voice": {
"selectProvider": "Choisir un fournisseur",
"configureProvider": "Configurer le fournisseur",
"languageAuto": "Auto"
"languageAuto": "Automatique"
}
},
"chat": {
@@ -881,34 +906,34 @@
"actions": "Actions du sujet {{title}}",
"newInProject": "Démarrer un nouveau sujet dans {{project}}",
"activity": {
"running": "Agent running",
"complete": "Agent finished",
"updated": "New activity"
"running": "Agent en cours",
"complete": "Agent terminé",
"updated": "Nouvelle activité"
},
"pin": "Pin",
"unpin": "Unpin",
"rename": "Rename",
"pin": "Épingler",
"unpin": "Désépingler",
"rename": "Renommer",
"renameTitle": "Renommer le sujet",
"renameDescription": "Choisissez un nom local dans la barre latérale pour ce sujet.",
"renamePlaceholder": "Nom du sujet",
"renameProjectTitle": "Rename project",
"renameProjectDescription": "Choose a local sidebar name for this project.",
"renameProjectPlaceholder": "Project name",
"renameSave": "Save",
"archive": "Archive",
"unarchive": "Unarchive",
"showArchived": "Show archived",
"hideArchived": "Hide archived",
"renameProjectTitle": "Renommer le projet",
"renameProjectDescription": "Choisissez un nom local dans la barre latérale pour ce projet.",
"renameProjectPlaceholder": "Nom du projet",
"renameSave": "Enregistrer",
"archive": "Archiver",
"unarchive": "Désarchiver",
"showArchived": "Afficher les archives",
"hideArchived": "Masquer les archives",
"delete": "Supprimer",
"newChat": "Nouveau sujet",
"groups": {
"pinned": "Pinned",
"pinned": "Épinglés",
"all": "Sujets",
"projects": "Projects",
"today": "Today",
"yesterday": "Yesterday",
"earlier": "Earlier",
"archived": "Archived"
"projects": "Projets",
"today": "Aujourdhui",
"yesterday": "Hier",
"earlier": "Plus anciens",
"archived": "Archivés"
}
},
"deleteConfirm": {
@@ -984,11 +1009,11 @@
},
"sticker": {
"title": "Créer un sticker",
"prompt": "Générez une image façon sticker dun petit assistant robot, avec un fond dapparence transparente, expressive et ludique."
"prompt": "Générez une image façon autocollant dun petit assistant robot, avec un fond dapparence transparente, expressive et ludique."
},
"poster": {
"title": "Créer une affiche",
"prompt": "Générez un concept daffiche soigné pour un assistant IA personnel, composition moderne, hiérarchie visuelle forte, adapté à une landing page."
"prompt": "Générez un concept daffiche soigné pour un assistant IA personnel, composition moderne, hiérarchie visuelle forte, adapté à une page de destination."
},
"product": {
"title": "Maquette produit",
@@ -1070,7 +1095,7 @@
"aspectAria": "Format de limage",
"aspectLabel": "Format de limage",
"aspect": {
"auto": "Auto",
"auto": "Automatique",
"1_1": "Carré 1:1",
"3_4": "Portrait 3:4",
"9_16": "Story 9:16",
@@ -1113,7 +1138,7 @@
},
"stop": {
"title": "Arrêter la tâche en cours",
"description": "Annuler le tour agent actif pour cette discussion."
"description": "Annuler le tour actif de lagent pour cette discussion."
},
"restart": {
"title": "Redémarrer nanobot",
@@ -1121,7 +1146,7 @@
},
"status": {
"title": "Afficher l’état",
"description": "Afficher l’état du runtime, du provider et des channels."
"description": "Afficher l’état du temps dexécution, du fournisseur et des canaux."
},
"model": {
"title": "Modèle",
@@ -1152,8 +1177,8 @@
"description": "Demandez à lagent de traiter ceci comme un objectif multi‑étapes durable."
},
"trigger": {
"title": "Créer un trigger local",
"description": "Crée un trigger CLI lié à cette session de chat."
"title": "Créer un déclencheur local",
"description": "Crée un déclencheur CLI lié à cette session de chat."
},
"help": {
"title": "Afficher laide",
@@ -1177,7 +1202,7 @@
},
"encoding": "Traitement…",
"remove": "Retirer la pièce jointe",
"normalizedSizeHint": "{{orig}} → {{current}} (auto)",
"normalizedSizeHint": "{{orig}} → {{current}} (automatique)",
"textTooLarge": "Le texte du message est trop volumineux (maximum {{max}})",
"imageRejected": {
"unsupported_type": "Type de fichier non pris en charge",
@@ -1192,14 +1217,16 @@
"io": "Impossible de lire ce fichier"
},
"mentions": {
"ariaLabel": "Apps",
"label": "Apps",
"cliGroup": "Apps CLI",
"ariaLabel": "Applications",
"label": "Applications",
"cliGroup": "Applications CLI",
"mcpGroup": "Services MCP",
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "Utiliser @{{name}} comme app CLI locale",
"mcpDescription": "Utiliser @{{name}} comme serveur MCP"
"cliDescription": "Utiliser @{{name}} comme application CLI locale",
"mcpDescription": "Utiliser @{{name}} comme serveur MCP",
"cliTitle": "Application CLI : {{name}}",
"mcpTitle": "Serveur MCP : {{name}}"
},
"workspace": {
"accessAria": "Mode daccès à lespace de travail",
@@ -1215,11 +1242,12 @@
"loadEarlier": "Charger les messages précédents",
"forkedFromHistory": "Bifurqué depuis l'historique",
"promptNavigator": {
"open": "Ouvrir le navigateur de prompts",
"title": "Prompts",
"search": "Rechercher des prompts",
"noResults": "Aucun prompt correspondant.",
"jumpTo": "Aller au prompt : {{label}}"
"open": "Ouvrir le navigateur dinstructions",
"title": "Instructions",
"search": "Rechercher des instructions",
"noResults": "Aucune instruction correspondante.",
"jumpTo": "Aller à linstruction : {{label}}",
"railAria": "Navigation dans les instructions utilisateur"
}
},
"message": {
@@ -1243,19 +1271,27 @@
"agentActivityLiveSummary": "En cours… · {{reasoning}} étapes · {{tools}} appels doutils",
"agentActivityLiveToolsOnly": "En cours… · {{tools}} appels doutils",
"imageAttachment": "Pièce jointe image",
"videoAttachment": "Pièce jointe vidéo",
"fileAttachment": "Pièce jointe",
"attachmentUnavailable": "Pièce jointe indisponible",
"dataTable": "Tableau de données",
"fileEditPreparing": "Préparation de la modification du fichier…",
"openLink": "Ouvrir le lien : {{label}}",
"openAttachment": "Ouvrir {{name}}",
"skill": "Compétence : {{name}}",
"askAboutSelection": "Poser une question à ce sujet",
"forkFromHere": "Bifurquer",
"copyReply": "Copier",
"copiedReply": "Copié",
"turnLatencyTitle": "Temps de réponse (de bout en bout)",
"fileEditViewDiff": "Voir le diff",
"fileEditViewLargeDiff": "Voir le grand diff",
"fileEditViewDiff": "Voir les différences",
"fileEditViewLargeDiff": "Voir les grandes différences",
"fileEditDiffLineCount": "{{count}} lignes",
"fileEditUnchangedLinesHidden": "{{count}} lignes inchangées masquées",
"fileEditShowMoreLines": "Afficher {{count}} lignes de plus",
"fileEditShowFewerLines": "Afficher moins de lignes",
"fileEditOpenFile": "Ouvrir le fichier",
"fileEditDiffTruncated": "Diff tronqué. Ouvrez le fichier pour voir la modification complète.",
"fileEditDiffTruncated": "Différences tronquées. Ouvrez le fichier pour voir la modification complète.",
"activityThinkingFor": "Réflexion pendant {{duration}}",
"activityThought": "Réflexion terminée",
"activityThoughtFor": "Réflexion terminée en {{duration}}",
@@ -1265,9 +1301,9 @@
"cliActivityRunningOne": "Utilisation de {{name}}",
"cliActivityRanOne": "{{name}} utilisé",
"cliActivityFailedOne": "Échec de {{name}}",
"cliActivityRunningMany": "Utilisation de {{count}} apps CLI",
"cliActivityRanMany": "{{count}} apps CLI utilisées",
"cliActivityFailedMany": "Échec de {{count}} apps CLI",
"cliActivityRunningMany": "Utilisation de {{count}} applications CLI",
"cliActivityRanMany": "{{count}} applications CLI utilisées",
"cliActivityFailedMany": "Échec de {{count}} applications CLI",
"cliRunRunning": "Utilisation",
"cliRunRan": "Utilisé",
"cliRunFailed": "Échec",
@@ -1283,6 +1319,7 @@
},
"filePreview": {
"aria": "Aperçu du fichier",
"breadcrumb": "Chemin du fichier",
"close": "Fermer laperçu du fichier",
"loading": "Chargement de laperçu...",
"failed": "Impossible de prévisualiser ce fichier.",
@@ -1297,7 +1334,10 @@
"copied": "Copié"
},
"common": {
"dismiss": "Fermer"
"dismiss": "Fermer",
"close": "Fermer",
"current": "Actuel",
"cancel": "Annuler"
},
"errors": {
"messageTooBig": {
+244 -204
View File
@@ -26,8 +26,8 @@
"restartHint": "Mulai ulang nanobot untuk menerapkan perubahan runtime.",
"restart": "Mulai ulang nanobot",
"restarting": "Memulai ulang...",
"restartEngine": "Mulai ulang engine",
"restartingEngine": "Memulai ulang engine..."
"restartEngine": "Mulai ulang mesin",
"restartingEngine": "Memulai ulang mesin..."
},
"restart": {
"completed": "Mulai ulang selesai dalam {{seconds}} dtk."
@@ -37,7 +37,16 @@
"chat": "{{title}} · nanobot"
},
"meta": {
"description": "UI web nanobot — ngobrol dengan workspace nanobot Anda."
"description": "UI web nanobot — ngobrol dengan ruang kerja nanobot Anda."
},
"pairing": {
"title": "Hubungkan pengguna chat",
"description": "Masukkan kode pairing yang ditampilkan di chat.",
"code": "Kode pairing",
"matched": "Cocok dengan {{channel}}. Menghubungkan...",
"expiresInline": "Kode kedaluwarsa {{expires}}.",
"queueCount": "{{count}} menunggu",
"noMatch": "Tidak ada permintaan tertunda yang cocok dengan kode ini."
}
},
"sidebar": {
@@ -57,7 +66,7 @@
"apps": "Aplikasi",
"automations": "Otomasi",
"skills": {
"title": "Skill"
"title": "Keterampilan"
}
},
"settings": {
@@ -83,7 +92,7 @@
"mcp": "MCP",
"apps": "Aplikasi",
"automations": "Otomasi",
"skills": "Skill"
"skills": "Keterampilan"
},
"sections": {
"interface": "Antarmuka",
@@ -92,18 +101,18 @@
"about": "Tentang",
"status": "Status",
"localPreferences": "Preferensi lokal",
"presets": "Preset",
"presets": "Prasetel",
"imageGeneration": "Pembuatan gambar",
"imageDefaults": "Default",
"imageDefaults": "Bawaan",
"webSearch": "Pencarian web",
"webBehavior": "Perilaku",
"identity": "Identitas",
"regional": "Regional",
"webuiSafety": "Keamanan WebUI",
"capabilities": "Kemampuan",
"cliApps": "Aplikasi CLI",
"mcp": "Layanan MCP",
"apps": "Aplikasi",
"nativeHost": "Host native",
"nativeHost": "Host asli",
"hostSafety": "Keamanan aplikasi",
"voiceInput": "Input suara"
},
@@ -114,15 +123,15 @@
"model": "Model",
"restart": "Mulai ulang nanobot",
"configPath": "Path konfigurasi",
"activePreset": "Preset aktif",
"activePreset": "Prasetel aktif",
"gateway": "Gerbang",
"restartState": "Status mulai ulang",
"pendingChanges": "Perubahan tertunda",
"selectedPreset": "Preset terpilih",
"presetModel": "Model preset",
"selectedPreset": "Prasetel terpilih",
"presetModel": "Model prasetel",
"density": "Kerapatan",
"activityMode": "Detail aktivitas",
"fileEditDisplay": "Tampilan edit file",
"fileEditDisplay": "Tampilan perubahan file",
"codeWrap": "Bungkus kode",
"maxResults": "Hasil maksimum",
"timeout": "Batas waktu",
@@ -132,16 +141,14 @@
"imageProviderStatus": "Status penyedia",
"imageProviderBase": "Basis penyedia",
"imageModel": "Model gambar",
"defaultAspectRatio": "Rasio default",
"defaultImageSize": "Ukuran default",
"defaultAspectRatio": "Rasio bawaan",
"defaultImageSize": "Ukuran bawaan",
"maxImagesPerTurn": "Maks. gambar per giliran",
"imageSaveDir": "Direktori simpan",
"botName": "Nama bot",
"botIcon": "Ikon bot",
"timezone": "Zona waktu",
"workspacePath": "Workspace default",
"workspacePath": "Ruang kerja bawaan",
"localServiceAccess": "Layanan lokal",
"webuiDefaultAccess": "Akses default",
"webuiDefaultAccess": "Akses bawaan",
"currentModel": "Konfigurasi saat ini",
"brandLogos": "Logo merek",
"cliAppsCatalog": "Katalog",
@@ -160,46 +167,44 @@
"help": {
"theme": "Beralih antara tampilan terang dan gelap.",
"language": "Pilih bahasa yang digunakan WebUI.",
"provider": "Selecciona el proveedor para nuevas solicitudes de modelo.",
"model": "Pilih model yang digunakan oleh preset ini.",
"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": "Beralih ke Default untuk mengedit model dan penyedia dari WebUI.",
"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.",
"activityMode": "Pilih seberapa banyak detail aktivitas agen yang ditampilkan secara default.",
"fileEditDisplay": "Pilih aktivitas edit file dibuka sebagai jumlah baris atau diff.",
"fileEditDisplay": "Pilih apakah aktivitas perubahan file ditampilkan sebagai jumlah baris atau perbedaan.",
"codeWrap": "Menjaga baris kode panjang tetap terbaca di layar kecil.",
"maxResults": "Resultados devueltos por cada llamada web_search.",
"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.",
"imageProviderStatus": "La generación de imágenes reutiliza credenciales de Proveedores.",
"imageModel": "Nombre del modelo enviado al proveedor de imágenes seleccionado.",
"defaultAspectRatio": "Se usa cuando el prompt no elige una proporción.",
"maxResults": "Hasil yang dikembalikan oleh setiap panggilan web_search.",
"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.",
"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.",
"defaultImageSize": "Petunjuk ukuran yang dikirim ke penyedia yang mendukungnya.",
"maxImagesPerTurn": "Batas atas untuk satu permintaan generate_image.",
"botName": "Se muestra donde nanobot usa un nombre visible.",
"botIcon": "Emoji o texto corto junto al nombre del bot.",
"timezone": "Se usa para horarios y respuestas con conciencia temporal.",
"localServiceAccess": "Izinkan perintah shell Full Access menjangkau layanan localhost.",
"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": "Las capturas web siempre protegen servicios locales, privados y metadata. La seguridad de canales core se gestiona en config.json.",
"securityManagedControls": "Pengambilan web selalu melindungi layanan lokal, privat, dan metadata. Keamanan kanal inti tetap dikelola di config.json.",
"currentModel": "Digunakan untuk balasan baru.",
"selectedModelProvider": "Definido por el modelo seleccionado.",
"selectedModelValue": "Definido por el modelo seleccionado.",
"selectedModelProvider": "Ditentukan oleh model yang dipilih.",
"selectedModelValue": "Ditentukan oleh model yang dipilih.",
"brandLogos": "Tampilkan logo penyedia pihak ketiga dan CLI di Pengaturan.",
"cliAppsCatalog": "Instala solo adaptadores CLI de apps que nanobot puede ejecutar localmente; las apps nativas no se modifican.",
"cliAppsFilter": "Busca por app, categoría o capacidad.",
"logs": "Abre la carpeta de registros del motor nativo.",
"diagnostics": "Exporta un pequeño informe de runtime para soporte.",
"localServiceAccessNative": "Permite que comandos shell con Full Access alcancen servicios en este Mac.",
"webuiDefaultAccessNative": "Usado por chats nativos sin permiso específico de proyecto.",
"contextWindow": "Pilih anggaran konteks default untuk konfigurasi model ini.",
"transcription": "Transkripsikan input mikrofon sebelum dikirim. Pesan suara channel memakai pengaturan yang sama.",
"transcriptionProvider": "Menggunakan kredensial penyedia yang sesuai dari Providers.",
"transcriptionProviderStatus": "API key tetap berada di providers, bukan di pengaturan transkripsi.",
"transcriptionModel": "Biarkan memakai default yang teresolusi kecuali penyedia membutuhkan id model khusus.",
"cliAppsCatalog": "Instal hanya adaptor CLI aplikasi yang dapat dijalankan nanobot secara lokal; aplikasi asli tidak diubah.",
"cliAppsFilter": "Cari berdasarkan aplikasi, kategori, atau kemampuan.",
"logs": "Buka folder log mesin asli.",
"diagnostics": "Ekspor laporan waktu proses singkat untuk 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.",
"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."
},
"values": {
@@ -212,74 +217,78 @@
"ready": "Siap",
"privateEngine": "Mesin privat",
"unixSocket": "Soket Unix",
"defaultWorkspace": "Workspace default",
"defaultWorkspace": "Ruang kerja bawaan",
"comfortable": "Nyaman",
"compact": "Ringkas",
"auto": "Otomatis",
"expanded": "Diperluas",
"default": "Default",
"default": "Bawaan",
"summary": "Ringkasan",
"diff": "Diff",
"collapsedDiff": "Diff diciutkan",
"diff": "Perbedaan",
"collapsedDiff": "Perbedaan diciutkan",
"on": "Aktif",
"off": "Nonaktif",
"defaultPermission": "Izin default",
"defaultPermission": "Izin bawaan",
"fullAccess": "Akses penuh",
"configured": "Terkonfigurasi",
"notConfigured": "Belum dikonfigurasi",
"pending": "Tertunda",
"restartingEngine": "Memulai ulang"
"restartingEngine": "Memulai ulang",
"checking": "Memeriksa",
"running": "Berjalan",
"needsSetup": "Perlu penyiapan"
},
"status": {
"loading": "Memuat pengaturan...",
"loadError": "Tidak dapat memuat pengaturan",
"unsaved": "Perubahan belum disimpan.",
"upToDate": "Sudah terbaru.",
"savedRestart": "Guardado. Reinicia nanobot para aplicar.",
"restartAfterSaving": "Guarda los cambios y reinicia cuando puedas.",
"savedRestartApply": "Guardado. Reinicia cuando puedas.",
"imageProviderRestart": "Cambios del proveedor de imagen guardados. Reinicia cuando puedas.",
"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.",
"logsOpened": "Carpeta de registros abierta.",
"logsOpenFailed": "No se pudo abrir la carpeta de registros.",
"diagnosticsExported": "Diagnóstico exportado a {{path}}.",
"diagnosticsExportFailed": "No se pudo exportar el diagnóstico."
"savedRestart": "Tersimpan. Mulai ulang nanobot untuk menerapkan.",
"restartAfterSaving": "Simpan perubahan, lalu mulai ulang saat siap.",
"savedRestartApply": "Tersimpan. Mulai ulang saat siap.",
"imageProviderRestart": "Perubahan penyedia gambar tersimpan. Mulai ulang saat siap.",
"hostRestartAfterSaving": "Saat disimpan, nanobot akan memulai ulang mesinnya.",
"hostRestartPending": "Tersimpan. Mesin akan dimulai ulang saat siap.",
"hostApiUnavailable": "Tindakan host hanya tersedia di aplikasi asli.",
"logsOpened": "Folder log dibuka.",
"logsOpenFailed": "Tidak dapat membuka folder log.",
"diagnosticsExported": "Diagnostik diekspor ke {{path}}.",
"diagnosticsExportFailed": "Tidak dapat mengekspor diagnostik."
},
"actions": {
"save": "Simpan",
"saving": "Menyimpan",
"saveOrder": "Simpan urutan",
"savePreset": "Simpan preset",
"savePreset": "Simpan prasetel",
"delete": "Hapus",
"deleting": "Menghapus...",
"edit": "Edit",
"edit": "Ubah",
"cancel": "Batal",
"dismiss": "Abaikan",
"open": "Buka",
"export": "Ekspor",
"opening": "Membuka...",
"exporting": "Mengekspor..."
},
"byok": {
"description": "Gunakan kunci provider Anda sendiri. Nanobot membaca nilai ini dari config saat ini dan hanya provider yang sudah dikonfigurasi yang dapat digunakan dalam preset model.",
"description": "Gunakan kunci penyedia Anda sendiri. Nanobot membaca nilai ini dari konfigurasi saat ini dan hanya penyedia yang sudah dikonfigurasi yang dapat digunakan dalam prasetel model.",
"configured": "Terkonfigurasi",
"notConfigured": "Belum dikonfigurasi",
"configuredSection": "Terkonfigurasi",
"notConfiguredSection": "Belum dikonfigurasi",
"showMore": "Tampilkan {{count}} lagi",
"showLess": "Tampilkan lebih sedikit",
"apiKey": "API key",
"apiBase": "API base",
"apiKeyPlaceholder": "Masukkan API key",
"apiKeyConfiguredPlaceholder": "Kosongkan untuk mempertahankan key saat ini",
"configuredKeyHint": "Key terkonfigurasi",
"apiBasePlaceholder": "Gunakan default provider",
"apiKeyRequired": "API key diperlukan untuk mengonfigurasi provider ini.",
"showApiKey": "Tampilkan API key",
"hideApiKey": "Sembunyikan API key",
"noConfiguredProviders": "Belum ada provider terkonfigurasi",
"configureFirst": "Konfigurasikan provider di BYOK terlebih dahulu.",
"apiKey": "Kunci API",
"apiBase": "Basis API",
"apiKeyPlaceholder": "Masukkan kunci API",
"apiKeyConfiguredPlaceholder": "Kosongkan untuk mempertahankan kunci saat ini",
"configuredKeyHint": "Kunci yang dikonfigurasi",
"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",
"tabs": {
"ariaLabel": "Jenis kredensial BYOK",
@@ -288,19 +297,19 @@
},
"webSearch": {
"provider": "Penyedia pencarian",
"providerHelp": "Pilih backend yang digunakan alat web search.",
"selectProvider": "Pilih provider",
"providerHelp": "Pilih backend yang digunakan alat pencarian web.",
"selectProvider": "Pilih penyedia",
"credentials": "Kredensial",
"noCredentialRequired": "Tidak perlu key",
"noCredentialHelp": "DuckDuckGo berfungsi tanpa menyimpan API key.",
"noCredentialRequired": "Tidak perlu kunci",
"noCredentialHelp": "DuckDuckGo berfungsi tanpa menyimpan kunci API.",
"apiKeyHelp": "Disimpan di config dan ditampilkan tersamarkan setelah disimpan.",
"baseUrl": "Base URL",
"baseUrl": "URL dasar",
"baseUrlHelp": "SearXNG memerlukan URL instance Anda sendiri.",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "Provider pencarian ini memerlukan API key.",
"baseUrlRequired": "SearXNG memerlukan Base URL.",
"apiKeyRequired": "Penyedia pencarian ini memerlukan kunci API.",
"baseUrlRequired": "SearXNG memerlukan URL dasar.",
"missingCredential": "Tambahkan kredensial yang diperlukan sebelum menyimpan.",
"saveHint": "Perubahan berlaku untuk permintaan web search baru."
"saveHint": "Perubahan berlaku untuk permintaan pencarian web baru."
}
},
"overview": {
@@ -315,7 +324,7 @@
},
"usage": {
"title": "Aktivitas token",
"shortTitle": "Token Usage",
"shortTitle": "Penggunaan token",
"subtitle": "Penggunaan yang dilaporkan penyedia selama 12 bulan terakhir.",
"empty": "Aktivitas token akan muncul setelah balasan model baru.",
"totalTokens": "Total token",
@@ -362,8 +371,18 @@
"selectProvider": "Pilih penyedia",
"selectAspect": "Pilih rasio",
"selectSize": "Pilih ukuran",
"selectModel": "Pilih model gambar",
"searchOrTypeModel": "Cari atau ketik ID model",
"typeModelId": "Ketik ID model yang didukung penyedia ini.",
"configureProvider": "Konfigurasi penyedia",
"missingCredential": "Configura este proveedor antes de activar la generación de imágenes."
"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..."
},
"models": {
"selectModel": "Pilih model",
@@ -376,12 +395,12 @@
"callOrder": "Urutan pemanggilan model",
"primary": "Utama",
"fallbackNumber": "Cadangan {{number}}",
"addToOrder": "Aktifkan preset",
"newPreset": "Preset model baru",
"addToOrder": "Aktifkan prasetel",
"newPreset": "Prasetel model baru",
"newPresetHelp": "Simpan model yang dapat digunakan kembali beserta pengaturan generasinya.",
"presets": "Preset model",
"editPreset": "Edit preset",
"presetName": "Nama preset",
"presets": "Prasetel model",
"editPreset": "Ubah prasetel",
"presetName": "Nama prasetel",
"presetNameHelp": "Nama singkat yang digunakan di pengaturan model.",
"presetNamePlaceholder": "Menulis cepat",
"advancedOptions": "Opsi lanjutan",
@@ -390,22 +409,22 @@
"temperature": "Temperatur",
"reasoningEffort": "Upaya penalaran",
"convertTitle": "Konversi pengaturan model saat ini",
"convertHelp": "Ubah model utama dan cadangan yang ada menjadi preset agar urutannya dapat dikelola di sini.",
"convertHelp": "Ubah model utama dan cadangan yang ada menjadi prasetel agar urutannya dapat dikelola di sini.",
"converting": "Mengonversi...",
"convertAction": "Konversi ke preset",
"convertAction": "Konversi ke prasetel",
"dragToReorder": "Seret untuk mengurutkan ulang",
"moveUp": "Naikkan",
"moveDown": "Turunkan",
"removeFromOrder": "Nonaktifkan preset",
"removeFromOrder": "Nonaktifkan prasetel",
"inCallOrder": "Dalam urutan pemanggilan",
"disabled": "Nonaktif",
"noPresets": "Belum ada preset model",
"noPresetsHelp": "Buat preset, lalu tambahkan ke urutan pemanggilan.",
"removeBeforeDelete": "Hapus preset ini dari urutan pemanggilan sebelum menghapusnya.",
"noPresets": "Belum ada prasetel model",
"noPresetsHelp": "Buat prasetel, lalu tambahkan ke urutan pemanggilan.",
"removeBeforeDelete": "Hapus prasetel ini dari urutan pemanggilan sebelum menghapusnya.",
"providerSetupRequired": "Penyedia perlu dikonfigurasi",
"configureProviderBeforeSaving": "Konfigurasikan penyedia ini sebelum menyimpan preset.",
"deletePresetTitle": "Hapus preset model?",
"deletePresetHelp": "Preset “{{name}}” akan dihapus. Kredensial penyedia tidak terpengaruh.",
"configureProviderBeforeSaving": "Konfigurasikan penyedia ini sebelum menyimpan prasetel.",
"deletePresetTitle": "Hapus prasetel model?",
"deletePresetHelp": "Prasetel “{{name}}” akan dihapus. Kredensial penyedia tidak terpengaruh.",
"searchModels": "Cari atau ketik ID model",
"useCustomModel": "Gunakan",
"loadingModels": "Memuat model...",
@@ -462,11 +481,11 @@
},
"mcp": {
"allCategories": "Semua kategori",
"summary": "{{installed}} dari {{total}} preset diaktifkan",
"summary": "{{installed}} dari {{total}} prasetel diaktifkan",
"filterAll": "Semua",
"filterInstalled": "Aktif",
"filterNotInstalled": "Tidak aktif",
"searchPlaceholder": "Cari preset MCP",
"searchPlaceholder": "Cari prasetel MCP",
"moreOptions": "Opsi MCP lainnya",
"moreOptionsSubtitle": "Tambahkan server khusus atau impor mcp.json.",
"customTitle": "MCP khusus",
@@ -477,9 +496,9 @@
"serverUrl": "URL",
"transport": "Transport",
"command": "Perintah",
"args": "Args JSON",
"headers": "Headers JSON",
"env": "Env JSON",
"args": "Argumen JSON",
"headers": "Header JSON",
"env": "Lingkungan JSON",
"timeout": "Batas waktu alat",
"advancedOptions": "Opsi lanjutan",
"hideAdvanced": "Sembunyikan lanjutan",
@@ -488,8 +507,8 @@
"importConfig": "Impor",
"restartRequired": "Mulai ulang nanobot untuk menyambungkan alat MCP yang diperbarui.",
"toolsFound": "{{count}} alat",
"loading": "Memuat preset MCP...",
"empty": "Tidak ada preset MCP yang cocok dengan filter ini.",
"loading": "Memuat prasetel MCP...",
"empty": "Tidak ada prasetel MCP yang cocok dengan filter ini.",
"openDocs": "Buka dokumentasi",
"test": "Uji",
"remove": "Hapus",
@@ -507,6 +526,7 @@
"statusMissingCredentials": "Butuh kunci",
"statusMissingDependency": "Butuh dependensi",
"statusComingSoon": "Segera hadir",
"comingSoon": "Segera hadir",
"statusNotInstalled": "Tidak aktif",
"toolScope": "Alat",
"allTools": "Semua",
@@ -548,7 +568,7 @@
"restartRequired": "Mulai ulang nanobot untuk menerapkan aplikasi dan fitur yang diperbarui."
},
"channels": {
"description": "Hubungkan nanobot ke aplikasi chat. Memasang dukungan hanya menambahkan paket integrasi; sebagian besar kanal tetap memerlukan token atau pengaturan workspace.",
"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",
"searchPlaceholder": "Cari kanal",
"backToChannels": "Semua kanal",
@@ -558,7 +578,7 @@
"restartRequired": "Mulai ulang nanobot untuk menerapkan dukungan kanal yang diperbarui.",
"requires": "Memerlukan: {{requirements}}",
"setUp": "Siapkan",
"setupGuide": "Panduan setup",
"setupGuide": "Panduan penyiapan",
"setupSummary": "Mengaktifkan hanya menyalakan dukungan nanobot. Tambahkan kredensial platform, lalu mulai ulang nanobot.",
"configKeys": "Kunci konfigurasi",
"enable": "Aktifkan kanal",
@@ -569,6 +589,8 @@
"advanced": "Lanjutan",
"checkAndEnable": "Periksa dan aktifkan",
"checkConnection": "Periksa koneksi",
"connectionChecks": "Pemeriksaan koneksi",
"open": "Buka",
"checkedAndEnabled": "Sudah diperiksa dan diaktifkan.",
"checking": "Memeriksa...",
"checkOnly": "Periksa saja",
@@ -659,11 +681,13 @@
"runNow": "Jalankan sekarang",
"pause": "Jeda",
"resume": "Lanjutkan",
"edit": "Edit",
"edit": "Ubah",
"delete": "Hapus",
"protected": "Terlindungi",
"editTitle": "Edit otomasi",
"editTitle": "Ubah otomasi",
"save": "Simpan",
"commandCopied": "Disalin",
"copyCommand": "Salin",
"deleteTitle": "Hapus otomasi",
"deleteDescription": "Ini menghapus {{name}} dari penyimpanan cron. Pesan chat sebelumnya tetap ada di sesi.",
"cancel": "Batal",
@@ -723,6 +747,7 @@
"fields": {
"name": "Nama",
"message": "Pesan",
"command": "Perintah",
"scheduleType": "Jenis jadwal",
"every": "Setiap",
"unit": "Unit",
@@ -757,11 +782,11 @@
"signInAgain": "Masuk lagi",
"signOut": "Keluar",
"signedInAs": "Masuk sebagai {{account}}",
"signInHelp": "Inicia sesión desde este dispositivo; no se guarda API key en config.",
"signInHelp": "Masuk dari perangkat ini; kunci API tidak disimpan di config.",
"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",
"signInBeforeSaving": "Masuk ke penyedia ini sebelum menyimpan preset.",
"signInBeforeSaving": "Masuk ke penyedia ini sebelum menyimpan prasetel.",
"signedIn": "Sudah masuk",
"notSignedIn": "Belum masuk",
"proxyLabel": "Proksi jaringan",
@@ -780,56 +805,56 @@
"finishSignIn": "Selesaikan masuk"
},
"skills": {
"description": "Tinjau skill instruksi yang dapat dimuat agent ini selama percakapan.",
"description": "Tinjau keterampilan instruksi yang dapat dimuat agen ini selama percakapan.",
"caption": "{{available}} tersedia · {{total}} total",
"views": "Tampilan skill",
"views": "Tampilan keterampilan",
"installedTab": "Terpasang",
"discoverTab": "Temukan",
"customGroup": "Kustom",
"builtinGroup": "Bawaan",
"otherGroup": "Lainnya",
"searchInstalled": "Cari skill terpasang",
"searchInstalled": "Cari keterampilan terpasang",
"filterAll": "Semua",
"filterEnabled": "Aktif",
"filterDisabled": "Nonaktif",
"noMatching": "Tidak ada skill yang cocok.",
"noMatching": "Tidak ada keterampilan yang cocok.",
"statusDisabled": "Nonaktif",
"statusEnabled": "Aktif",
"statusNeedsSetup": "Perlu penyiapan",
"showLess": "Tampilkan lebih sedikit",
"showMore": "Tampilkan lebih banyak",
"enabledControl": "Gunakan skill ini",
"enabledDescription": "Izinkan agen memuat skill ini saat persyaratannya terpenuhi.",
"enabledControl": "Gunakan keterampilan ini",
"enabledDescription": "Izinkan agen memuat keterampilan ini saat persyaratannya terpenuhi.",
"enableSkill": "Aktifkan {{name}}",
"disableSkill": "Nonaktifkan {{name}}",
"updateFailed": "Skill ini tidak dapat diperbarui.",
"deleteTitle": "Hapus skill",
"deleteDescription": "Hapus skill ini dari workspace saat ini.",
"updateFailed": "Keterampilan ini tidak dapat diperbarui.",
"deleteTitle": "Hapus keterampilan",
"deleteDescription": "Hapus keterampilan ini dari ruang kerja saat ini.",
"deleteAction": "Hapus",
"deleteFailed": "Skill ini tidak dapat dihapus.",
"deleteFailed": "Keterampilan ini tidak dapat dihapus.",
"deleteConfirmTitle": "Hapus {{name}}?",
"deleteConfirmDescription": "Tindakan ini menghapus file skill dari workspace saat ini dan tidak dapat dibatalkan.",
"deleteConfirmAction": "Hapus skill",
"instructionsTitle": "Petunjuk skill",
"deleteConfirmDescription": "Tindakan ini menghapus file keterampilan dari ruang kerja saat ini dan tidak dapat dibatalkan.",
"deleteConfirmAction": "Hapus keterampilan",
"instructionsTitle": "Petunjuk keterampilan",
"setupRequired": "Perlu penyiapan",
"setupDescription": "Instal dependensi yang belum tersedia di mesin yang menjalankan nanobot, lalu periksa lagi.",
"copySetupCommand": "Salin perintah penyiapan",
"checkAgain": "Periksa lagi",
"marketplaceSearchFailed": "Tidak dapat mencari marketplace skill.",
"marketplaceInstallFailed": "Tidak dapat memasang skill ini.",
"marketplaceSearchPlaceholder": "Cari skill",
"marketplaceSearchLabel": "Cari skill",
"marketplaceSearchFailed": "Tidak dapat mencari marketplace keterampilan.",
"marketplaceInstallFailed": "Tidak dapat memasang keterampilan ini.",
"marketplaceSearchPlaceholder": "Cari keterampilan",
"marketplaceSearchLabel": "Cari keterampilan",
"marketplaceSearching": "Mencari",
"marketplaceProviderFilter": "Sumber skill",
"marketplaceProviderFilter": "Sumber keterampilan",
"marketplaceProviderAll": "Semua",
"marketplaceTrendingTitle": "Tren per marketplace",
"marketplaceTrendingDescription": "Setiap marketplace mempertahankan peringkat dan metrik pemasangannya sendiri.",
"marketplaceViewAll": "Lihat semua",
"marketplaceTrendingUnavailable": "Skill populer sementara tidak tersedia.",
"marketplaceEmpty": "Tidak ada skill yang ditemukan untuk “{{query}}”.",
"marketplaceTrendingUnavailable": "Keterampilan populer sementara tidak tersedia.",
"marketplaceEmpty": "Tidak ada keterampilan yang ditemukan untuk “{{query}}”.",
"marketplaceConfirmTitle": "Pasang {{name}}?",
"marketplaceConfirmDescription": "Skill pihak ketiga ini berasal dari {{provider}} ({{source}}) dan mungkin berisi instruksi atau skrip yang dapat dijalankan.",
"marketplaceConfirmInstall": "Pasang skill",
"marketplaceConfirmDescription": "Keterampilan pihak ketiga ini berasal dari {{provider}} ({{source}}) dan mungkin berisi instruksi atau skrip yang dapat dijalankan.",
"marketplaceConfirmInstall": "Pasang keterampilan",
"marketplaceOpen": "Buka {{name}} di {{provider}}",
"marketplaceOpenProvider": "Buka {{provider}}",
"marketplaceInstalls24h": "{{formattedCount}} pemasangan / 24 jam",
@@ -840,16 +865,16 @@
"marketplaceInstall": "Pasang",
"marketplaceNoTrend": "Belum ada tren",
"marketplaceTrendLabel": "Tren pemasangan 8 minggu",
"featured": "Skill agent",
"empty": "Tidak ada skill yang tersedia.",
"featured": "Keterampilan agen",
"empty": "Tidak ada keterampilan yang tersedia.",
"sourceWorkspace": "Kustom",
"sourceBuiltin": "Bawaan",
"statusAvailable": "Tersedia",
"statusUnavailable": "Tidak tersedia",
"unavailableReason": "Kurang: {{reason}}",
"openDetails": "Buka detail {{name}}",
"loadingDetail": "Memuat detail skill...",
"loadFailed": "Tidak dapat memuat detail skill.",
"loadingDetail": "Memuat detail keterampilan...",
"loadFailed": "Tidak dapat memuat detail keterampilan.",
"descriptionTitle": "Deskripsi",
"source": "Sumber",
"status": "Status",
@@ -867,7 +892,7 @@
"voice": {
"selectProvider": "Pilih penyedia",
"configureProvider": "Konfigurasi penyedia",
"languageAuto": "Auto"
"languageAuto": "Otomatis"
}
},
"chat": {
@@ -881,34 +906,34 @@
"actions": "Aksi topik untuk {{title}}",
"newInProject": "Mulai topik baru di {{project}}",
"activity": {
"running": "Agent running",
"complete": "Agent finished",
"updated": "New activity"
"running": "Agen sedang berjalan",
"complete": "Agen selesai",
"updated": "Aktivitas baru"
},
"pin": "Pin",
"unpin": "Unpin",
"rename": "Rename",
"pin": "Sematkan",
"unpin": "Lepas sematan",
"rename": "Ganti nama",
"renameTitle": "Ganti nama topik",
"renameDescription": "Pilih nama lokal di bilah sisi untuk topik ini.",
"renamePlaceholder": "Nama topik",
"renameProjectTitle": "Rename project",
"renameProjectDescription": "Choose a local sidebar name for this project.",
"renameProjectPlaceholder": "Project name",
"renameSave": "Save",
"archive": "Archive",
"unarchive": "Unarchive",
"showArchived": "Show archived",
"hideArchived": "Hide archived",
"renameProjectTitle": "Ganti nama proyek",
"renameProjectDescription": "Pilih nama lokal untuk proyek ini di bilah sisi.",
"renameProjectPlaceholder": "Nama proyek",
"renameSave": "Simpan",
"archive": "Arsipkan",
"unarchive": "Batalkan arsip",
"showArchived": "Tampilkan yang diarsipkan",
"hideArchived": "Sembunyikan yang diarsipkan",
"delete": "Hapus",
"newChat": "Topik baru",
"groups": {
"pinned": "Pinned",
"pinned": "Disematkan",
"all": "Topik",
"projects": "Projects",
"today": "Today",
"yesterday": "Yesterday",
"earlier": "Earlier",
"archived": "Archived"
"projects": "Proyek",
"today": "Hari ini",
"yesterday": "Kemarin",
"earlier": "Sebelumnya",
"archived": "Diarsipkan"
}
},
"deleteConfirm": {
@@ -935,7 +960,7 @@
}
},
"connection": {
"idle": "Idle",
"idle": "Tidak aktif",
"connecting": "Menghubungkan…",
"open": "Terhubung",
"reconnecting": "Menyambung ulang…",
@@ -961,8 +986,8 @@
"prompt": "Bantu saya menganalisis data ini dan soroti pola yang paling penting."
},
"brainstorm": {
"title": "Brainstorm ide",
"prompt": "Brainstorm beberapa ide praktis dan tradeoff untuk masalah ini."
"title": "Curah gagasan",
"prompt": "Curahkan beberapa ide praktis dan pertimbangannya untuk masalah ini."
},
"code": {
"title": "Tulis kode",
@@ -974,7 +999,7 @@
},
"more": {
"title": "Lainnya",
"prompt": "Tunjukkan beberapa cara berguna Anda dapat membantu di workspace ini."
"prompt": "Tunjukkan beberapa cara berguna Anda dapat membantu di ruang kerja ini."
}
},
"imageQuickActions": {
@@ -988,19 +1013,19 @@
},
"poster": {
"title": "Buat poster",
"prompt": "Buat konsep poster yang rapi untuk asisten AI pribadi, komposisi modern, hierarki visual kuat, cocok untuk landing page."
"prompt": "Buat konsep poster yang rapi untuk asisten AI pribadi, komposisi modern, hierarki visual kuat, cocok untuk halaman arahan."
},
"product": {
"title": "Mockup produk",
"prompt": "Buat gambar mockup produk yang bersih untuk aplikasi web AI percakapan, antarmuka minimal, pencahayaan premium, bingkai perangkat realistis."
"title": "Maket produk",
"prompt": "Buat gambar maket produk yang bersih untuk aplikasi web AI percakapan, antarmuka minimal, pencahayaan premium, bingkai perangkat realistis."
},
"portrait": {
"title": "Potret bergaya",
"prompt": "Buat potret bergaya dari pendamping AI yang ramah, pencahayaan lembut, detail tetapi tetap mudah didekati, gaya ilustrasi modern."
},
"edit": {
"title": "Edit gambar",
"prompt": "Bantu saya mengedit gambar. Minta saya mengunggah atau menyebutkan gambar terlebih dahulu, lalu buat hasil editnya."
"title": "Ubah gambar",
"prompt": "Bantu saya mengubah gambar. Minta saya mengunggah atau menyebutkan gambar terlebih dahulu, lalu buat hasil ubahannya."
}
}
},
@@ -1059,21 +1084,21 @@
"label": "Panduan antrean",
"guide": "Pandu",
"delete": "Hapus panduan",
"edit": "Edit panduan",
"edit": "Ubah panduan",
"drag": "Seret untuk mengurutkan"
},
"attachImage": "Lampirkan file",
"imageMode": {
"label": "Buat gambar",
"toggle": "Alihkan mode pembuatan gambar",
"placeholder": "Deskripsikan atau edit gambar…",
"placeholder": "Deskripsikan atau ubah gambar…",
"aspectAria": "Rasio aspek gambar",
"aspectLabel": "Rasio gambar",
"aspect": {
"auto": "Otomatis",
"1_1": "Persegi 1:1",
"3_4": "Potret 3:4",
"9_16": "Story 9:16",
"9_16": "Cerita 9:16",
"4_3": "Lanskap 4:3",
"16_9": "Lebar 16:9"
}
@@ -1113,7 +1138,7 @@
},
"stop": {
"title": "Hentikan tugas saat ini",
"description": "Batalkan giliran agent yang sedang aktif di chat ini."
"description": "Batalkan giliran agen yang sedang aktif di chat ini."
},
"restart": {
"title": "Mulai ulang nanobot",
@@ -1121,11 +1146,11 @@
},
"status": {
"title": "Tampilkan status",
"description": "Tampilkan status runtime, provider, dan channel."
"description": "Tampilkan status waktu proses, penyedia, dan kanal."
},
"model": {
"title": "Model",
"description": "Tampilkan atau ganti preset model aktif."
"description": "Tampilkan atau ganti prasetel model aktif."
},
"history": {
"title": "Tampilkan riwayat",
@@ -1145,15 +1170,15 @@
},
"dream_prompt": {
"title": "Memori Dream",
"description": "Atur cara Dream menyusun memori workspace ini."
"description": "Atur cara Dream menyusun memori ruang kerja ini."
},
"goal": {
"title": "Tujuan jangka panjang",
"description": "Instruksikan agen memperlakukan ini sebagai tujuan multi-langkah yang berkelanjutan."
},
"trigger": {
"title": "Buat trigger lokal",
"description": "Buat trigger CLI yang terikat ke sesi chat ini."
"title": "Buat pemicu lokal",
"description": "Buat pemicu CLI yang terikat ke sesi chat ini."
},
"help": {
"title": "Tampilkan bantuan",
@@ -1177,7 +1202,7 @@
},
"encoding": "Memproses…",
"remove": "Hapus lampiran",
"normalizedSizeHint": "{{orig}} → {{current}} (auto)",
"normalizedSizeHint": "{{orig}} → {{current}} (otomatis)",
"textTooLarge": "Teks pesan terlalu besar (maksimum {{max}})",
"imageRejected": {
"unsupported_type": "Tipe file tidak didukung",
@@ -1194,32 +1219,35 @@
"mentions": {
"ariaLabel": "Aplikasi",
"label": "Aplikasi",
"cliGroup": "App CLI",
"cliGroup": "Aplikasi CLI",
"mcpGroup": "Layanan MCP",
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "Gunakan @{{name}} sebagai aplikasi CLI lokal",
"mcpDescription": "Gunakan @{{name}} sebagai server MCP"
"mcpDescription": "Gunakan @{{name}} sebagai server MCP",
"cliTitle": "Aplikasi CLI: {{name}}",
"mcpTitle": "Server MCP: {{name}}"
},
"workspace": {
"accessAria": "Mode akses workspace",
"accessAria": "Mode akses ruang kerja",
"projectAria": "Pilih proyek",
"projectPlaceholder": "Pilih proyek",
"default": "Izin default",
"defaultShort": "Default",
"default": "Izin bawaan",
"defaultShort": "Bawaan",
"full": "Akses penuh",
"fullShort": "Penuh"
}
},
"scrollToBottom": "Gulir ke bawah",
"loadEarlier": "Muat pesan sebelumnya",
"forkedFromHistory": "Fork dari riwayat",
"forkedFromHistory": "Cabang dari riwayat",
"promptNavigator": {
"open": "Buka navigator prompt",
"title": "Prompt",
"search": "Cari prompt",
"noResults": "Tidak ada prompt yang cocok.",
"jumpTo": "Lompat ke prompt: {{label}}"
"open": "Buka navigasi instruksi",
"title": "Instruksi",
"search": "Cari instruksi",
"noResults": "Tidak ada instruksi yang cocok.",
"jumpTo": "Lompat ke instruksi: {{label}}",
"railAria": "Navigasi instruksi pengguna"
}
},
"message": {
@@ -1243,19 +1271,27 @@
"agentActivityLiveSummary": "Berjalan… · {{reasoning}} langkah · {{tools}} panggilan alat",
"agentActivityLiveToolsOnly": "Berjalan… · {{tools}} panggilan alat",
"imageAttachment": "Lampiran gambar",
"videoAttachment": "Lampiran video",
"fileAttachment": "Lampiran file",
"attachmentUnavailable": "Lampiran tidak tersedia",
"dataTable": "Tabel data",
"fileEditPreparing": "Menyiapkan perubahan file…",
"openLink": "Buka tautan: {{label}}",
"openAttachment": "Buka {{name}}",
"skill": "Keterampilan: {{name}}",
"askAboutSelection": "Tanyakan tentang ini",
"forkFromHere": "Fork",
"forkFromHere": "Buat cabang",
"copyReply": "Salin",
"copiedReply": "Disalin",
"turnLatencyTitle": "Waktu respons (ujung ke ujung)",
"fileEditViewDiff": "Lihat diff",
"fileEditViewLargeDiff": "Lihat diff besar",
"fileEditViewDiff": "Lihat perbedaan",
"fileEditViewLargeDiff": "Lihat perbedaan besar",
"fileEditDiffLineCount": "{{count}} baris",
"fileEditUnchangedLinesHidden": "{{count}} baris tidak berubah disembunyikan",
"fileEditShowMoreLines": "Tampilkan {{count}} baris lagi",
"fileEditShowFewerLines": "Tampilkan lebih sedikit baris",
"fileEditOpenFile": "Buka file",
"fileEditDiffTruncated": "Diff dipotong. Buka file untuk melihat perubahan lengkap.",
"fileEditDiffTruncated": "Perbedaan dipotong. Buka file untuk melihat perubahan lengkap.",
"activityThinkingFor": "Berpikir selama {{duration}}",
"activityThought": "Selesai berpikir",
"activityThoughtFor": "Selesai berpikir dalam {{duration}}",
@@ -1283,6 +1319,7 @@
},
"filePreview": {
"aria": "Pratinjau file",
"breadcrumb": "Jalur file",
"close": "Tutup pratinjau file",
"loading": "Memuat pratinjau...",
"failed": "Tidak dapat mempratinjau file ini.",
@@ -1297,7 +1334,10 @@
"copied": "Tersalin"
},
"common": {
"dismiss": "Tutup"
"dismiss": "Tutup",
"close": "Tutup",
"current": "Saat ini",
"cancel": "Batal"
},
"errors": {
"messageTooBig": {
@@ -1305,8 +1345,8 @@
"body": "Server menolak pesan terakhir karena melebihi batas ukuran. Hapus beberapa gambar atau gunakan berkas yang lebih kecil, lalu coba lagi."
},
"workspaceScopeRejected": {
"title": "Workspace tidak berubah",
"body": "Gateway menolak proyek atau mode akses yang diminta, jadi Nanobot tetap memakai workspace sebelumnya."
"title": "Ruang kerja tidak berubah",
"body": "Gateway menolak proyek atau mode akses yang diminta, jadi Nanobot tetap memakai ruang kerja sebelumnya."
},
"turnRejected": {
"title": "Pesan tidak terkirim",
@@ -1315,7 +1355,7 @@
},
"workspace": {
"dialog": {
"defaultProject": "Workspace default",
"defaultProject": "Ruang kerja bawaan",
"manual": "Tempel path",
"manualPlaceholder": "/Users/name/project",
"usePath": "Gunakan path",
+109 -69
View File
@@ -38,6 +38,15 @@
},
"meta": {
"description": "nanobot Web UI — nanobot ワークスペースと会話します。"
},
"pairing": {
"title": "チャットユーザーをペアリング",
"description": "チャットに表示されたペアリングコードを入力してください。",
"code": "ペアリングコード",
"matched": "{{channel}} と一致しました。接続中…",
"expiresInline": "コードの有効期限: {{expires}}。",
"queueCount": "{{count}} 件待機中",
"noMatch": "このコードに一致する保留中のリクエストはありません。"
}
},
"sidebar": {
@@ -97,7 +106,7 @@
"imageDefaults": "既定値",
"webSearch": "ウェブ検索",
"webBehavior": "動作",
"identity": "ID",
"regional": "地域",
"webuiSafety": "WebUI の安全性",
"capabilities": "機能",
"cliApps": "CLI アプリ",
@@ -136,8 +145,6 @@
"defaultImageSize": "既定のサイズ",
"maxImagesPerTurn": "1 ターンの最大画像数",
"imageSaveDir": "保存先ディレクトリ",
"botName": "Bot 名",
"botIcon": "Bot アイコン",
"timezone": "タイムゾーン",
"workspacePath": "既定のワークスペース",
"localServiceAccess": "ローカルサービス",
@@ -164,9 +171,9 @@
"model": "このプリセットで使用するモデルを選択します。",
"configPath": "現在ゲートウェイが使用している設定ファイルです。",
"selectedPreset": "名前付きプリセットはここでは読み取り専用です。編集するには config.json を変更してください。",
"presetModel": "Default に切り替えると、WebUI からモデルとプロバイダーを編集できます。",
"presetModel": "既定に切り替えると、WebUI からモデルとプロバイダーを編集できます。",
"density": "このブラウザーにのみ保存されます。",
"activityMode": "既定で表示する agent アクティビティの詳細量を選択します。",
"activityMode": "既定で表示するエージェントアクティビティの詳細量を選択します。",
"fileEditDisplay": "ファイル編集アクティビティを行数または差分で表示します。",
"codeWrap": "小さな画面でも長いコード行を読みやすくします。",
"maxResults": "各 web_search 呼び出しで返す結果数です。",
@@ -174,15 +181,13 @@
"jinaReader": "利用可能な場合、web_fetch に Jina Reader を使います。",
"imageGeneration": "画像プロバイダーが設定済みのとき、チャットで generate_image を有効にします。",
"imageProvider": "generate_image で使用する登録済みプロバイダーを選択します。",
"imageProviderStatus": "画像生成はプロバイダーの認証情報を再利用します。",
"imageProviderStatus": "画像生成はプロバイダー設定の認証情報を再利用します。",
"imageModel": "選択した画像プロバイダーへ送信するモデル名です。",
"defaultAspectRatio": "プロンプトで比率が指定されていない場合に使用します。",
"defaultImageSize": "対応しているプロバイダーへ送信するサイズ指定です。",
"maxImagesPerTurn": "1 回の generate_image リクエストで生成できる画像数の上限です。",
"botName": "nanobot が表示名を使う場所に表示されます。",
"botIcon": "Bot 名の横に表示する短い emoji またはテキストです。",
"timezone": "スケジュールと時刻を考慮する返信に使用します。",
"localServiceAccess": "Full Access の shell コマンドが localhost サービスにアクセスできるようにします。",
"localServiceAccess": "フルアクセスの shell コマンドが localhost サービスにアクセスできるようにします。",
"webuiDefaultAccess": "プロジェクト固有の権限がない Web チャットで使用します。",
"securityManagedControls": "Web 取得は常にローカル、プライベート、メタデータサービスを保護します。コアチャネルの安全性は config.json で管理されます。",
"currentModel": "新しい返信に使用します。",
@@ -193,7 +198,7 @@
"cliAppsFilter": "アプリ、カテゴリ、機能で検索します。",
"logs": "ネイティブエンジンのログフォルダーを開きます。",
"diagnostics": "サポート用の小さなランタイムレポートを書き出します。",
"localServiceAccessNative": "Full Access の shell コマンドがこの Mac 上のサービスにアクセスできるようにします。",
"localServiceAccessNative": "フルアクセスの shell コマンドがこの Mac 上のサービスにアクセスできるようにします。",
"webuiDefaultAccessNative": "プロジェクト固有の権限がないネイティブチャットで使用します。",
"contextWindow": "このモデル設定で使う既定のコンテキスト予算を選択します。",
"transcription": "マイク入力を送信前に文字起こしします。チャネルの音声メッセージも同じ設定を使います。",
@@ -212,12 +217,12 @@
"ready": "準備完了",
"privateEngine": "プライベートエンジン",
"unixSocket": "Unix ソケット",
"defaultWorkspace": "デフォルトワークスペース",
"defaultWorkspace": "既定のワークスペース",
"comfortable": "標準",
"compact": "コンパクト",
"auto": "自動",
"expanded": "展開",
"default": "デフォルト",
"default": "既定",
"summary": "概要",
"diff": "差分",
"collapsedDiff": "折りたたみ差分",
@@ -228,7 +233,10 @@
"configured": "設定済み",
"notConfigured": "未設定",
"pending": "保留中",
"restartingEngine": "再起動中"
"restartingEngine": "再起動中",
"checking": "確認中",
"running": "実行中",
"needsSetup": "設定が必要"
},
"status": {
"loading": "設定を読み込んでいます...",
@@ -256,30 +264,31 @@
"deleting": "削除中...",
"edit": "編集",
"cancel": "キャンセル",
"dismiss": "閉じる",
"open": "開く",
"export": "書き出す",
"opening": "開いています...",
"exporting": "書き出しています..."
},
"byok": {
"description": "自分の provider キーを使います。Nanobot は現在の config から値を読み込み、設定済みの provider だけをモデルプリセットで使用できます。",
"description": "自分のプロバイダーキーを使います。Nanobot は現在の設定から値を読み込み、設定済みのプロバイダーだけをモデルプリセットで使用できます。",
"configured": "設定済み",
"notConfigured": "未設定",
"configuredSection": "設定済み",
"notConfiguredSection": "未設定",
"showMore": "さらに {{count}} 件表示",
"showLess": "折りたたむ",
"apiKey": "API key",
"apiBase": "API base",
"apiKeyPlaceholder": "API key を入力",
"apiKey": "API キー",
"apiBase": "API ベース",
"apiKeyPlaceholder": "API キーを入力",
"apiKeyConfiguredPlaceholder": "空欄のままなら現在の key を保持",
"configuredKeyHint": "設定済み key",
"apiBasePlaceholder": "provider の既定値を使用",
"apiKeyRequired": "この provider を設定するには API key が必要です。",
"showApiKey": "API key を表示",
"hideApiKey": "API key を隠す",
"noConfiguredProviders": "設定済み provider がありません",
"configureFirst": "先に BYOK で provider を設定してください。",
"apiBasePlaceholder": "プロバイダーの既定値を使用",
"apiKeyRequired": "このプロバイダーを設定するには API キーが必要です。",
"showApiKey": "API キーを表示",
"hideApiKey": "API キーを隠す",
"noConfiguredProviders": "設定済みプロバイダーがありません",
"configureFirst": "先に BYOK でプロバイダーを設定してください。",
"openByok": "BYOK を開く",
"tabs": {
"ariaLabel": "BYOK 認証情報タイプ",
@@ -287,20 +296,20 @@
"webSearch": "ウェブ検索"
},
"webSearch": {
"provider": "検索 provider",
"providerHelp": "web search ツールで使うバックエンドを選択します。",
"selectProvider": "provider を選択",
"provider": "検索プロバイダー",
"providerHelp": "Web 検索ツールで使うバックエンドを選択します。",
"selectProvider": "プロバイダーを選択",
"credentials": "認証情報",
"noCredentialRequired": "key は不要",
"noCredentialHelp": "DuckDuckGo は API key を保存せずに使えます。",
"noCredentialHelp": "DuckDuckGo は API キーを保存せずに使えます。",
"apiKeyHelp": "config に保存され、保存後はマスク表示されます。",
"baseUrl": "Base URL",
"baseUrl": "ベース URL",
"baseUrlHelp": "SearXNG には自分のインスタンス URL が必要です。",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "この検索 provider には API key が必要です。",
"baseUrlRequired": "SearXNG には Base URL が必要です。",
"apiKeyRequired": "この検索プロバイダーには API キーが必要です。",
"baseUrlRequired": "SearXNG にはベース URL が必要です。",
"missingCredential": "保存する前に必要な認証情報を入力してください。",
"saveHint": "変更は新しい web search リクエストに適用されます。"
"saveHint": "変更は新しい Web 検索リクエストに適用されます。"
}
},
"overview": {
@@ -314,13 +323,13 @@
"workspace": "ワークスペース"
},
"usage": {
"title": "Token アクティビティ",
"shortTitle": "Token Usage",
"subtitle": "直近 12 か月にプロバイダーが報告した使用量。",
"empty": "新しいモデル返信の後に token アクティビティが表示されます。",
"totalTokens": "累計 Token 数",
"peakTokens": "ピーク Token 数",
"thirtyDayTokens": "30 日 Token 数",
"title": "トークンアクティビティ",
"shortTitle": "トークン使用量",
"subtitle": "直近 12 か月にプロバイダーが報告したトークン使用量。",
"empty": "新しいモデル返信の後にトークンアクティビティが表示されます。",
"totalTokens": "累計トークン数",
"peakTokens": "ピークトークン数",
"thirtyDayTokens": "30 日間のトークン数",
"currentStreak": "現在の連続日数",
"longestStreak": "最長連続日数",
"daysValue": "{{count}} 日",
@@ -329,7 +338,7 @@
"requests": "リクエスト",
"estimated": "推定",
"includesEstimates": "推定を含む",
"cellTitle": "{{date}}: {{tokens}} tokens, {{requests}} 件のリクエスト",
"cellTitle": "{{date}}: {{tokens}} トークン、{{requests}} 件のリクエスト",
"sources": {
"user": "チャット",
"api": "API",
@@ -362,9 +371,19 @@
"selectProvider": "プロバイダーを選択",
"selectAspect": "比率を選択",
"selectSize": "サイズを選択",
"selectModel": "画像モデルを選択",
"searchOrTypeModel": "モデル ID を検索または入力",
"typeModelId": "このプロバイダーが対応するモデル ID を入力してください。",
"configureProvider": "プロバイダーを設定",
"missingCredential": "画像生成を有効にする前に、このプロバイダーを設定してください。"
},
"capabilities": {
"providerSupport": "プロバイダーサポート",
"providerInstallOnSave": "このプロバイダーを保存すると、必要なサポートが自動的にインストールされます。",
"searchSupport": "検索プロバイダーサポート",
"searchInstallOnSave": "保存時に Olostep のサポートが自動的にインストールされます。",
"installing": "サポートをインストール中..."
},
"models": {
"selectModel": "モデルを選択",
"addConfiguration": "設定を追加",
@@ -387,7 +406,7 @@
"advancedOptions": "詳細オプション",
"advancedSummary": "コンテキスト {{context}} · 最大 {{max}} トークン",
"maxTokens": "最大出力トークン",
"temperature": "Temperature",
"temperature": "温度",
"reasoningEffort": "推論の強度",
"convertTitle": "現在のモデル設定を変換",
"convertHelp": "既存のプライマリモデルとフォールバックモデルをプリセットに変換し、ここで順序を管理できるようにします。",
@@ -477,9 +496,9 @@
"serverUrl": "URL",
"transport": "トランスポート",
"command": "コマンド",
"args": "Args JSON",
"headers": "Headers JSON",
"env": "Env JSON",
"args": "引数 JSON",
"headers": "ヘッダー JSON",
"env": "環境変数 JSON",
"timeout": "ツールのタイムアウト",
"advancedOptions": "詳細オプション",
"hideAdvanced": "詳細を隠す",
@@ -507,6 +526,7 @@
"statusMissingCredentials": "キーが必要",
"statusMissingDependency": "依存関係が必要",
"statusComingSoon": "近日公開",
"comingSoon": "近日公開",
"statusNotInstalled": "未有効",
"toolScope": "ツール",
"allTools": "すべて",
@@ -569,6 +589,8 @@
"advanced": "詳細設定",
"checkAndEnable": "確認して有効化",
"checkConnection": "接続を確認",
"connectionChecks": "接続チェック",
"open": "開く",
"checkedAndEnabled": "確認して有効化しました。",
"checking": "確認中...",
"checkOnly": "確認のみ",
@@ -664,6 +686,8 @@
"protected": "保護済み",
"editTitle": "自動タスクを編集",
"save": "保存",
"commandCopied": "コピーしました",
"copyCommand": "コピー",
"deleteTitle": "自動タスクを削除",
"deleteDescription": "{{name}} を cron ストアから削除します。過去のチャットメッセージはセッションに残ります。",
"cancel": "キャンセル",
@@ -723,6 +747,7 @@
"fields": {
"name": "名前",
"message": "メッセージ",
"command": "コマンド",
"scheduleType": "スケジュール種別",
"every": "間隔",
"unit": "単位",
@@ -757,7 +782,7 @@
"signInAgain": "再度サインイン",
"signOut": "サインアウト",
"signedInAs": "{{account}} としてサインイン済み",
"signInHelp": "このデバイスからサインインします。API key は config に保存されません。",
"signInHelp": "このデバイスからサインインします。API キーは設定に保存されません。",
"remoteSignInHelp": "「サインイン」を選択して自分のコンピューターで xAI を開き、サインイン後に表示される認証コードを貼り付けてください。",
"codexRemoteSignInHelp": "このブラウザーでサインインし、localhost の完全なコールバック URL を nanobot に貼り付けてください。",
"signInRequired": "サインインが必要です",
@@ -881,34 +906,34 @@
"actions": "「{{title}}」のトピック操作",
"newInProject": "「{{project}}」で新しいトピックを開始",
"activity": {
"running": "Agent running",
"complete": "Agent finished",
"updated": "New activity"
"running": "エージェント実行中",
"complete": "エージェント完了",
"updated": "新しいアクティビティ"
},
"pin": "Pin",
"unpin": "Unpin",
"rename": "Rename",
"pin": "ピン留め",
"unpin": "ピン留めを解除",
"rename": "名前を変更",
"renameTitle": "トピック名を変更",
"renameDescription": "このトピックのサイドバー表示名を選択します。",
"renamePlaceholder": "トピック名",
"renameProjectTitle": "Rename project",
"renameProjectDescription": "Choose a local sidebar name for this project.",
"renameProjectPlaceholder": "Project name",
"renameSave": "Save",
"archive": "Archive",
"unarchive": "Unarchive",
"showArchived": "Show archived",
"hideArchived": "Hide archived",
"renameProjectTitle": "プロジェクト名を変更",
"renameProjectDescription": "このプロジェクトのサイドバー表示名を選択します。",
"renameProjectPlaceholder": "プロジェクト名",
"renameSave": "保存",
"archive": "アーカイブ",
"unarchive": "アーカイブを解除",
"showArchived": "アーカイブ済みを表示",
"hideArchived": "アーカイブ済みを隠す",
"delete": "削除",
"newChat": "新しいトピック",
"groups": {
"pinned": "Pinned",
"pinned": "ピン留め",
"all": "トピック",
"projects": "Projects",
"today": "Today",
"yesterday": "Yesterday",
"earlier": "Earlier",
"archived": "Archived"
"projects": "プロジェクト",
"today": "今日",
"yesterday": "昨日",
"earlier": "以前",
"archived": "アーカイブ済み"
}
},
"deleteConfirm": {
@@ -1113,7 +1138,7 @@
},
"stop": {
"title": "現在のタスクを停止",
"description": "このチャットで実行中の agent ターンをキャンセルします。"
"description": "このチャットで実行中のエージェントのターンをキャンセルします。"
},
"restart": {
"title": "nanobot を再起動",
@@ -1121,7 +1146,7 @@
},
"status": {
"title": "ステータスを表示",
"description": "ランタイム、provider、channel の状態を表示します。"
"description": "ランタイム、プロバイダー、チャンネルの状態を表示します。"
},
"model": {
"title": "モデル",
@@ -1199,7 +1224,9 @@
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "@{{name}} をローカル CLI アプリとして使用",
"mcpDescription": "@{{name}} を MCP サーバーとして使用"
"mcpDescription": "@{{name}} を MCP サーバーとして使用",
"cliTitle": "CLI アプリ: {{name}}",
"mcpTitle": "MCP サーバー: {{name}}"
},
"workspace": {
"accessAria": "ワークスペースのアクセスモード",
@@ -1219,7 +1246,8 @@
"title": "プロンプト",
"search": "プロンプトを検索",
"noResults": "一致するプロンプトがありません。",
"jumpTo": "プロンプトへ移動: {{label}}"
"jumpTo": "プロンプトへ移動: {{label}}",
"railAria": "ユーザープロンプトのナビゲーション"
}
},
"message": {
@@ -1243,6 +1271,14 @@
"agentActivityLiveSummary": "実行中… · {{reasoning}} ステップ · ツール呼び出し {{tools}} 回",
"agentActivityLiveToolsOnly": "実行中… · ツール呼び出し {{tools}} 回",
"imageAttachment": "画像の添付",
"videoAttachment": "動画の添付",
"fileAttachment": "ファイルの添付",
"attachmentUnavailable": "添付ファイルを利用できません",
"dataTable": "データテーブル",
"fileEditPreparing": "ファイル編集を準備中…",
"openLink": "リンクを開く: {{label}}",
"openAttachment": "開く: {{name}}",
"skill": "スキル: {{name}}",
"askAboutSelection": "この内容について質問",
"forkFromHere": "分岐",
"copyReply": "コピー",
@@ -1283,6 +1319,7 @@
},
"filePreview": {
"aria": "ファイルプレビュー",
"breadcrumb": "ファイルパス",
"close": "ファイルプレビューを閉じる",
"loading": "プレビューを読み込み中...",
"failed": "このファイルをプレビューできませんでした。",
@@ -1297,7 +1334,10 @@
"copied": "コピーしました"
},
"common": {
"dismiss": "閉じる"
"dismiss": "閉じる",
"close": "閉じる",
"current": "現在",
"cancel": "キャンセル"
},
"errors": {
"messageTooBig": {
+114 -74
View File
@@ -38,6 +38,15 @@
},
"meta": {
"description": "nanobot 웹 UI — nanobot 작업공간과 대화하세요."
},
"pairing": {
"title": "채팅 사용자 연결",
"description": "채팅에 표시된 연결 코드를 입력하세요.",
"code": "연결 코드",
"matched": "{{channel}} 일치. 연결 중...",
"expiresInline": "코드 만료: {{expires}}.",
"queueCount": "{{count}}개 대기 중",
"noMatch": "이 코드와 일치하는 대기 중인 요청이 없습니다."
}
},
"sidebar": {
@@ -97,7 +106,7 @@
"imageDefaults": "기본값",
"webSearch": "웹 검색",
"webBehavior": "동작",
"identity": "ID",
"regional": "지역",
"webuiSafety": "WebUI 보안",
"capabilities": "기능",
"cliApps": "CLI 앱",
@@ -136,8 +145,6 @@
"defaultImageSize": "기본 크기",
"maxImagesPerTurn": "턴당 최대 이미지 수",
"imageSaveDir": "저장 디렉터리",
"botName": "Bot 이름",
"botIcon": "Bot 아이콘",
"timezone": "시간대",
"workspacePath": "기본 작업공간",
"localServiceAccess": "로컬 서비스",
@@ -164,10 +171,10 @@
"model": "이 프리셋에서 사용할 모델을 선택하세요.",
"configPath": "현재 게이트웨이가 사용하는 설정 파일입니다.",
"selectedPreset": "이름 있는 프리셋은 여기서 읽기 전용입니다. config.json에서 편집하세요.",
"presetModel": "Default로 전환하면 WebUI에서 모델과 제공자를 편집할 수 있습니다.",
"presetModel": "기본값으로 전환하면 WebUI에서 모델과 제공자를 편집할 수 있습니다.",
"density": "이 브라우저에만 저장됩니다.",
"activityMode": "기본으로 표시할 agent 활동 세부 수준을 선택합니다.",
"fileEditDisplay": "파일 편집 활동을 줄 수 또는 diff로 표시할지 선택합니다.",
"activityMode": "기본으로 표시할 에이전트 활동 세부 수준을 선택합니다.",
"fileEditDisplay": "파일 편집 활동을 줄 수 또는 변경 사항으로 표시할지 선택합니다.",
"codeWrap": "작은 화면에서도 긴 코드 줄을 읽기 쉽게 유지합니다.",
"maxResults": "각 web_search 호출에서 반환되는 결과 수입니다.",
"timeout": "검색 제공자 요청이 타임아웃되기 전의 초입니다.",
@@ -179,11 +186,9 @@
"defaultAspectRatio": "프롬프트가 비율을 선택하지 않을 때 사용됩니다.",
"defaultImageSize": "지원하는 제공자에 보낼 크기 힌트입니다.",
"maxImagesPerTurn": "한 번의 generate_image 요청에서 생성할 수 있는 이미지 상한입니다.",
"botName": "nanobot이 표시 이름을 사용하는 곳에 표시됩니다.",
"botIcon": "Bot 이름 옆에 표시할 짧은 emoji 또는 텍스트입니다.",
"timezone": "일정과 시간 인식 답변에 사용됩니다.",
"localServiceAccess": "Full Access shell 명령이 localhost 서비스에 접근할 수 있게 합니다.",
"webuiDefaultAccess": "프로젝트별 권한이 없는 Web 채팅에 사용됩니다.",
"localServiceAccess": "전체 접근 권한 shell 명령이 localhost 서비스에 접근할 수 있게 합니다.",
"webuiDefaultAccess": "프로젝트별 권한이 없는 채팅에 사용됩니다.",
"securityManagedControls": "웹 가져오기는 항상 로컬, 사설, 메타데이터 서비스를 보호합니다. 핵심 채널 보안은 config.json에서 관리됩니다.",
"currentModel": "새 응답에 사용됩니다.",
"selectedModelProvider": "선택한 모델에 의해 설정됩니다.",
@@ -193,12 +198,12 @@
"cliAppsFilter": "앱, 카테고리 또는 기능으로 검색합니다.",
"logs": "네이티브 엔진 로그 폴더를 엽니다.",
"diagnostics": "지원용 작은 런타임 보고서를 내보냅니다.",
"localServiceAccessNative": "Full Access shell 명령이 이 Mac의 서비스에 접근할 수 있게 합니다.",
"localServiceAccessNative": "전체 접근 권한 shell 명령이 이 Mac의 서비스에 접근할 수 있게 합니다.",
"webuiDefaultAccessNative": "프로젝트별 권한이 없는 네이티브 채팅에 사용됩니다.",
"contextWindow": "이 모델 구성의 기본 컨텍스트 예산을 선택합니다.",
"transcription": "마이크 입력을 보내기 전에 텍스트로 변환합니다. 채널 음성 메시지도 같은 설정을 사용합니다.",
"transcriptionProvider": "Providers에 저장된 해당 제공자의 인증 정보를 사용합니다.",
"transcriptionProviderStatus": "API 키는 transcription 설정이 아니라 providers 아래에 유지됩니다.",
"transcriptionProvider": "제공자 설정에 저장된 해당 제공자의 인증 정보를 사용합니다.",
"transcriptionProviderStatus": "API 키는 음성 변환 설정이 아니라 제공자 설정에 유지됩니다.",
"transcriptionModel": "제공자가 사용자 지정 모델 ID를 요구하지 않으면 해석된 기본값을 사용하세요.",
"transcriptionLanguage": "en, zh, ja, ko 같은 선택적 ISO-639 힌트입니다."
},
@@ -219,8 +224,8 @@
"expanded": "펼침",
"default": "기본값",
"summary": "요약",
"diff": "Diff",
"collapsedDiff": "접힌 diff",
"diff": "변경 사항",
"collapsedDiff": "접힌 변경 사항",
"on": "켜짐",
"off": "꺼짐",
"defaultPermission": "기본 권한",
@@ -228,7 +233,10 @@
"configured": "구성됨",
"notConfigured": "미구성",
"pending": "대기 중",
"restartingEngine": "재시작 중"
"restartingEngine": "재시작 중",
"checking": "확인 중",
"running": "실행 중",
"needsSetup": "설정 필요"
},
"status": {
"loading": "설정을 불러오는 중...",
@@ -256,30 +264,31 @@
"deleting": "삭제 중...",
"edit": "편집",
"cancel": "취소",
"dismiss": "닫기",
"open": "열기",
"export": "내보내기",
"opening": "여는 중...",
"exporting": "내보내는 중..."
},
"byok": {
"description": "직접 provider 키를 가져옵니다. Nanobot은 현재 config에서 값을 읽고, 설정된 provider만 모델 프리셋에서 사용할 수 있습니다.",
"description": "직접 제공자 키를 사용합니다. Nanobot은 현재 구성에서 값을 읽고, 설정된 제공자만 모델 프리셋에서 사용할 수 있습니다.",
"configured": "설정됨",
"notConfigured": "설정 안 됨",
"configuredSection": "설정됨",
"notConfiguredSection": "설정 안 됨",
"showMore": "{{count}}개 더 보기",
"showLess": "접기",
"apiKey": "API key",
"apiBase": "API base",
"apiKeyPlaceholder": "API key 입력",
"apiKey": "API ",
"apiBase": "API 기본 주소",
"apiKeyPlaceholder": "API 입력",
"apiKeyConfiguredPlaceholder": "비워 두면 현재 key 유지",
"configuredKeyHint": "설정된 key",
"apiBasePlaceholder": "provider 기본값 사용",
"apiKeyRequired": "이 provider를 설정하려면 API key가 필요합니다.",
"showApiKey": "API key 표시",
"hideApiKey": "API key 숨기기",
"noConfiguredProviders": "설정된 provider가 없습니다",
"configureFirst": "먼저 BYOK에서 provider를 설정하세요.",
"apiBasePlaceholder": "제공자 기본값 사용",
"apiKeyRequired": "이 제공자를 설정하려면 API 가 필요합니다.",
"showApiKey": "API 표시",
"hideApiKey": "API 숨기기",
"noConfiguredProviders": "설정된 제공자가 없습니다",
"configureFirst": "먼저 BYOK에서 제공자를 설정하세요.",
"openByok": "BYOK 열기",
"tabs": {
"ariaLabel": "BYOK 자격 증명 유형",
@@ -287,20 +296,20 @@
"webSearch": "웹 검색"
},
"webSearch": {
"provider": "검색 provider",
"providerHelp": "web search 도구가 사용할 백엔드를 선택합니다.",
"selectProvider": "provider 선택",
"provider": "검색 제공자",
"providerHelp": "웹 검색 도구가 사용할 백엔드를 선택합니다.",
"selectProvider": "제공자 선택",
"credentials": "자격 증명",
"noCredentialRequired": "key 필요 없음",
"noCredentialHelp": "DuckDuckGo는 API key를 저장하지 않고 사용할 수 있습니다.",
"noCredentialHelp": "DuckDuckGo는 API 를 저장하지 않고 사용할 수 있습니다.",
"apiKeyHelp": "config에 저장되며 저장 후에는 마스킹되어 표시됩니다.",
"baseUrl": "Base URL",
"baseUrl": "기본 URL",
"baseUrlHelp": "SearXNG에는 자체 인스턴스 URL이 필요합니다.",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "이 검색 provider에는 API key가 필요합니다.",
"baseUrlRequired": "SearXNG에는 Base URL이 필요합니다.",
"apiKeyRequired": "이 검색 제공자에는 API 가 필요합니다.",
"baseUrlRequired": "SearXNG에는 기본 URL이 필요합니다.",
"missingCredential": "저장하기 전에 필요한 자격 증명을 입력하세요.",
"saveHint": "변경 사항은 새 web search 요청에 적용됩니다."
"saveHint": "변경 사항은 새 웹 검색 요청에 적용됩니다."
}
},
"overview": {
@@ -314,13 +323,13 @@
"workspace": "작업공간"
},
"usage": {
"title": "Token 활동",
"shortTitle": "Token Usage",
"title": "토큰 활동",
"shortTitle": "토큰 사용량",
"subtitle": "최근 12개월 동안 제공자가 보고한 사용량입니다.",
"empty": "새 모델 응답 이후 token 활동이 표시됩니다.",
"totalTokens": "누적 Token 수",
"peakTokens": "최고 Token 수",
"thirtyDayTokens": "30일 Token 수",
"empty": "새 모델 응답 이후 토큰 활동이 표시됩니다.",
"totalTokens": "누적 토큰 수",
"peakTokens": "최고 토큰 수",
"thirtyDayTokens": "30일 토큰 수",
"currentStreak": "현재 연속 일수",
"longestStreak": "최장 연속 일수",
"daysValue": "{{count}}일",
@@ -329,7 +338,7 @@
"requests": "요청",
"estimated": "추정",
"includesEstimates": "추정 포함",
"cellTitle": "{{date}}: {{tokens}} tokens, 요청 {{requests}}회",
"cellTitle": "{{date}}: {{tokens}} 토큰, 요청 {{requests}}회",
"sources": {
"user": "채팅",
"api": "API",
@@ -362,9 +371,19 @@
"selectProvider": "제공자 선택",
"selectAspect": "비율 선택",
"selectSize": "크기 선택",
"selectModel": "이미지 모델 선택",
"searchOrTypeModel": "모델 ID 검색 또는 입력",
"typeModelId": "이 제공자가 지원하는 모델 ID를 입력하세요.",
"configureProvider": "제공자 구성",
"missingCredential": "이미지 생성을 활성화하기 전에 이 제공자를 구성하세요."
},
"capabilities": {
"providerSupport": "제공자 지원",
"providerInstallOnSave": "이 제공자를 저장하면 필요한 지원이 자동으로 설치됩니다.",
"searchSupport": "검색 제공자 지원",
"searchInstallOnSave": "저장하면 Olostep 지원이 자동으로 설치됩니다.",
"installing": "지원 설치 중..."
},
"models": {
"selectModel": "모델 선택",
"addConfiguration": "구성 추가",
@@ -387,7 +406,7 @@
"advancedOptions": "고급 옵션",
"advancedSummary": "컨텍스트 {{context}} · 최대 {{max}} 토큰",
"maxTokens": "최대 출력 토큰",
"temperature": "Temperature",
"temperature": "온도",
"reasoningEffort": "추론 강도",
"convertTitle": "현재 모델 설정 변환",
"convertHelp": "기존 기본 및 대체 모델을 프리셋으로 변환하여 여기서 순서를 관리합니다.",
@@ -477,9 +496,9 @@
"serverUrl": "URL",
"transport": "전송 방식",
"command": "명령",
"args": "Args JSON",
"headers": "Headers JSON",
"env": "Env JSON",
"args": "인자 JSON",
"headers": "헤더 JSON",
"env": "환경 변수 JSON",
"timeout": "도구 제한 시간",
"advancedOptions": "고급 옵션",
"hideAdvanced": "고급 숨기기",
@@ -507,6 +526,7 @@
"statusMissingCredentials": "키 필요",
"statusMissingDependency": "의존성 필요",
"statusComingSoon": "곧 제공",
"comingSoon": "곧 제공",
"statusNotInstalled": "비활성",
"toolScope": "도구",
"allTools": "전체",
@@ -569,6 +589,8 @@
"advanced": "고급",
"checkAndEnable": "확인 후 활성화",
"checkConnection": "연결 확인",
"connectionChecks": "연결 확인",
"open": "열기",
"checkedAndEnabled": "확인 후 활성화했습니다.",
"checking": "확인 중...",
"checkOnly": "확인만",
@@ -664,6 +686,8 @@
"protected": "보호됨",
"editTitle": "자동화 편집",
"save": "저장",
"commandCopied": "복사됨",
"copyCommand": "복사",
"deleteTitle": "자동화 삭제",
"deleteDescription": "{{name}}을 cron 저장소에서 삭제합니다. 이전 채팅 메시지는 세션에 남습니다.",
"cancel": "취소",
@@ -723,6 +747,7 @@
"fields": {
"name": "이름",
"message": "메시지",
"command": "명령",
"scheduleType": "일정 유형",
"every": "간격",
"unit": "단위",
@@ -757,7 +782,7 @@
"signInAgain": "다시 로그인",
"signOut": "로그아웃",
"signedInAs": "{{account}}로 로그인됨",
"signInHelp": "이 기기에서 로그인합니다. API key는 config에 저장되지 않습니다.",
"signInHelp": "이 기기에서 로그인합니다. API 키는 구성에 저장되지 않습니다.",
"remoteSignInHelp": "로그인을 선택하여 사용자 컴퓨터에서 xAI를 연 다음, 로그인 후 표시되는 인증 코드를 붙여 넣으세요.",
"codexRemoteSignInHelp": "이 브라우저에서 로그인한 다음 전체 localhost 콜백 URL을 nanobot에 붙여 넣으세요.",
"signInRequired": "로그인이 필요합니다",
@@ -881,34 +906,34 @@
"actions": "{{title}} 주제 작업",
"newInProject": "{{project}}에서 새 주제 시작",
"activity": {
"running": "Agent running",
"complete": "Agent finished",
"updated": "New activity"
"running": "에이전트 실행 중",
"complete": "에이전트 완료",
"updated": "새 활동"
},
"pin": "Pin",
"unpin": "Unpin",
"rename": "Rename",
"pin": "고정",
"unpin": "고정 해제",
"rename": "이름 변경",
"renameTitle": "주제 이름 변경",
"renameDescription": "이 주제에 사용할 사이드바 이름을 선택하세요.",
"renamePlaceholder": "주제 이름",
"renameProjectTitle": "Rename project",
"renameProjectDescription": "Choose a local sidebar name for this project.",
"renameProjectPlaceholder": "Project name",
"renameSave": "Save",
"archive": "Archive",
"unarchive": "Unarchive",
"showArchived": "Show archived",
"hideArchived": "Hide archived",
"renameProjectTitle": "프로젝트 이름 변경",
"renameProjectDescription": "이 프로젝트에 사용할 사이드바 이름을 선택하세요.",
"renameProjectPlaceholder": "프로젝트 이름",
"renameSave": "저장",
"archive": "보관",
"unarchive": "보관 해제",
"showArchived": "보관된 항목 표시",
"hideArchived": "보관된 항목 숨기기",
"delete": "삭제",
"newChat": "새 주제",
"groups": {
"pinned": "Pinned",
"pinned": "고정됨",
"all": "주제",
"projects": "Projects",
"today": "Today",
"yesterday": "Yesterday",
"earlier": "Earlier",
"archived": "Archived"
"projects": "프로젝트",
"today": "오늘",
"yesterday": "어제",
"earlier": "이전",
"archived": "보관됨"
}
},
"deleteConfirm": {
@@ -1113,7 +1138,7 @@
},
"stop": {
"title": "현재 작업 중지",
"description": "이 채팅에서 실행 중인 agent 턴을 취소합니다."
"description": "이 채팅에서 실행 중인 에이전트 턴을 취소합니다."
},
"restart": {
"title": "nanobot 재시작",
@@ -1121,7 +1146,7 @@
},
"status": {
"title": "상태 보기",
"description": "런타임, provider, channel 상태를 표시합니다."
"description": "런타임, 제공자, 채널 상태를 표시합니다."
},
"model": {
"title": "모델",
@@ -1199,7 +1224,9 @@
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "@{{name}}을 로컬 CLI 앱으로 사용",
"mcpDescription": "@{{name}}을 MCP 서버로 사용"
"mcpDescription": "@{{name}}을 MCP 서버로 사용",
"cliTitle": "CLI 앱: {{name}}",
"mcpTitle": "MCP 서버: {{name}}"
},
"workspace": {
"accessAria": "작업공간 접근 모드",
@@ -1219,7 +1246,8 @@
"title": "프롬프트",
"search": "프롬프트 검색",
"noResults": "일치하는 프롬프트가 없습니다.",
"jumpTo": "프롬프트로 이동: {{label}}"
"jumpTo": "프롬프트로 이동: {{label}}",
"railAria": "사용자 프롬프트 탐색"
}
},
"message": {
@@ -1243,19 +1271,27 @@
"agentActivityLiveSummary": "진행 중… · {{reasoning}}단계 · 도구 호출 {{tools}}회",
"agentActivityLiveToolsOnly": "진행 중… · 도구 호출 {{tools}}회",
"imageAttachment": "이미지 첨부",
"videoAttachment": "동영상 첨부",
"fileAttachment": "파일 첨부",
"attachmentUnavailable": "첨부 파일을 사용할 수 없음",
"dataTable": "데이터 표",
"fileEditPreparing": "파일 편집 준비 중…",
"openLink": "링크 열기: {{label}}",
"openAttachment": "{{name}} 열기",
"skill": "스킬: {{name}}",
"askAboutSelection": "이 내용에 대해 질문하기",
"forkFromHere": "분기",
"copyReply": "복사",
"copiedReply": "복사됨",
"turnLatencyTitle": "응답 시간(엔드투엔드)",
"fileEditViewDiff": "Diff 보기",
"fileEditViewLargeDiff": "큰 diff 보기",
"fileEditViewDiff": "변경 사항 보기",
"fileEditViewLargeDiff": "큰 변경 사항 보기",
"fileEditDiffLineCount": "{{count}}줄",
"fileEditUnchangedLinesHidden": "변경되지 않은 {{count}}줄 숨김",
"fileEditShowMoreLines": "{{count}}줄 더 보기",
"fileEditShowFewerLines": "줄 줄이기",
"fileEditOpenFile": "파일 열기",
"fileEditDiffTruncated": "Diff가 잘렸습니다. 전체 변경은 파일을 열어 확인하세요.",
"fileEditDiffTruncated": "변경 사항이 잘렸습니다. 전체 변경은 파일을 열어 확인하세요.",
"activityThinkingFor": "{{duration}} 동안 생각 중",
"activityThought": "생각함",
"activityThoughtFor": "{{duration}} 동안 생각함",
@@ -1283,6 +1319,7 @@
},
"filePreview": {
"aria": "파일 미리보기",
"breadcrumb": "파일 경로",
"close": "파일 미리보기 닫기",
"loading": "미리보기 로딩 중...",
"failed": "이 파일을 미리 볼 수 없습니다.",
@@ -1297,7 +1334,10 @@
"copied": "복사됨"
},
"common": {
"dismiss": "닫기"
"dismiss": "닫기",
"close": "닫기",
"current": "현재",
"cancel": "취소"
},
"errors": {
"messageTooBig": {
+147 -107
View File
@@ -23,7 +23,7 @@
},
"system": {
"section": "Sistema",
"restartHint": "Reinicie o nanobot para aplicar as alterações de runtime.",
"restartHint": "Reinicie o nanobot para aplicar as alterações de tempo de execução.",
"restart": "Reiniciar nanobot",
"restarting": "Reiniciando nanobot...",
"restartEngine": "Reiniciar motor",
@@ -37,7 +37,16 @@
"chat": "{{title}} · nanobot"
},
"meta": {
"description": "Interface web do nanobot — converse com o seu workspace do nanobot."
"description": "Interface web do nanobot — converse com o seu espaço de trabalho do nanobot."
},
"pairing": {
"title": "Vincular usuário do chat",
"description": "Digite o código de vinculação exibido no chat.",
"code": "Código de vinculação",
"matched": "Correspondência com {{channel}}. Conectando...",
"expiresInline": "O código expira {{expires}}.",
"queueCount": "{{count}} pendentes",
"noMatch": "Nenhuma solicitação pendente corresponde a este código."
}
},
"sidebar": {
@@ -54,10 +63,10 @@
"label": "Idioma",
"ariaLabel": "Trocar idioma"
},
"apps": "Apps",
"apps": "Aplicativos",
"automations": "Automações",
"skills": {
"title": "Skills"
"title": "Habilidades"
}
},
"settings": {
@@ -77,13 +86,13 @@
"voice": "Voz",
"browser": "Web",
"channels": "Canais",
"cliApps": "Apps CLI",
"cliApps": "Aplicativos CLI",
"mcp": "MCP",
"runtime": "Sistema",
"advanced": "Segurança",
"apps": "Aplicativos",
"automations": "Automações",
"skills": "Skills"
"skills": "Habilidades"
},
"sections": {
"interface": "Interface do usuário",
@@ -97,9 +106,9 @@
"imageDefaults": "Padrões",
"webSearch": "Busca na web",
"webBehavior": "Comportamento",
"cliApps": "Apps CLI",
"cliApps": "Aplicativos CLI",
"mcp": "Servidores MCP",
"identity": "Identidade",
"regional": "Regional",
"webuiSafety": "Segurança da WebUI",
"capabilities": "Capacidades",
"apps": "Aplicativos",
@@ -190,10 +199,8 @@
"defaultImageSize": "Tamanho padrão",
"maxImagesPerTurn": "Máx. de imagens por turno",
"imageSaveDir": "Diretório de salvamento",
"botName": "Nome do bot",
"botIcon": "Ícone do bot",
"timezone": "Fuso horário",
"workspacePath": "Workspace padrão",
"workspacePath": "Espaço de trabalho padrão",
"localServiceAccess": "Serviços locais",
"webuiDefaultAccess": "Acesso padrão",
"cliAppsCatalog": "Catálogo",
@@ -219,10 +226,10 @@
"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 Default para editar modelo e provedor pela WebUI.",
"presetModel": "Mude para Padrão para editar o modelo e o provedor pela WebUI.",
"density": "Armazenado apenas neste navegador.",
"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 diff.",
"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.",
"maxResults": "Resultados retornados por cada chamada de web_search.",
@@ -230,22 +237,20 @@
"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.",
"imageProviderStatus": "A geração de imagens reaproveita as credenciais de Provedores.",
"imageProviderStatus": "A geração de imagens reaproveita as credenciais dos provedores.",
"imageModel": "Nome do modelo enviado ao provedor de imagem selecionado.",
"defaultAspectRatio": "Usado quando o prompt não escolhe uma proporção.",
"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.",
"botName": "Exibido sempre que o nanobot usa um nome visível.",
"botIcon": "Emoji ou texto curto exibido junto ao nome do bot.",
"timezone": "Usado para agendamentos e respostas sensíveis ao horário.",
"cliAppsCatalog": "Instale apenas os adaptadores CLI de apps que o nanobot pode executar localmente; apps nativos permanecem intactos.",
"cliAppsFilter": "Busque por app, categoria ou capacidade.",
"localServiceAccess": "Permite que comandos shell com Acesso Total alcancem serviços localhost.",
"cliAppsCatalog": "Instale apenas os adaptadores CLI de aplicativos que o nanobot pode executar localmente; aplicativos nativos permanecem intactos.",
"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 runtime para o suporte.",
"localServiceAccessNative": "Permite que comandos shell com Acesso Total alcancem serviços neste Mac.",
"diagnostics": "Exporta um pequeno relatório de tempo de execução para o 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.",
"transcription": "Transcreve a entrada do microfone antes de enviá-la. Mensagens de voz dos canais de chat usam as mesmas configurações.",
@@ -261,25 +266,25 @@
},
"cliApps": {
"allCategories": "Todas as categorias",
"availableCount": "{{count}} apps",
"availableCount": "{{count}} aplicativos",
"installedCount": "{{count}} CLIs instaladas",
"summary": "{{installed}} de {{total}} CLIs instaladas",
"filterAll": "Todos",
"filterInstalled": "CLIs instaladas",
"filterNotInstalled": "Não instaladas",
"searchPlaceholder": "Buscar CLIs",
"loading": "Carregando Apps CLI...",
"empty": "Nenhum App CLI corresponde a este filtro.",
"statusInstalled": "App pronto",
"loading": "Carregando aplicativos CLI...",
"empty": "Nenhum aplicativo CLI corresponde a este filtro.",
"statusInstalled": "Aplicativo pronto",
"statusMissing": "Faltando",
"statusAvailable": "Disponível",
"statusUnsupported": "Não compatível",
"statusNotInstalled": "App não instalado",
"statusNotInstalled": "Aplicativo não instalado",
"requires": "Requer",
"test": "Testar app",
"update": "Atualizar app",
"uninstall": "Desinstalar app",
"install": "Instalar app",
"test": "Testar aplicativo",
"update": "Atualizar aplicativo",
"uninstall": "Desinstalar aplicativo",
"install": "Instalar aplicativo",
"readyTitle": "@{{name}} está pronto",
"readyStatus": "Pronto",
"readyTry": "Experimentar @{{name}}",
@@ -314,9 +319,9 @@
"serverUrl": "URL",
"transport": "Transporte",
"command": "Comando",
"args": "Args JSON",
"headers": "Headers JSON",
"env": "Env JSON",
"args": "Argumentos JSON",
"headers": "Cabeçalhos JSON",
"env": "Ambiente JSON",
"timeout": "Tempo limite da ferramenta",
"advancedOptions": "Opções avançadas",
"hideAdvanced": "Ocultar avançado",
@@ -344,6 +349,7 @@
"statusMissingCredentials": "Precisa de chave",
"statusMissingDependency": "Precisa de dependência",
"statusComingSoon": "Em breve",
"comingSoon": "Em breve",
"statusNotInstalled": "Não habilitado",
"toolScope": "Ferramentas",
"allTools": "Todas",
@@ -360,15 +366,15 @@
"ready": "Pronto",
"privateEngine": "Motor privado",
"unixSocket": "Socket Unix",
"defaultWorkspace": "Workspace padrão",
"defaultWorkspace": "Espaço de trabalho padrão",
"comfortable": "Confortável",
"compact": "Compacto",
"auto": "Automático",
"expanded": "Expandido",
"default": "Padrão",
"summary": "Resumo",
"diff": "Diff",
"collapsedDiff": "Diff recolhido",
"diff": "Diferenças",
"collapsedDiff": "Diferenças recolhidas",
"on": "Ligado",
"off": "Desligado",
"defaultPermission": "Permissão padrão",
@@ -376,7 +382,10 @@
"configured": "Configurado",
"notConfigured": "Não configurado",
"pending": "Pendente",
"restartingEngine": "Reiniciando"
"restartingEngine": "Reiniciando",
"checking": "Verificando",
"running": "Em execução",
"needsSetup": "Requer configuração"
},
"status": {
"loading": "Carregando configurações...",
@@ -404,6 +413,7 @@
"deleting": "Excluindo...",
"edit": "Editar",
"cancel": "Cancelar",
"dismiss": "Dispensar",
"open": "Abrir",
"export": "Exportar",
"opening": "Abrindo...",
@@ -459,7 +469,7 @@
"webSearch": "Busca na web",
"imageGeneration": "Geração de imagens",
"voiceInput": "Entrada de voz",
"workspace": "Workspace"
"workspace": "Espaço de trabalho"
},
"usage": {
"title": "Atividade de tokens",
@@ -513,9 +523,19 @@
"selectProvider": "Selecionar provedor",
"selectAspect": "Selecionar proporção",
"selectSize": "Selecionar tamanho",
"selectModel": "Selecionar modelo de imagem",
"searchOrTypeModel": "Pesquisar ou digitar ID do modelo",
"typeModelId": "Digite o ID de modelo compatível com este provedor.",
"configureProvider": "Configurar provedor",
"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..."
},
"api": {
"title": "Servidor de API",
"openaiCompatible": "API compatível com OpenAI",
@@ -545,29 +565,29 @@
},
"apps": {
"description": "Adicione ferramentas ao nanobot e mencione-as com @ na conversa.",
"cliLabel": "App",
"cliLabel": "Aplicativo",
"mcpLabel": "Integração",
"channelLabel": "Canal",
"featureLabel": "Recurso",
"filterAll": "Prontos",
"filterPlugins": "Complementos",
"filterCli": "Apps",
"filterCli": "Aplicativos",
"filterMcp": "Integrações",
"enabledSummary": "{{count}} prontos",
"caption": "{{cli}} apps · {{mcp}} integrações",
"caption": "{{cli}} aplicativos · {{mcp}} integrações",
"searchPlaceholder": "Buscar ferramentas",
"featured": "Ferramentas",
"loading": "Carregando Apps...",
"loading": "Carregando aplicativos...",
"empty": "Nenhuma ferramenta corresponde a esta visualização.",
"restartRequired": "Reinicie o nanobot para aplicar os apps e integrações atualizados."
"restartRequired": "Reinicie o nanobot para aplicar os aplicativos e integrações atualizados."
},
"channels": {
"description": "Conecte apps de chat, e-mail e WebUI ao nanobot.",
"description": "Conecte aplicativos de chat, e-mail e WebUI ao nanobot.",
"caption": "{{enabled}} habilitados · {{total}} canais",
"searchPlaceholder": "Buscar canais",
"backToChannels": "Todos os canais",
"catalog": "Canais",
"loading": "Carregando Canais...",
"loading": "Carregando canais...",
"empty": "Nenhum canal corresponde a este filtro.",
"restartRequired": "Reinicie o nanobot para aplicar o suporte de canais atualizado.",
"requires": "Requer: {{requirements}}",
@@ -583,6 +603,8 @@
"advanced": "Avançado",
"checkAndEnable": "Verificar e ativar",
"checkConnection": "Verificar conexão",
"connectionChecks": "Verificações de conexão",
"open": "Abrir",
"checkedAndEnabled": "Verificado e ativado.",
"checking": "Verificando...",
"checkOnly": "Apenas verificar",
@@ -678,6 +700,8 @@
"protected": "Protegida",
"editTitle": "Editar automação",
"save": "Salvar",
"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.",
"cancel": "Cancelar",
@@ -737,6 +761,7 @@
"fields": {
"name": "Nome",
"message": "Mensagem",
"command": "Comando",
"scheduleType": "Tipo de agendamento",
"every": "A cada",
"unit": "Unidade",
@@ -794,56 +819,56 @@
"finishSignIn": "Concluir login"
},
"skills": {
"description": "Revise as skills de instrução que este agente pode carregar durante uma conversa.",
"description": "Revise as habilidades de instrução que este agente pode carregar durante uma conversa.",
"caption": "{{available}} disponíveis · {{total}} no total",
"views": "Visualizações de skills",
"views": "Visualizações de habilidades",
"installedTab": "Instaladas",
"discoverTab": "Descobrir",
"customGroup": "Personalizadas",
"builtinGroup": "Integradas",
"otherGroup": "Outras",
"searchInstalled": "Buscar skills instaladas",
"searchInstalled": "Buscar habilidades instaladas",
"filterAll": "Todas",
"filterEnabled": "Ativadas",
"filterDisabled": "Desativadas",
"noMatching": "Nenhuma skill correspondente.",
"noMatching": "Nenhuma habilidade correspondente.",
"statusDisabled": "Desativada",
"statusEnabled": "Ativada",
"statusNeedsSetup": "Requer configuração",
"showLess": "Mostrar menos",
"showMore": "Mostrar mais",
"enabledControl": "Usar esta skill",
"enabledDescription": "Permite que o agente carregue esta skill quando os requisitos estiverem prontos.",
"enabledControl": "Usar esta habilidade",
"enabledDescription": "Permite que o agente carregue esta habilidade quando os requisitos estiverem prontos.",
"enableSkill": "Ativar {{name}}",
"disableSkill": "Desativar {{name}}",
"updateFailed": "Não foi possível atualizar esta skill.",
"deleteTitle": "Excluir skill",
"deleteDescription": "Remove esta skill do workspace atual.",
"updateFailed": "Não foi possível atualizar esta habilidade.",
"deleteTitle": "Excluir habilidade",
"deleteDescription": "Remove esta habilidade do espaço de trabalho atual.",
"deleteAction": "Excluir",
"deleteFailed": "Não foi possível excluir esta skill.",
"deleteFailed": "Não foi possível excluir esta habilidade.",
"deleteConfirmTitle": "Excluir {{name}}?",
"deleteConfirmDescription": "Isso remove os arquivos da skill do workspace atual. Esta ação não pode ser desfeita.",
"deleteConfirmAction": "Excluir skill",
"instructionsTitle": "Instruções da skill",
"deleteConfirmDescription": "Isso remove os arquivos da habilidade do espaço de trabalho atual. Esta ação não pode ser desfeita.",
"deleteConfirmAction": "Excluir habilidade",
"instructionsTitle": "Instruções da habilidade",
"setupRequired": "Requer configuração",
"setupDescription": "Instale a dependência ausente na máquina que executa o nanobot e verifique novamente.",
"copySetupCommand": "Copiar comando de configuração",
"checkAgain": "Verificar novamente",
"marketplaceSearchFailed": "Não foi possível pesquisar nos mercados de skills.",
"marketplaceInstallFailed": "Não foi possível instalar esta skill.",
"marketplaceSearchPlaceholder": "Pesquisar skills",
"marketplaceSearchLabel": "Pesquisar skills",
"marketplaceSearchFailed": "Não foi possível pesquisar nos mercados de habilidades.",
"marketplaceInstallFailed": "Não foi possível instalar esta habilidade.",
"marketplaceSearchPlaceholder": "Pesquisar habilidades",
"marketplaceSearchLabel": "Pesquisar habilidades",
"marketplaceSearching": "Pesquisando",
"marketplaceProviderFilter": "Origem da skill",
"marketplaceProviderFilter": "Origem da habilidade",
"marketplaceProviderAll": "Todas",
"marketplaceTrendingTitle": "Tendências por mercado",
"marketplaceTrendingDescription": "Cada mercado mantém seu próprio ranking e métricas de instalação.",
"marketplaceViewAll": "Ver todas",
"marketplaceTrendingUnavailable": "As skills em alta estão temporariamente indisponíveis.",
"marketplaceEmpty": "Nenhuma skill encontrada para “{{query}}”.",
"marketplaceTrendingUnavailable": "As habilidades em alta estão temporariamente indisponíveis.",
"marketplaceEmpty": "Nenhuma habilidade encontrada para “{{query}}”.",
"marketplaceConfirmTitle": "Instalar {{name}}?",
"marketplaceConfirmDescription": "Esta skill de terceiros vem de {{provider}} ({{source}}) e pode incluir instruções ou scripts executáveis.",
"marketplaceConfirmInstall": "Instalar skill",
"marketplaceConfirmDescription": "Esta habilidade de terceiros vem de {{provider}} ({{source}}) e pode incluir instruções ou scripts executáveis.",
"marketplaceConfirmInstall": "Instalar habilidade",
"marketplaceOpen": "Abrir {{name}} no {{provider}}",
"marketplaceOpenProvider": "Abrir {{provider}}",
"marketplaceInstalls24h": "{{formattedCount}} instalações / 24 h",
@@ -854,16 +879,16 @@
"marketplaceInstall": "Instalar",
"marketplaceNoTrend": "Ainda sem tendência",
"marketplaceTrendLabel": "Tendência de instalações em 8 semanas",
"featured": "Skills do agente",
"empty": "Nenhuma skill disponível.",
"featured": "Habilidades do agente",
"empty": "Nenhuma habilidade disponível.",
"sourceWorkspace": "Personalizada",
"sourceBuiltin": "Embutida",
"statusAvailable": "Disponível",
"statusUnavailable": "Indisponível",
"unavailableReason": "Faltando: {{reason}}",
"openDetails": "Abrir detalhes de {{name}}",
"loadingDetail": "Carregando detalhes da skill...",
"loadFailed": "Não foi possível carregar os detalhes da skill.",
"loadingDetail": "Carregando detalhes da habilidade...",
"loadFailed": "Não foi possível carregar os detalhes da habilidade.",
"descriptionTitle": "Descrição",
"source": "Origem",
"status": "Status",
@@ -881,12 +906,12 @@
"voice": {
"selectProvider": "Selecionar provedor",
"configureProvider": "Configurar provedor",
"languageAuto": "Auto"
"languageAuto": "Automático"
}
},
"chat": {
"fallbackTitle": "Tópico {{id}}",
"forkTitle": "Fork: {{title}}",
"forkTitle": "Bifurcação: {{title}}",
"loading": "Carregando…",
"noSessions": "Nenhuma sessão ainda.",
"showMore": "Mostrar mais {{count}}",
@@ -976,7 +1001,7 @@
},
"brainstorm": {
"title": "Fazer um brainstorming",
"prompt": "Sugira algumas ideias práticas e tradeoffs para este problema."
"prompt": "Sugira algumas ideias práticas e seus compromissos para este problema."
},
"code": {
"title": "Escrever código",
@@ -988,25 +1013,25 @@
},
"more": {
"title": "Mais",
"prompt": "Mostre-me algumas formas úteis com as quais você pode ajudar neste workspace."
"prompt": "Mostre-me algumas formas úteis com as quais você pode ajudar neste espaço de trabalho."
}
},
"imageQuickActions": {
"icon": {
"title": "Desenhar um ícone de app",
"prompt": "Gere um ícone de app 1:1 limpo para o nanobot: robô amigável, estilo vetorial simples, paleta suave em azul e branco, sem texto."
"title": "Desenhar um ícone de aplicativo",
"prompt": "Gere um ícone de aplicativo 1:1 limpo para o nanobot: robô amigável, estilo vetorial simples, paleta suave em azul e branco, sem texto."
},
"sticker": {
"title": "Criar um sticker",
"prompt": "Gere uma imagem estilo sticker de um pequeno assistente robô, com fundo de aparência transparente, expressivo e divertido."
"prompt": "Gere uma imagem estilo adesivo de um pequeno assistente robô, com fundo de aparência transparente, expressivo e divertido."
},
"poster": {
"title": "Criar um pôster",
"prompt": "Gere um conceito de pôster polido para um assistente pessoal de IA, composição moderna, hierarquia visual forte, adequado para uma landing page."
"prompt": "Gere um conceito de pôster polido para um assistente pessoal de IA, composição moderna, hierarquia visual forte, adequado para uma página de destino."
},
"product": {
"title": "Mockup de produto",
"prompt": "Gere uma imagem limpa de mockup de produto para um app web de IA conversacional, interface mínima, iluminação premium, moldura de dispositivo realista."
"title": "Maquete de produto",
"prompt": "Gere uma imagem limpa de maquete de produto para um aplicativo web de IA conversacional, interface mínima, iluminação premium, moldura de dispositivo realista."
},
"portrait": {
"title": "Retrato estilizado",
@@ -1145,7 +1170,7 @@
},
"status": {
"title": "Mostrar status",
"description": "Exibe o status de runtime, provedor e canais."
"description": "Exibe o status de tempo de execução, provedor e canais."
},
"model": {
"title": "Modelo",
@@ -1169,7 +1194,7 @@
},
"dream_prompt": {
"title": "Memória do Dream",
"description": "Diz ao Dream como organizar a memória deste workspace."
"description": "Diz ao Dream como organizar a memória deste espaço de trabalho."
},
"goal": {
"title": "Objetivo de longa duração",
@@ -1190,18 +1215,20 @@
}
},
"mentions": {
"ariaLabel": "Apps",
"label": "Apps",
"cliGroup": "Apps CLI",
"ariaLabel": "Aplicativos",
"label": "Aplicativos",
"cliGroup": "Aplicativos CLI",
"mcpGroup": "Serviços MCP",
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "Usar @{{name}} como app CLI local",
"mcpDescription": "Usar @{{name}} como servidor MCP"
"cliDescription": "Usar @{{name}} como aplicativo CLI local",
"mcpDescription": "Usar @{{name}} como servidor MCP",
"cliTitle": "Aplicativo CLI: {{name}}",
"mcpTitle": "Servidor MCP: {{name}}"
},
"encoding": "Codificando…",
"remove": "Remover anexo",
"normalizedSizeHint": "{{orig}} → {{current}} (auto)",
"normalizedSizeHint": "{{orig}} → {{current}} (automático)",
"textTooLarge": "O texto da mensagem é grande demais (máximo de {{max}})",
"imageRejected": {
"unsupported_type": "Tipo de arquivo não compatível",
@@ -1216,7 +1243,7 @@
"io": "Não foi possível ler este arquivo"
},
"workspace": {
"accessAria": "Modo de acesso ao workspace",
"accessAria": "Modo de acesso ao espaço de trabalho",
"projectAria": "Escolher projeto",
"projectPlaceholder": "Selecionar projeto",
"default": "Permissão padrão",
@@ -1227,13 +1254,14 @@
},
"scrollToBottom": "Rolar para o final",
"loadEarlier": "Carregar mensagens anteriores",
"forkedFromHistory": "Fork a partir do histórico",
"forkedFromHistory": "Bifurcado a partir do histórico",
"promptNavigator": {
"open": "Abrir navegador de prompts",
"title": "Prompts",
"search": "Buscar prompts",
"noResults": "Nenhum prompt correspondente.",
"jumpTo": "Ir para o prompt: {{label}}"
"open": "Abrir navegador de instruções",
"title": "Instruções",
"search": "Buscar instruções",
"noResults": "Nenhuma instrução correspondente.",
"jumpTo": "Ir para a instrução: {{label}}",
"railAria": "Navegação pelas instruções do usuário"
}
},
"message": {
@@ -1265,13 +1293,21 @@
"cliActivityRunningOne": "Usando {{name}}",
"cliActivityRanOne": "Usou {{name}}",
"cliActivityFailedOne": "Falhou em {{name}}",
"cliActivityRunningMany": "Usando {{count}} apps CLI",
"cliActivityRanMany": "Usou {{count}} apps CLI",
"cliActivityFailedMany": "{{count}} apps CLI falharam",
"cliActivityRunningMany": "Usando {{count}} aplicativos CLI",
"cliActivityRanMany": "Usou {{count}} aplicativos CLI",
"cliActivityFailedMany": "{{count}} aplicativos CLI falharam",
"cliRunRunning": "Usando",
"cliRunRan": "Usou",
"cliRunFailed": "Falhou",
"imageAttachment": "Anexo de imagem",
"videoAttachment": "Anexo de vídeo",
"fileAttachment": "Anexo de arquivo",
"attachmentUnavailable": "Anexo indisponível",
"dataTable": "Tabela de dados",
"fileEditPreparing": "Preparando a edição do arquivo…",
"openLink": "Abrir link: {{label}}",
"openAttachment": "Abrir {{name}}",
"skill": "Habilidade: {{name}}",
"automationSourceFallback": "Automação",
"automationTriggered": "Acionada automaticamente",
"askAboutSelection": "Perguntar sobre isto",
@@ -1279,14 +1315,14 @@
"copyReply": "Copiar",
"copiedReply": "Copiado",
"turnLatencyTitle": "Tempo de resposta (ponta a ponta)",
"fileEditViewDiff": "Ver diff",
"fileEditViewLargeDiff": "Ver diff grande",
"fileEditViewDiff": "Ver diferenças",
"fileEditViewLargeDiff": "Ver diferenças grandes",
"fileEditDiffLineCount": "{{count}} linhas",
"fileEditUnchangedLinesHidden": "{{count}} linhas inalteradas ocultas",
"fileEditShowMoreLines": "Mostrar mais {{count}} linhas",
"fileEditShowFewerLines": "Mostrar menos linhas",
"fileEditOpenFile": "Abrir arquivo",
"fileEditDiffTruncated": "Diff truncado. Abra o arquivo para ver a alteração completa."
"fileEditDiffTruncated": "Diferenças truncadas. Abra o arquivo para ver a alteração completa."
},
"lightbox": {
"title": "Pré-visualização de imagem",
@@ -1297,6 +1333,7 @@
},
"filePreview": {
"aria": "Pré-visualização de arquivo",
"breadcrumb": "Caminho do arquivo",
"close": "Fechar pré-visualização de arquivo",
"loading": "Carregando pré-visualização...",
"failed": "Não foi possível pré-visualizar este arquivo.",
@@ -1311,7 +1348,10 @@
"copied": "Copiado"
},
"common": {
"dismiss": "Descartar"
"dismiss": "Descartar",
"close": "Fechar",
"current": "Atual",
"cancel": "Cancelar"
},
"errors": {
"messageTooBig": {
@@ -1319,8 +1359,8 @@
"body": "O servidor rejeitou sua última mensagem porque ela excedeu o limite de tamanho. Remova algumas imagens ou tente arquivos menores e envie novamente."
},
"workspaceScopeRejected": {
"title": "O workspace não foi alterado",
"body": "O nanobot manteve o workspace anterior porque o projeto ou modo de acesso solicitado foi rejeitado pelo gateway."
"title": "O espaço de trabalho não foi alterado",
"body": "O nanobot manteve o espaço de trabalho anterior porque o projeto ou modo de acesso solicitado foi rejeitado pelo gateway."
},
"turnRejected": {
"title": "A mensagem não foi enviada",
@@ -1329,7 +1369,7 @@
},
"workspace": {
"dialog": {
"defaultProject": "Workspace padrão",
"defaultProject": "Espaço de trabalho padrão",
"manual": "Colar caminho",
"manualPlaceholder": "/Users/nome/projeto",
"usePath": "Usar caminho",
+208 -168
View File
@@ -23,11 +23,11 @@
},
"system": {
"section": "Hệ thống",
"restartHint": "Khởi động lại nanobot để áp dụng thay đổi runtime.",
"restartHint": "Khởi động lại nanobot để áp dụng thay đổi thời gian chạy.",
"restart": "Khởi động lại nanobot",
"restarting": "Đang khởi động lại...",
"restartEngine": "Khởi động lại engine",
"restartingEngine": "Đang khởi động lại engine..."
"restartEngine": "Khởi động lại bộ máy",
"restartingEngine": "Đang khởi động lại bộ máy..."
},
"restart": {
"completed": "Khởi động lại hoàn tất sau {{seconds}} giây."
@@ -37,7 +37,16 @@
"chat": "{{title}} · nanobot"
},
"meta": {
"description": "Giao diện web nanobot — trò chuyện với workspace nanobot của bạn."
"description": "Giao diện web nanobot — trò chuyện với không gian làm việc nanobot của bạn."
},
"pairing": {
"title": "Liên kết người dùng chat",
"description": "Nhập mã liên kết hiển thị trong cuộc trò chuyện.",
"code": "Mã liên kết",
"matched": "Đã khớp với {{channel}}. Đang kết nối...",
"expiresInline": "Mã hết hạn {{expires}}.",
"queueCount": "{{count}} đang chờ",
"noMatch": "Không có yêu cầu đang chờ nào khớp với mã này."
}
},
"sidebar": {
@@ -92,20 +101,20 @@
"about": "Giới thiệu",
"status": "Trạng thái",
"localPreferences": "Tùy chọn cục bộ",
"presets": "Preset",
"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",
"identity": "Danh tính",
"regional": "Khu vực",
"webuiSafety": "An toàn WebUI",
"capabilities": "Khả năng",
"cliApps": "Ứng dụng CLI",
"mcp": "Dịch vụ MCP",
"apps": "Ứng dụng",
"nativeHost": "Host gốc",
"nativeHost": "Máy chủ gốc",
"hostSafety": "An toàn ứng dụng",
"voiceInput": "Nhap giong noi"
"voiceInput": "Nhp bằng ging nói"
},
"rows": {
"theme": "Chủ đề",
@@ -114,12 +123,12 @@
"model": "Mô hình",
"restart": "Khởi động lại nanobot",
"configPath": "Đường dẫn cấu hình",
"activePreset": "Preset đang dùng",
"activePreset": "Cấu hình đặt trước đang dùng",
"gateway": "Cổng",
"restartState": "Trạng thái khởi động lại",
"pendingChanges": "Thay đổi chờ áp dụng",
"selectedPreset": "Preset đã chọn",
"presetModel": "Mô hình preset",
"selectedPreset": "Cấu hình đặt trước đã chọn",
"presetModel": "Mô hình cấu hình đặt trước",
"density": "Mật độ",
"activityMode": "Chi tiết hoạt động",
"fileEditDisplay": "Hiển thị sửa tệp",
@@ -136,10 +145,8 @@
"defaultImageSize": "Kích thước mặc định",
"maxImagesPerTurn": "Ảnh tối đa mỗi lượt",
"imageSaveDir": "Thư mục lưu",
"botName": "Tên bot",
"botIcon": "Biểu tượng bot",
"timezone": "Múi giờ",
"workspacePath": "Workspace mặc định",
"workspacePath": "Không gian làm việc mặc định",
"localServiceAccess": "Dịch vụ cục bộ",
"webuiDefaultAccess": "Quyền mặc định",
"currentModel": "Cấu hình hiện tại",
@@ -150,57 +157,55 @@
"logs": "Nhật ký",
"diagnostics": "Chẩn đoán",
"contextWindow": "Cửa sổ ngữ cảnh",
"transcription": "Phien am",
"transcriptionProvider": "Nha cung cap",
"transcriptionProviderStatus": "Trang thai nha cung cap",
"transcriptionModel": "Mo hinh",
"transcriptionLanguage": "Ngon ngu",
"voiceLimits": "Gioi han"
"transcription": "Chuyển giọng nói thành văn bản",
"transcriptionProvider": "Nhà cung cấp chuyển giọng nói",
"transcriptionProviderStatus": "Trng thái nhà cung cấp chuyển giọng nói",
"transcriptionModel": "Mô hình chuyển giọng nói",
"transcriptionLanguage": "Ngôn ng",
"voiceLimits": "Gii hn"
},
"help": {
"theme": "Chuyển giữa giao diện sáng và tối.",
"language": "Chọn ngôn ngữ dùng trong WebUI.",
"provider": "Selecciona el proveedor para nuevas solicitudes de modelo.",
"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": "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": "Chuyển sang Default để chỉnh sửa mô hình và nhà cung cấp t WebUI.",
"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.",
"activityMode": "Chọn mức chi tiết hoạt động agent hiển thị mặc định.",
"fileEditDisplay": "Chọn hoạt động sửa tệp hiển thị số dòng hay diff.",
"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.",
"codeWrap": "Giữ các dòng mã dài dễ đọc trên màn hình nhỏ.",
"maxResults": "Resultados devueltos por cada llamada web_search.",
"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.",
"imageProviderStatus": "La generación de imágenes reutiliza credenciales de Proveedores.",
"imageModel": "Nombre del modelo enviado al proveedor de imágenes seleccionado.",
"defaultAspectRatio": "Se usa cuando el prompt no elige una proporción.",
"maxResults": "Số kết quả được trả về sau mỗi lần gọi web_search.",
"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.",
"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.",
"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.",
"botName": "Se muestra donde nanobot usa un nombre visible.",
"botIcon": "Emoji o texto corto junto al nombre del bot.",
"timezone": "Se usa para horarios y respuestas con conciencia temporal.",
"localServiceAccess": "Cho phép lệnh shell Full Access truy cập dịch vụ localhost.",
"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": "Las capturas web siempre protegen servicios locales, privados y metadata. La seguridad de canales core se gestiona en config.json.",
"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ý.",
"currentModel": "Dùng cho các phản hồi mới.",
"selectedModelProvider": "Definido por el modelo seleccionado.",
"selectedModelValue": "Definido por el modelo seleccionado.",
"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.",
"cliAppsCatalog": "Instala solo adaptadores CLI de apps que nanobot puede ejecutar localmente; las apps nativas no se modifican.",
"cliAppsFilter": "Busca por app, categoría o capacidad.",
"logs": "Abre la carpeta de registros del motor nativo.",
"diagnostics": "Exporta un pequeño informe de runtime para soporte.",
"localServiceAccessNative": "Permite que comandos shell con Full Access alcancen servicios en este Mac.",
"webuiDefaultAccessNative": "Usado por chats nativos sin permiso específico de proyecto.",
"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.",
"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ợ.",
"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.",
"transcription": "Phien am dau vao micro truoc khi gui. Tin nhan giong noi tu kenh chat dung cung cai dat.",
"transcriptionProvider": "Dung thong tin xac thuc cua nha cung cap tu Providers.",
"transcriptionProviderStatus": "API key nam trong providers, khong nam trong cai dat transcription.",
"transcriptionModel": "Giu mac dinh da resolve tru khi nha cung cap can id model tuy chinh.",
"transcriptionLanguage": "Goi y ISO-639 tuy chon, nhu en, zh, ja hoac ko."
"transcription": "Chuyển giọng nói từ micrô thành văn bản trước khi gi. Tin nhn 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 thc ca nhà cung cp tương ứng trong mục Nhà cung cấp.",
"transcriptionProviderStatus": "Khóa API nm trong mục nhà cung cấp, không nm 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 cp yêu cầu ID mô hình tùy chnh.",
"transcriptionLanguage": "Gi ý ISO-639 tùy chn, chẳng hạn en, zh, ja hoc ko."
},
"values": {
"light": "Sáng",
@@ -212,15 +217,15 @@
"ready": "Sẵn sàng",
"privateEngine": "Bộ máy riêng",
"unixSocket": "Socket Unix",
"defaultWorkspace": "Workspace mặc định",
"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": "Diff",
"collapsedDiff": "Diff thu gọn",
"diff": "Khác biệt",
"collapsedDiff": "Khác biệt đã thu gọn",
"on": "Bật",
"off": "Tắt",
"defaultPermission": "Quyền mặc định",
@@ -228,24 +233,27 @@
"configured": "Đã cấu hình",
"notConfigured": "Chưa cấu hình",
"pending": "Đang chờ",
"restartingEngine": "Đang khởi động lại"
"restartingEngine": "Đang khởi động lại",
"checking": "Đang kiểm tra",
"running": "Đang chạy",
"needsSetup": "Cần thiết lập"
},
"status": {
"loading": "Đang tải cài đặt...",
"loadError": "Không thể tải cài đặt",
"unsaved": "Có thay đổi chưa lưu.",
"upToDate": "Đã cập nhật.",
"savedRestart": "Guardado. Reinicia nanobot para aplicar.",
"restartAfterSaving": "Guarda los cambios y reinicia cuando puedas.",
"savedRestartApply": "Guardado. Reinicia cuando puedas.",
"imageProviderRestart": "Cambios del proveedor de imagen guardados. Reinicia cuando puedas.",
"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.",
"logsOpened": "Carpeta de registros abierta.",
"logsOpenFailed": "No se pudo abrir la carpeta de registros.",
"diagnosticsExported": "Diagnóstico exportado a {{path}}.",
"diagnosticsExportFailed": "No se pudo exportar el diagnóstico."
"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.",
"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.",
"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}}.",
"diagnosticsExportFailed": "Không thể xuất chẩn đoán."
},
"actions": {
"save": "Lưu",
@@ -256,30 +264,31 @@
"deleting": "Đang xóa...",
"edit": "Sửa",
"cancel": "Hủy",
"dismiss": "Bỏ qua",
"open": "Mở",
"export": "Xuất",
"opening": "Đang mở...",
"exporting": "Đang xuất..."
},
"byok": {
"description": "Dùng key provider của riêng bạn. Nanobot đọc các giá trị này từ config hiện tại và chỉ provider đã cấu hình mới có thể dùng trong cấu hình mô hình đặt trước.",
"description": "Dùng khóa nhà cung cấp của riêng bạn. Nanobot đọc các giá trị này từ cấu hình hiện tại và chỉ nhà cung cấp đã cấu hình mới có thể dùng trong cấu hình mô hình đặt trước.",
"configured": "Đã cấu hình",
"notConfigured": "Chưa cấu hình",
"configuredSection": "Đã cấu hình",
"notConfiguredSection": "Chưa cấu hình",
"showMore": "Hiển thị thêm {{count}}",
"showLess": "Thu gọn",
"apiKey": "API key",
"apiBase": "API base",
"apiKeyPlaceholder": "Nhập API key",
"apiKeyConfiguredPlaceholder": "Để trống để giữ key hiện tại",
"configuredKeyHint": "Key đã cấu hình",
"apiBasePlaceholder": "Dùng mặc định của provider",
"apiKeyRequired": "Cần API key để cấu hình provider này.",
"showApiKey": "Hiển thị API key",
"hideApiKey": "Ẩn API key",
"noConfiguredProviders": "Chưa có provider đã cấu hình",
"configureFirst": "Hãy cấu hình provider trong BYOK trước.",
"apiKey": "Khóa API",
"apiBase": "Cơ sở API",
"apiKeyPlaceholder": "Nhập khóa API",
"apiKeyConfiguredPlaceholder": "Để trống để giữ khóa hiện tại",
"configuredKeyHint": "Khóa đã cấu hình",
"apiBasePlaceholder": "Dùng giá trị mặc định của nhà cung cấp",
"apiKeyRequired": "Cần khóa API để cấu hình nhà cung cấp này.",
"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",
"tabs": {
"ariaLabel": "Loại thông tin xác thực BYOK",
@@ -288,19 +297,19 @@
},
"webSearch": {
"provider": "Nhà cung cấp tìm kiếm",
"providerHelp": "Chọn backend mà công cụ web search sẽ dùng.",
"selectProvider": "Chọn provider",
"providerHelp": "Chọn hệ thống phụ trợ mà công cụ tìm kiếm web sẽ dùng.",
"selectProvider": "Chọn nhà cung cấp",
"credentials": "Thông tin xác thực",
"noCredentialRequired": "Không cần key",
"noCredentialHelp": "DuckDuckGo hoạt động mà không cần lưu API key.",
"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.",
"baseUrl": "Base URL",
"baseUrl": "URL cơ sở",
"baseUrlHelp": "SearXNG cần URL instance của bạn.",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "Provider tìm kiếm này cần API key.",
"baseUrlRequired": "SearXNG cần Base URL.",
"apiKeyRequired": "Nhà cung cấp tìm kiếm này cần khóa API.",
"baseUrlRequired": "SearXNG cần URL cơ sở.",
"missingCredential": "Thêm thông tin bắt buộc trước khi lưu.",
"saveHint": "Thay đổi áp dụng cho các yêu cầu web search mới."
"saveHint": "Thay đổi áp dụng cho các yêu cầu tìm kiếm trên web mới."
}
},
"overview": {
@@ -315,7 +324,7 @@
},
"usage": {
"title": "Hoạt động token",
"shortTitle": "Token Usage",
"shortTitle": "Mức dùng token",
"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",
@@ -362,8 +371,18 @@
"selectProvider": "Chọn nhà cung cấp",
"selectAspect": "Chọn tỷ lệ",
"selectSize": "Chọn kích thước",
"selectModel": "Chọn mô hình ảnh",
"searchOrTypeModel": "Tìm kiếm hoặc nhập ID mô hình",
"typeModelId": "Nhập ID mô hình được nhà cung cấp này hỗ trợ.",
"configureProvider": "Cấu hình nhà cung cấp",
"missingCredential": "Configura este proveedor antes de activar la generación de imágenes."
"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ợ..."
},
"models": {
"selectModel": "Chọn mô hình",
@@ -387,7 +406,7 @@
"advancedOptions": "Tùy chọn nâng cao",
"advancedSummary": "Ngữ cảnh {{context}} · Tối đa {{max}} token",
"maxTokens": "Token đầu ra tối đa",
"temperature": "Temperature",
"temperature": "Nhiệt độ",
"reasoningEffort": "Mức suy luận",
"convertTitle": "Chuyển đổi thiết lập mô hình hiện tại",
"convertHelp": "Chuyển mô hình chính và các mô hình dự phòng hiện có thành cấu hình đặt trước để quản lý thứ tự tại đây.",
@@ -462,11 +481,11 @@
},
"mcp": {
"allCategories": "Tất cả danh mục",
"summary": "Đã bật {{installed}} / {{total}} preset",
"summary": "Đã bật {{installed}} / {{total}} cấu hình đặt trước",
"filterAll": "Tất cả",
"filterInstalled": "Đã bật",
"filterNotInstalled": "Chưa bật",
"searchPlaceholder": "Tìm preset MCP",
"searchPlaceholder": "Tìm cấu hình đặt trước MCP",
"moreOptions": "Tùy chọn MCP khác",
"moreOptionsSubtitle": "Thêm máy chủ tùy chỉnh hoặc nhập mcp.json.",
"customTitle": "MCP tùy chỉnh",
@@ -477,9 +496,9 @@
"serverUrl": "URL",
"transport": "Giao thức truyền",
"command": "Lệnh",
"args": "Args JSON",
"headers": "Headers JSON",
"env": "Env JSON",
"args": "Đối số JSON",
"headers": "Header JSON",
"env": "Môi trường JSON",
"timeout": "Thời gian chờ công cụ",
"advancedOptions": "Tùy chọn nâng cao",
"hideAdvanced": "Ẩn nâng cao",
@@ -488,8 +507,8 @@
"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": "{{count}} công cụ",
"loading": "Đang tải preset MCP...",
"empty": "Không có preset MCP nào khớp bộ lọc này.",
"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.",
"openDocs": "Mở tài liệu",
"test": "Kiểm tra",
"remove": "Xóa",
@@ -507,6 +526,7 @@
"statusMissingCredentials": "Cần khóa",
"statusMissingDependency": "Cần phụ thuộc",
"statusComingSoon": "Sắp ra mắt",
"comingSoon": "Sắp ra mắt",
"statusNotInstalled": "Chưa bật",
"toolScope": "Công cụ",
"allTools": "Tất cả",
@@ -514,7 +534,7 @@
"testForTools": "Chạy Kiểm tra để xem và chọn từng công cụ."
},
"api": {
"title": "Máy chủ API", "openaiCompatible": "API tương thích OpenAI", "description": "Kết nối SDK và agent qua endpoint /v1 cục bộ.",
"title": "Máy chủ API", "openaiCompatible": "API tương thích OpenAI", "description": "Kết nối SDK và tác nhân qua điểm cuối /v1 cục bộ.",
"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.",
@@ -548,7 +568,7 @@
"restartRequired": "Khởi động lại nanobot để áp dụng ứng dụng và tính năng đã 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 workspace.",
"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",
"searchPlaceholder": "Tìm kênh",
"backToChannels": "Tất cả kênh",
@@ -569,6 +589,8 @@
"advanced": "Nâng cao",
"checkAndEnable": "Kiểm tra và bật",
"checkConnection": "Kiểm tra kết nối",
"connectionChecks": "Kiểm tra kết nối",
"open": "Mở",
"checkedAndEnabled": "Đã kiểm tra và bật.",
"checking": "Đang kiểm tra...",
"checkOnly": "Chỉ kiểm tra",
@@ -664,6 +686,8 @@
"protected": "Được bảo vệ",
"editTitle": "Sửa tự động hóa",
"save": "Lưu",
"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.",
"cancel": "Hủy",
@@ -723,6 +747,7 @@
"fields": {
"name": "Tên",
"message": "Tin nhắn",
"command": "Lệnh",
"scheduleType": "Loại lịch",
"every": "Mỗi",
"unit": "Đơn vị",
@@ -757,7 +782,7 @@
"signInAgain": "Đăng nhập lại",
"signOut": "Đăng xuất",
"signedInAs": "Đã đăng nhập bằng {{account}}",
"signInHelp": "Inicia sesión desde este dispositivo; no se guarda API key en config.",
"signInHelp": "Đăng nhập từ thiết bị này; khóa API không được lưu trong config.",
"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",
@@ -780,7 +805,7 @@
"finishSignIn": "Hoàn tất đăng nhập"
},
"skills": {
"description": "Xem các kỹ năng chỉ dẫn mà agent này có thể tải trong cuộc trò chuyện.",
"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.",
"caption": "{{available}} khả dụng · tổng {{total}}",
"views": "Chế độ xem kỹ năng",
"installedTab": "Đã cài đặt",
@@ -788,34 +813,34 @@
"customGroup": "Tùy chỉnh",
"builtinGroup": "Tích hợp sẵn",
"otherGroup": "Khác",
"searchInstalled": "Tìm skill đã cài đặt",
"searchInstalled": "Tìm kỹ năng đã cài đặt",
"filterAll": "Tất cả",
"filterEnabled": "Đã bật",
"filterDisabled": "Đã tắt",
"noMatching": "Không có skill phù hợp.",
"noMatching": "Không có kỹ năng phù hợp.",
"statusDisabled": "Đã tắt",
"statusEnabled": "Đã bật",
"statusNeedsSetup": "Cần thiết lập",
"showLess": "Thu gọn",
"showMore": "Hiển thị thêm",
"enabledControl": "Sử dụng skill này",
"enabledDescription": "Cho phép agent tải skill này khi các yêu cầu đã sẵn sàng.",
"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.",
"enableSkill": "Bật {{name}}",
"disableSkill": "Tắt {{name}}",
"updateFailed": "Không thể cập nhật skill này.",
"deleteTitle": "Xóa skill",
"deleteDescription": "Xóa skill này khỏi workspace hiện tại.",
"updateFailed": "Không thể cập nhật kỹ năng này.",
"deleteTitle": "Xóa kỹ năng",
"deleteDescription": "Xóa kỹ năng này khỏi không gian làm việc hiện tại.",
"deleteAction": "Xóa",
"deleteFailed": "Không thể xóa skill này.",
"deleteFailed": "Không thể xóa kỹ năng này.",
"deleteConfirmTitle": "Xóa {{name}}?",
"deleteConfirmDescription": "Thao tác này xóa các tệp skill khỏi workspace hiện tại và không thể hoàn tác.",
"deleteConfirmAction": "Xóa skill",
"instructionsTitle": "Hướng dẫn skill",
"deleteConfirmDescription": "Thao tác này xóa các tệp kỹ năng khỏi không gian làm việc hiện tại và không thể hoàn tác.",
"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.",
"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 kho kỹ năng.",
"marketplaceSearchFailed": "Không thể tìm kiếm các chợ 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",
@@ -828,7 +853,7 @@
"marketplaceTrendingUnavailable": "Các kỹ năng thịnh hành tạm thời không khả dụng.",
"marketplaceEmpty": "Không tìm thấy kỹ năng cho “{{query}}”.",
"marketplaceConfirmTitle": "Cài đặt {{name}}?",
"marketplaceConfirmDescription": "Kỹ năng bên thứ ba này đến từ {{provider}} ({{source}}) và có thể chứa hướng dẫn hoặc tập lệnh thực thi.",
"marketplaceConfirmDescription": "Kỹ năng của bên thứ ba này đến từ {{provider}} ({{source}}) và có thể chứa hướng dẫn hoặc tập lệnh thực thi.",
"marketplaceConfirmInstall": "Cài đặt kỹ năng",
"marketplaceOpen": "Mở {{name}} trên {{provider}}",
"marketplaceOpenProvider": "Mở {{provider}}",
@@ -840,7 +865,7 @@
"marketplaceInstall": "Cài đặt",
"marketplaceNoTrend": "Chưa có xu hướng",
"marketplaceTrendLabel": "Xu hướng lượt cài đặt trong 8 tuần",
"featured": "Kỹ năng agent",
"featured": "Kỹ năng của tác nhân",
"empty": "Không có kỹ năng nào khả dụng.",
"sourceWorkspace": "Tùy chỉnh",
"sourceBuiltin": "Tích hợp",
@@ -865,9 +890,9 @@
"detailDescription": "Chi tiết cho {{name}}."
},
"voice": {
"selectProvider": "Chon nha cung cap",
"configureProvider": "Cau hinh nha cung cap",
"languageAuto": "Tu dong"
"selectProvider": "Chn nhà cung cp",
"configureProvider": "Cu hình nhà cung cp",
"languageAuto": "Tự động"
}
},
"chat": {
@@ -881,34 +906,34 @@
"actions": "Tác vụ cho chủ đề {{title}}",
"newInProject": "Bắt đầu chủ đề mới trong {{project}}",
"activity": {
"running": "Agent running",
"complete": "Agent finished",
"updated": "New activity"
"running": "Tác nhân đang chạy",
"complete": "Tác nhân đã hoàn tất",
"updated": "Hoạt động mới"
},
"pin": "Pin",
"unpin": "Unpin",
"rename": "Rename",
"pin": "Ghim",
"unpin": "Bỏ ghim",
"rename": "Đổi tên",
"renameTitle": "Đổi tên chủ đề",
"renameDescription": "Chọn tên hiển thị trong thanh bên cho chủ đề này.",
"renamePlaceholder": "Tên chủ đề",
"renameProjectTitle": "Rename project",
"renameProjectDescription": "Choose a local sidebar name for this project.",
"renameProjectPlaceholder": "Project name",
"renameSave": "Save",
"archive": "Archive",
"unarchive": "Unarchive",
"showArchived": "Show archived",
"hideArchived": "Hide archived",
"renameProjectTitle": "Đổi tên dự án",
"renameProjectDescription": "Chọn tên hiển thị cục bộ cho dự án này trên thanh bên.",
"renameProjectPlaceholder": "Tên dự án",
"renameSave": "Lưu",
"archive": "Lưu trữ",
"unarchive": "Bỏ lưu trữ",
"showArchived": "Hiện mục đã lưu trữ",
"hideArchived": "Ẩn mục đã lưu trữ",
"delete": "Xóa",
"newChat": "Chủ đề mới",
"groups": {
"pinned": "Pinned",
"pinned": "Đã ghim",
"all": "Chủ đề",
"projects": "Projects",
"today": "Today",
"yesterday": "Yesterday",
"earlier": "Earlier",
"archived": "Archived"
"projects": "Dự án",
"today": "Hôm nay",
"yesterday": "Hôm qua",
"earlier": "Trước đó",
"archived": "Đã lưu trữ"
}
},
"deleteConfirm": {
@@ -974,25 +999,25 @@
},
"more": {
"title": "Thêm",
"prompt": "Cho tôi xem vài cách hữu ích mà bạn có thể giúp trong workspace này."
"prompt": "Cho tôi xem vài cách hữu ích mà bạn có thể giúp trong không gian làm việc này."
}
},
"imageQuickActions": {
"icon": {
"title": "Thiết kế biểu tượng app",
"title": "Thiết kế biểu tượng ứng dụng",
"prompt": "Tạo một biểu tượng ứng dụng 1:1 gọn gàng cho nanobot: robot thân thiện, phong cách vector đơn giản, bảng màu xanh trắng dịu, không có chữ."
},
"sticker": {
"title": "Tạo sticker",
"prompt": "Tạo một hình kiểu sticker dễ thương của trợ lý robot nhỏ, nền trông như trong suốt, biểu cảm và vui nhộn."
"title": "Tạo nhãn dán",
"prompt": "Tạo một hình kiểu nhãn dán dễ thương của trợ lý robot nhỏ, nền trông như trong suốt, biểu cảm và vui nhộn."
},
"poster": {
"title": "Tạo poster",
"prompt": "Tạo một ý tưởng poster chỉn chu cho trợ lý AI cá nhân, bố cục hiện đại, phân cấp thị giác rõ, phù hợp cho landing page."
"prompt": "Tạo một ý tưởng poster chỉn chu cho trợ lý AI cá nhân, bố cục hiện đại, phân cấp thị giác rõ, phù hợp cho trang đích."
},
"product": {
"title": "Mockup sản phẩm",
"prompt": "Tạo một hình mockup sản phẩm gọn gàng cho ứng dụng web AI hội thoại, giao diện tối giản, ánh sáng cao cấp, khung thiết bị chân thực."
"title": "Mô hình mẫu sản phẩm",
"prompt": "Tạo một hình mô hình mẫu sản phẩm gọn gàng cho ứng dụng web AI hội thoại, giao diện tối giản, ánh sáng cao cấp, khung thiết bị chân thực."
},
"portrait": {
"title": "Chân dung cách điệu",
@@ -1073,7 +1098,7 @@
"auto": "Tự động",
"1_1": "Vuông 1:1",
"3_4": "Dọc 3:4",
"9_16": "Story 9:16",
"9_16": "Tin 9:16",
"4_3": "Ngang 4:3",
"16_9": "Rộng 16:9"
}
@@ -1113,7 +1138,7 @@
},
"stop": {
"title": "Dừng tác vụ hiện tại",
"description": "Hủy lượt agent đang chạy trong cuộc trò chuyện này."
"description": "Hủy lượt của tác nhân đang chạy trong cuộc trò chuyện này."
},
"restart": {
"title": "Khởi động lại nanobot",
@@ -1121,11 +1146,11 @@
},
"status": {
"title": "Hiển thị trạng thái",
"description": "Hiển thị trạng thái runtime, provider và channel."
"description": "Hiển thị trạng thái thời gian chạy, nhà cung cấp và kênh."
},
"model": {
"title": "Mô hình",
"description": "Hiển thị hoặc chuyển preset mô hình đang hoạt động."
"description": "Hiển thị hoặc chuyển cấu hình đặt trước của mô hình đang hoạt động."
},
"history": {
"title": "Hiển thị lịch sử",
@@ -1141,19 +1166,19 @@
},
"dream_restore": {
"title": "Khôi phục bộ nhớ",
"description": "Đưa bộ nhớ về một snapshot Dream trước đó."
"description": "Đưa bộ nhớ về một ảnh chụp Dream trước đó."
},
"dream_prompt": {
"title": "Bộ nhớ Dream",
"description": "Cho Dream biết cách sắp xếp bộ nhớ của workspace này."
"description": "Cho Dream biết cách sắp xếp bộ nhớ của không gian làm việc này."
},
"goal": {
"title": "Mục tiêu dài hạn",
"description": "Yêu cầu agent xử lý đây là mục tiêu nhiều bước kéo dài."
"description": "Yêu cầu tác nhân xử lý đây là mục tiêu nhiều bước kéo dài."
},
"trigger": {
"title": "Tạo trigger cục bộ",
"description": "Tạo trigger CLI gắn với phiên chat này."
"title": "Tạo trình kích hoạt cục bộ",
"description": "Tạo trình kích hoạt CLI gắn với phiên chat này."
},
"help": {
"title": "Hiển thị trợ giúp",
@@ -1199,10 +1224,12 @@
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "Dùng @{{name}} như ứng dụng CLI cục bộ",
"mcpDescription": "Dùng @{{name}} như máy chủ MCP"
"mcpDescription": "Dùng @{{name}} như máy chủ MCP",
"cliTitle": "Ứng dụng CLI: {{name}}",
"mcpTitle": "Máy chủ MCP: {{name}}"
},
"workspace": {
"accessAria": "Chế độ truy cập workspace",
"accessAria": "Chế độ truy cập không gian làm việc",
"projectAria": "Chọn dự án",
"projectPlaceholder": "Chọn dự án",
"default": "Quyền mặc định",
@@ -1215,11 +1242,12 @@
"loadEarlier": "Tải tin nhắn trước đó",
"forkedFromHistory": "Tách nhánh từ lịch sử",
"promptNavigator": {
"open": "Mở trình điều hướng prompt",
"title": "Prompt",
"search": "Tìm prompt",
"noResults": "Không có prompt phù hợp.",
"jumpTo": "Nhảy tới prompt: {{label}}"
"open": "Mở trình điều hướng lời nhắc",
"title": "Lời nhắc",
"search": "Tìm lời nhắc",
"noResults": "Không có lời nhắc phù hợp.",
"jumpTo": "Nhảy tới lời nhắc: {{label}}",
"railAria": "Điều hướng lời nhắc của người dùng"
}
},
"message": {
@@ -1243,19 +1271,27 @@
"agentActivityLiveSummary": "Đang chạy… · {{reasoning}} bước · {{tools}} lần gọi công cụ",
"agentActivityLiveToolsOnly": "Đang chạy… · {{tools}} lần gọi công cụ",
"imageAttachment": "Tệp hình ảnh đính kèm",
"videoAttachment": "Tệp video đính kèm",
"fileAttachment": "Tệp đính kèm",
"attachmentUnavailable": "Tệp đính kèm không khả dụng",
"dataTable": "Bảng dữ liệu",
"fileEditPreparing": "Đang chuẩn bị sửa tệp…",
"openLink": "Mở liên kết: {{label}}",
"openAttachment": "Mở {{name}}",
"skill": "Kỹ năng: {{name}}",
"askAboutSelection": "Hỏi về nội dung này",
"forkFromHere": "Tách nhánh",
"copyReply": "Sao chép",
"copiedReply": "Đã sao chép",
"turnLatencyTitle": "Thời gian phản hồi (end-to-end)",
"fileEditViewDiff": "Xem diff",
"fileEditViewLargeDiff": "Xem diff lớn",
"fileEditViewDiff": "Xem khác biệt",
"fileEditViewLargeDiff": "Xem khác biệt lớn",
"fileEditDiffLineCount": "{{count}} dòng",
"fileEditUnchangedLinesHidden": "Đã ẩn {{count}} dòng không đổi",
"fileEditShowMoreLines": "Hiển thị thêm {{count}} dòng",
"fileEditShowFewerLines": "Hiển thị ít dòng hơn",
"fileEditOpenFile": "Mở tệp",
"fileEditDiffTruncated": "Diff đã bị cắt bớt. Mở tệp để xem toàn bộ thay đổi.",
"fileEditDiffTruncated": "Khác biệt đã bị cắt bớt. Mở tệp để xem toàn bộ thay đổi.",
"activityThinkingFor": "Đang suy nghĩ trong {{duration}}",
"activityThought": "Đã suy nghĩ",
"activityThoughtFor": "Đã suy nghĩ trong {{duration}}",
@@ -1283,6 +1319,7 @@
},
"filePreview": {
"aria": "Xem trước tệp",
"breadcrumb": "Đường dẫn tệp",
"close": "Đóng xem trước tệp",
"loading": "Đang tải bản xem trước...",
"failed": "Không thể xem trước tệp này.",
@@ -1297,7 +1334,10 @@
"copied": "Đã sao chép"
},
"common": {
"dismiss": "Đóng"
"dismiss": "Đóng",
"close": "Đóng",
"current": "Hiện tại",
"cancel": "Hủy"
},
"errors": {
"messageTooBig": {
@@ -1305,8 +1345,8 @@
"body": "Máy chủ đã từ chối tin nhắn trước vì vượt quá giới hạn kích thước. Hãy bớt ảnh hoặc chọn tệp nhỏ hơn rồi thử lại."
},
"workspaceScopeRejected": {
"title": "Workspace không thay đổi",
"body": "Gateway đã từ chối dự án hoặc chế độ truy cập được yêu cầu, nên Nanobot giữ workspace trước đó."
"title": "Không gian làm việc không thay đổi",
"body": "Gateway đã từ chối dự án hoặc chế độ truy cập được yêu cầu, nên Nanobot giữ không gian làm việc trước đó."
},
"turnRejected": {
"title": "Tin nhắn chưa được gửi",
@@ -1315,7 +1355,7 @@
},
"workspace": {
"dialog": {
"defaultProject": "Workspace mặc định",
"defaultProject": "Không gian làm việc mặc định",
"manual": "Dán đường dẫn",
"manualPlaceholder": "/Users/name/project",
"usePath": "Dùng đường dẫn",
+119 -79
View File
@@ -7,18 +7,18 @@
},
"error": {
"title": "无法连接到 nanobot",
"gatewayHint": "请确认 gateway 已启动(`nanobot gateway`),并且当前页面与 gateway 运行在同一台机器上。"
"gatewayHint": "请确认网关已启动(`nanobot gateway`),并且当前页面与网关运行在同一台机器上。"
},
"auth": {
"title": "需要验证",
"hint": "请输入 gateway 配置中的 tokenIssueSecret。",
"hint": "请输入网关配置中的 tokenIssueSecret。",
"placeholder": "密码",
"submit": "连接",
"invalid": "密码无效,请重试。"
},
"account": {
"section": "账户",
"logoutHint": "断开此浏览器与 gateway 的连接。",
"logoutHint": "断开此浏览器与网关的连接。",
"logout": "退出登录"
},
"system": {
@@ -38,6 +38,15 @@
},
"meta": {
"description": "nanobot Web UI —— 与你的 nanobot 工作区对话。"
},
"pairing": {
"title": "配对聊天用户",
"description": "输入聊天中显示的配对码。",
"code": "配对码",
"matched": "已匹配 {{channel}},正在连接…",
"expiresInline": "配对码将于 {{expires}} 过期。",
"queueCount": "{{count}} 个待处理",
"noMatch": "没有待处理请求与此配对码匹配。"
}
},
"sidebar": {
@@ -75,7 +84,7 @@
"providers": "提供商",
"image": "图片",
"voice": "语音",
"browser": "网",
"browser": "网",
"channels": "渠道",
"cliApps": "CLI 应用",
"mcp": "MCP",
@@ -95,11 +104,11 @@
"presets": "预设",
"imageGeneration": "图片生成",
"imageDefaults": "默认值",
"webSearch": "网搜索",
"webBehavior": "行为",
"webSearch": "网搜索",
"webBehavior": "网络行为",
"cliApps": "CLI 应用",
"mcp": "MCP 服务",
"identity": "身份",
"regional": "区域",
"webuiSafety": "WebUI 安全",
"capabilities": "能力",
"apps": "应用",
@@ -129,7 +138,7 @@
"advancedOptions": "高级选项",
"advancedSummary": "上下文 {{context}} · 最大输出 {{max}} tokens",
"maxTokens": "最大输出 tokens",
"temperature": "Temperature",
"temperature": "温度",
"reasoningEffort": "推理强度",
"convertTitle": "转换现有模型设置",
"convertHelp": "把现有主模型和备用模型转换成预设,之后即可在这里管理调用顺序。",
@@ -175,7 +184,7 @@
"presetModel": "预设模型",
"density": "密度",
"activityMode": "活动详情",
"fileEditDisplay": "文件编辑示",
"fileEditDisplay": "文件编辑示",
"codeWrap": "代码换行",
"brandLogos": "品牌 Logo",
"maxResults": "最大结果数",
@@ -190,8 +199,6 @@
"defaultImageSize": "默认尺寸",
"maxImagesPerTurn": "每轮最大图片数",
"imageSaveDir": "保存目录",
"botName": "Bot 名称",
"botIcon": "Bot 图标",
"timezone": "时区",
"workspacePath": "默认工作区",
"localServiceAccess": "本机服务",
@@ -219,24 +226,22 @@
"selectedModelProvider": "由选中的模型决定。",
"selectedModelValue": "由选中的模型决定。",
"selectedPreset": "命名预设在这里只读;请在 config.json 中编辑。",
"presetModel": "切回 Default 后可在 WebUI 中编辑模型和提供商。",
"presetModel": "切回默认预设后可在 WebUI 中编辑模型和提供商。",
"density": "只保存在此浏览器中。",
"activityMode": "选择默认显示多少 agent 活动细节。",
"activityMode": "选择默认显示多少智能体活动详情。",
"fileEditDisplay": "选择文件编辑活动默认显示行数还是差异。",
"codeWrap": "让长代码行在小屏幕上也易读。",
"brandLogos": "在设置中显示第三方提供商和 CLI 图标。",
"maxResults": "每次 web_search 调用返回的结果数。",
"timeout": "搜索提供商请求超时前的秒数。",
"timeout": "搜索提供商请求超时前等待的秒数。",
"jinaReader": "可用时为 web_fetch 使用 Jina Reader。",
"imageGeneration": "配置图片提供商后,在聊天中开放 generate_image。",
"imageGeneration": "配置图片提供商后,即可在聊天中使用 generate_image。",
"imageProvider": "选择 generate_image 使用的注册提供商。",
"imageProviderStatus": "图片生成会复用「提供商」里的凭据。",
"imageModel": "选择当前图片提供商支持的模型。",
"defaultAspectRatio": "当提示词没有指定比例时使用。",
"defaultImageSize": "发送给支持此选项的提供商的尺寸提示。",
"maxImagesPerTurn": "单次 generate_image 请求可生成的图片上限。",
"botName": "显示在 nanobot 使用展示名称的地方。",
"botIcon": "显示在 Bot 名称旁的短 emoji 或文字。",
"timezone": "用于日程和需要时间感知的回复。",
"cliAppsCatalog": "只安装 nanobot 可本地运行的应用 CLI 适配器;不会改动原生应用。",
"cliAppsFilter": "按应用、类别或能力搜索。",
@@ -250,7 +255,7 @@
"contextWindow": "选择此模型配置的默认上下文预算。",
"transcription": "发送前先把麦克风输入转写到输入框。聊天渠道里的语音消息也使用同一套设置。",
"transcriptionProvider": "使用「提供商」中对应提供商的凭据。",
"transcriptionProviderStatus": "API Key 仍保存在 providers 里,不写进 transcription 设置。",
"transcriptionProviderStatus": "API 密钥仍保存在“提供商”配置中,不写入“语音转写”设置。",
"transcriptionModel": "除非提供商需要自定义模型 ID,否则保持解析后的默认值即可。",
"transcriptionLanguage": "可选 ISO-639 语言提示,例如 en、zh、ja 或 ko。"
},
@@ -335,15 +340,16 @@
"setup": "连接",
"configure": "连接",
"connectTitle": "连接 {{name}}",
"connectHint": "填入账户里的 key。",
"connectHint": "填入账户中的密钥。",
"saveAndEnable": "保存并启用",
"updateSetup": "更新配置",
"configured": "已配置",
"keepExisting": "留空则保留当前值",
"statusConfigured": "已配置",
"statusMissingCredentials": "需要 key",
"statusMissingCredentials": "需要密钥",
"statusMissingDependency": "缺少依赖",
"statusComingSoon": "暂不支持",
"comingSoon": "即将推出",
"statusNotInstalled": "未启用",
"toolScope": "工具",
"allTools": "全部",
@@ -359,7 +365,7 @@
"restartPending": "等待重启",
"ready": "就绪",
"privateEngine": "私有引擎",
"unixSocket": "Unix socket",
"unixSocket": "Unix 套接字",
"defaultWorkspace": "默认工作区",
"comfortable": "舒适",
"compact": "紧凑",
@@ -376,7 +382,10 @@
"configured": "已配置",
"notConfigured": "未配置",
"pending": "等待中",
"restartingEngine": "正在重启"
"restartingEngine": "正在重启",
"checking": "检查中",
"running": "运行中",
"needsSetup": "需要设置"
},
"status": {
"loading": "正在加载设置...",
@@ -404,51 +413,52 @@
"delete": "删除",
"deleting": "正在删除...",
"cancel": "取消",
"dismiss": "关闭",
"open": "打开",
"export": "导出",
"opening": "正在打开...",
"exporting": "正在导出..."
},
"byok": {
"description": "自带服务商密钥。Nanobot 会从当前 config 读取这些值,只有已配置的服务商才能用于模型预设。",
"description": "使用自己的提供商密钥。nanobot 会从当前配置读取这些值,只有已配置的提供商才能用于模型预设。",
"configured": "已配置",
"notConfigured": "未配置",
"configuredSection": "已配置",
"notConfiguredSection": "未配置",
"showMore": "再显示 {{count}} 个",
"showLess": "收起",
"apiKey": "API key",
"apiBase": "API base",
"apiKeyPlaceholder": "输入 API key",
"apiKeyConfiguredPlaceholder": "留空则保留当前 key",
"configuredKeyHint": "已配置的 key",
"apiBasePlaceholder": "使用服务商默认地址",
"apiKeyRequired": "需要 API key 才能配置此服务商。",
"showApiKey": "显示 API key",
"hideApiKey": "隐藏 API key",
"noConfiguredProviders": "没有已配置的服务商",
"configureFirst": "请先在 BYOK 配置服务商。",
"apiKey": "API 密钥",
"apiBase": "API 基础地址",
"apiKeyPlaceholder": "输入 API 密钥",
"apiKeyConfiguredPlaceholder": "留空则保留当前密钥",
"configuredKeyHint": "已配置的密钥",
"apiBasePlaceholder": "使用提供商默认地址",
"apiKeyRequired": "需要 API 密钥才能配置此提供商。",
"showApiKey": "显示 API 密钥",
"hideApiKey": "隐藏 API 密钥",
"noConfiguredProviders": "没有已配置的提供商",
"configureFirst": "请先在 BYOK 配置提供商。",
"openByok": "打开 BYOK",
"tabs": {
"ariaLabel": "BYOK 凭证类型",
"llm": "LLM",
"webSearch": "网搜索"
"webSearch": "网搜索"
},
"webSearch": {
"provider": "搜索服务商",
"providerHelp": "选择网搜索工具使用的后端。",
"selectProvider": "选择服务商",
"provider": "搜索提供商",
"providerHelp": "选择网搜索工具使用的后端。",
"selectProvider": "选择提供商",
"credentials": "凭证",
"noCredentialRequired": "无需 key",
"noCredentialHelp": "DuckDuckGo 不需要保存 API key。",
"apiKeyHelp": "保存到 config 后显示掩码提示。",
"baseUrl": "Base URL",
"noCredentialRequired": "无需密钥",
"noCredentialHelp": "DuckDuckGo 无需保存 API 密钥。",
"apiKeyHelp": "保存到 config 后显示掩码。",
"baseUrl": "基础 URL",
"baseUrlHelp": "SearXNG 需要你自己的实例地址。",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "这个搜索服务商需要 API key。",
"baseUrlRequired": "SearXNG 需要 Base URL。",
"apiKeyRequired": "此搜索提供商需要 API 密钥。",
"baseUrlRequired": "SearXNG 需要基础 URL。",
"missingCredential": "填写所需凭证后才能保存。",
"saveHint": "改动会应用到新的网搜索请求。"
"saveHint": "改动会应用到新的网搜索请求。"
}
},
"overview": {
@@ -456,19 +466,19 @@
"providers": "提供商",
"configuredCount": "已配置 {{count}} 个",
"totalProviders": "共 {{count}} 个可用",
"webSearch": "网搜索",
"webSearch": "网搜索",
"imageGeneration": "图片生成",
"voiceInput": "语音识别",
"workspace": "工作区"
},
"usage": {
"title": "Token 活动",
"shortTitle": "Token Usage",
"subtitle": "最近 12 个月由提供商上报的 token 用量。",
"empty": "新的模型回复产生后,这里会显示 token 活动。",
"totalTokens": "累计 Token 数",
"peakTokens": "峰值 Token ",
"thirtyDayTokens": "30 天 Token ",
"title": "Token 用量",
"shortTitle": "Token 用量",
"subtitle": "最近 12 个月由提供商上报的 Token 用量。",
"empty": "模型产生新的回复后,这里会显示 Token 用量。",
"totalTokens": "Token 数",
"peakTokens": "Token 峰值",
"thirtyDayTokens": "30 天 Token 用量",
"currentStreak": "当前连续天数",
"longestStreak": "最长连续天数",
"daysValue": "{{count}} 天",
@@ -513,13 +523,23 @@
"selectProvider": "选择提供商",
"selectAspect": "选择比例",
"selectSize": "选择尺寸",
"selectModel": "选择图片模型",
"searchOrTypeModel": "搜索或输入模型 ID",
"typeModelId": "输入此提供商支持的模型 ID。",
"configureProvider": "配置提供商",
"missingCredential": "启用图片生成前请先配置此提供商。"
},
"capabilities": {
"providerSupport": "提供商支持",
"providerInstallOnSave": "保存此提供商时会自动安装所需支持。",
"searchSupport": "搜索提供商支持",
"searchInstallOnSave": "保存时会自动安装 Olostep 支持。",
"installing": "正在安装支持…"
},
"api": {
"title": "API 服务",
"openaiCompatible": "OpenAI 兼容 API",
"description": "让 SDK 和其他 Agent 通过本地 /v1 接口连接 nanobot。",
"description": "让 SDK 和其他智能体通过本地 /v1 接口连接 nanobot。",
"start": "启动 API 服务",
"starting": "正在启动...",
"stop": "停止",
@@ -528,13 +548,13 @@
"thisDevice": "仅此设备",
"localNetwork": "局域网",
"localHelp": "只有当前设备可以连接。",
"networkHelp": "局域网内其他设备可以连接,因此必须设置 API Key。",
"networkHelp": "局域网内其他设备可以连接,因此必须设置 API 密钥。",
"port": "端口",
"portHelp": "API 服务使用的本地端口。",
"apiKey": "API Key",
"apiKey": "API 密钥",
"apiKeyHelp": "客户端使用 Bearer Token 发送此密钥。",
"apiKeyRequired": "向局域网开放 API 前必须设置密钥。",
"apiKeyPlaceholder": "输入 API Key",
"apiKeyPlaceholder": "输入 API 密钥",
"autoInstall": "启动时会自动安装 API 支持。"
},
"observability": {
@@ -544,7 +564,7 @@
"enable": "启用追踪支持"
},
"apps": {
"description": "工具连接到 nanobot,然后在对话中 @ 使用。",
"description": "工具接入 nanobot,然后在对话中通过 @ 用。",
"cliLabel": "应用",
"mcpLabel": "集成",
"channelLabel": "渠道",
@@ -573,7 +593,7 @@
"requires": "需要:{{requirements}}",
"setUp": "设置",
"setupGuide": "配置指南",
"setupSummary": "启用只会开 nanobot 渠道支持。请补充平台凭据,然后重启 nanobot。",
"setupSummary": "启用只会开 nanobot 对该渠道支持。请补充平台凭据,然后重启 nanobot。",
"configKeys": "配置字段",
"enable": "启用渠道",
"disable": "禁用渠道",
@@ -583,6 +603,8 @@
"advanced": "高级",
"checkAndEnable": "检查并启用",
"checkConnection": "检查连接",
"connectionChecks": "连接检查",
"open": "打开",
"checkedAndEnabled": "已检查并启用。",
"checking": "正在检查...",
"checkOnly": "仅检查",
@@ -605,7 +627,7 @@
"managedByWebui": "由 WebUI 管理",
"officialGuide": "官方指南",
"optional": "可选",
"providerPreset": "服务商",
"providerPreset": "提供商",
"requiredSetup": "必需配置",
"savedSecret": "已保存",
"savedSecretPlaceholder": "已保存的密钥",
@@ -678,6 +700,8 @@
"protected": "受保护",
"editTitle": "编辑自动任务",
"save": "保存",
"commandCopied": "已复制",
"copyCommand": "复制",
"deleteTitle": "删除自动任务",
"deleteDescription": "这会从 cron 存储中删除 {{name}},历史聊天消息会保留在会话中。",
"cancel": "取消",
@@ -737,6 +761,7 @@
"fields": {
"name": "名称",
"message": "消息",
"command": "命令",
"scheduleType": "计划类型",
"every": "每隔",
"unit": "单位",
@@ -771,7 +796,7 @@
"signInAgain": "重新登录",
"signOut": "退出登录",
"signedInAs": "已登录为 {{account}}",
"signInHelp": "从这台设备登录;不会在配置中保存 API key。",
"signInHelp": "从这台设备登录;不会在配置中保存 API 密钥。",
"remoteSignInHelp": "点击“登录”在你的电脑上打开 xAI,完成登录后粘贴页面显示的授权码。",
"codexRemoteSignInHelp": "在此浏览器中登录,然后将完整的 localhost 回调 URL 粘贴回 nanobot。",
"signInRequired": "需要登录",
@@ -794,7 +819,7 @@
"finishSignIn": "完成登录"
},
"skills": {
"description": "查看此 agent 在对话中可以加载的指令技能。",
"description": "查看此智能体在对话中可以加载的指令技能。",
"caption": "{{available}} 个可用 · 共 {{total}} 个",
"views": "技能视图",
"installedTab": "已安装",
@@ -813,7 +838,7 @@
"showLess": "收起",
"showMore": "展开",
"enabledControl": "使用此技能",
"enabledDescription": "当技能需求满足时,允许 agent 加载并使用它。",
"enabledDescription": "当技能需求满足时,允许智能体加载并使用它。",
"enableSkill": "启用 {{name}}",
"disableSkill": "停用 {{name}}",
"updateFailed": "无法更新此技能。",
@@ -854,7 +879,7 @@
"marketplaceInstall": "安装",
"marketplaceNoTrend": "暂无趋势",
"marketplaceTrendLabel": "近 8 周安装趋势",
"featured": "Agent 技能",
"featured": "智能体技能",
"empty": "暂无可用技能。",
"sourceWorkspace": "自定义",
"sourceBuiltin": "内置",
@@ -895,8 +920,8 @@
"actions": "“{{title}}” 的话题操作",
"newInProject": "在 {{project}} 中开始新话题",
"activity": {
"running": "Agent 正在运行",
"complete": "Agent 已完成",
"running": "智能体正在运行",
"complete": "智能体已完成",
"updated": "有新内容"
},
"pin": "置顶",
@@ -1069,7 +1094,7 @@
"modelNotConfigured": "模型未配置",
"configureModel": "配置模型",
"queued": {
"label": "待引导提示",
"label": "排队中的引导消息",
"guide": "引导",
"delete": "删除引导",
"edit": "编辑引导",
@@ -1136,7 +1161,7 @@
},
"stop": {
"title": "停止当前任务",
"description": "取消这个对话中正在运行的 agent 回合。"
"description": "取消这个对话中正在运行的智能体回合。"
},
"restart": {
"title": "重启 nanobot",
@@ -1144,7 +1169,7 @@
},
"status": {
"title": "查看状态",
"description": "显示运行时、服务商和道状态。"
"description": "显示运行时、提供商和道状态。"
},
"model": {
"title": "模型",
@@ -1196,7 +1221,9 @@
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "使用 @{{name}} 调用本地 CLI",
"mcpDescription": "使用 @{{name}} 调用 MCP 服务"
"mcpDescription": "使用 @{{name}} 调用 MCP 服务",
"cliTitle": "CLI 应用:{{name}}",
"mcpTitle": "MCP 服务:{{name}}"
},
"encoding": "处理中…",
"remove": "移除附件",
@@ -1229,11 +1256,12 @@
"loadEarlier": "加载更早消息",
"forkedFromHistory": "从历史消息分叉",
"promptNavigator": {
"open": "打开输入导航",
"title": "输入列表",
"search": "搜索输入",
"noResults": "没有匹配的输入。",
"jumpTo": "跳转到输入{{label}}"
"open": "打开提示词导航",
"title": "提示词列表",
"search": "搜索提示词",
"noResults": "没有匹配的提示词。",
"jumpTo": "跳转到提示词{{label}}",
"railAria": "用户提示词导航"
}
},
"message": {
@@ -1272,10 +1300,18 @@
"cliRunRan": "已使用",
"cliRunFailed": "失败",
"imageAttachment": "图片附件",
"videoAttachment": "视频附件",
"fileAttachment": "文件附件",
"attachmentUnavailable": "附件不可用",
"dataTable": "数据表",
"fileEditPreparing": "正在准备文件编辑…",
"openLink": "打开链接:{{label}}",
"openAttachment": "打开 {{name}}",
"skill": "技能:{{name}}",
"automationSourceFallback": "自动化",
"automationTriggered": "自动触发",
"askAboutSelection": "继续提问",
"forkFromHere": "分叉",
"askAboutSelection": "询问此内容",
"forkFromHere": "从此处分叉",
"copyReply": "复制",
"copiedReply": "已复制",
"turnLatencyTitle": "本轮耗时(端到端)",
@@ -1297,10 +1333,11 @@
},
"filePreview": {
"aria": "文件预览",
"breadcrumb": "文件路径",
"close": "关闭文件预览",
"loading": "正在加载预览...",
"failed": "无法预览这个文件。",
"routeMissing": "文件预览需要最新的 gateway。请重启 nanobot gateway 后再试。",
"routeMissing": "文件预览需要最新的网关。请重启 nanobot gateway 后再试。",
"resize": "调整文件预览宽度",
"truncated": "文件较大,当前只显示前半部分预览。"
},
@@ -1311,7 +1348,10 @@
"copied": "已复制"
},
"common": {
"dismiss": "关闭"
"dismiss": "关闭",
"close": "关闭",
"current": "当前",
"cancel": "取消"
},
"errors": {
"messageTooBig": {
+70 -30
View File
@@ -38,6 +38,15 @@
},
"meta": {
"description": "nanobot Web UI —— 與你的 nanobot 工作區對話。"
},
"pairing": {
"title": "配對聊天使用者",
"description": "輸入聊天中顯示的配對碼。",
"code": "配對碼",
"matched": "已符合 {{channel}},正在連線…",
"expiresInline": "配對碼將於 {{expires}} 到期。",
"queueCount": "{{count}} 個待處理",
"noMatch": "沒有待處理請求符合此配對碼。"
}
},
"sidebar": {
@@ -75,7 +84,7 @@
"providers": "供應商",
"image": "圖片",
"voice": "語音",
"browser": "網",
"browser": "網",
"channels": "通訊管道",
"runtime": "系統",
"advanced": "安全",
@@ -95,9 +104,9 @@
"presets": "預設",
"imageGeneration": "圖片生成",
"imageDefaults": "預設值",
"webSearch": "網搜尋",
"webBehavior": "行為",
"identity": "身分",
"webSearch": "網搜尋",
"webBehavior": "網路行為",
"regional": "區域",
"webuiSafety": "WebUI 安全",
"capabilities": "能力",
"cliApps": "CLI 應用程式",
@@ -136,8 +145,6 @@
"defaultImageSize": "預設尺寸",
"maxImagesPerTurn": "每輪最大圖片數",
"imageSaveDir": "儲存目錄",
"botName": "Bot 名稱",
"botIcon": "Bot 圖示",
"timezone": "時區",
"workspacePath": "預設工作區",
"localServiceAccess": "本機服務",
@@ -164,9 +171,9 @@
"model": "選擇此預設使用的模型。",
"configPath": "目前閘道使用中的設定檔。",
"selectedPreset": "命名預設在此為唯讀;請在 config.json 中編輯。",
"presetModel": "切回 Default 後可在 WebUI 中編輯模型與供應商。",
"presetModel": "切回預設後可在 WebUI 中編輯模型與供應商。",
"density": "只儲存在此瀏覽器中。",
"activityMode": "選擇預設顯示多少 Agent 活動細節。",
"activityMode": "選擇預設顯示多少智能體活動細節。",
"fileEditDisplay": "選擇檔案編輯活動預設顯示行數或差異。",
"codeWrap": "讓長程式碼行在小螢幕上也易讀。",
"maxResults": "每次呼叫 web_search 所回傳的結果數。",
@@ -179,8 +186,6 @@
"defaultAspectRatio": "提示詞未指定比例時使用。",
"defaultImageSize": "傳送給支援此選項的供應商的尺寸提示。",
"maxImagesPerTurn": "單次 generate_image 請求可產生的圖片數上限。",
"botName": "顯示於 nanobot 所有使用顯示名稱的位置。",
"botIcon": "顯示在 Bot 名稱旁的短 emoji 或文字。",
"timezone": "用於排程,以及需要時間資訊的回覆。",
"localServiceAccess": "允許具有完整存取權的 shell 命令存取 localhost 服務。",
"webuiDefaultAccess": "用於未指定個別專案權限的 Web 聊天。",
@@ -198,7 +203,7 @@
"contextWindow": "選擇此模型設定的預設上下文預算。",
"transcription": "送出前先將麥克風輸入轉寫至輸入框。聊天通訊管道的語音訊息也會使用同一組設定。",
"transcriptionProvider": "使用 [供應商] 中對應供應商的憑證。",
"transcriptionProviderStatus": "API 金鑰仍儲存在 providers 中,不會寫入 transcription 設定。",
"transcriptionProviderStatus": "API 金鑰仍儲存在「供應商」中,不會寫入「語音轉寫」設定。",
"transcriptionModel": "除非供應商需要自訂模型 ID,否則保留解析後的預設值即可。",
"transcriptionLanguage": "選填的 ISO-639 語言提示,例如 en、zh、ja 或 ko。"
},
@@ -211,7 +216,7 @@
"restartPending": "等待重新啟動",
"ready": "就緒",
"privateEngine": "私有引擎",
"unixSocket": "Unix socket",
"unixSocket": "Unix 套接字",
"defaultWorkspace": "預設工作區",
"comfortable": "舒適",
"compact": "緊湊",
@@ -228,7 +233,10 @@
"configured": "已設定",
"notConfigured": "未設定",
"pending": "等待中",
"restartingEngine": "正在重新啟動"
"restartingEngine": "正在重新啟動",
"checking": "檢查中",
"running": "執行中",
"needsSetup": "需要設定"
},
"status": {
"loading": "正在載入設定…",
@@ -256,6 +264,7 @@
"deleting": "正在刪除…",
"edit": "編輯",
"cancel": "取消",
"dismiss": "關閉",
"open": "開啟",
"export": "匯出",
"opening": "正在開啟…",
@@ -284,23 +293,23 @@
"tabs": {
"ariaLabel": "BYOK 憑證類型",
"llm": "LLM",
"webSearch": "網搜尋"
"webSearch": "網搜尋"
},
"webSearch": {
"provider": "搜尋供應商",
"providerHelp": "選擇網搜尋工具使用的後端。",
"providerHelp": "選擇網搜尋工具使用的後端。",
"selectProvider": "選擇供應商",
"credentials": "憑證",
"noCredentialRequired": "不需要金鑰",
"noCredentialHelp": "使用 DuckDuckGo 不需要儲存 API 金鑰。",
"apiKeyHelp": "金鑰會儲存在設定檔中,儲存後以遮罩顯示。",
"baseUrl": "Base URL",
"baseUrl": "基礎 URL",
"baseUrlHelp": "SearXNG 需要自行架設的執行個體網址。",
"baseUrlPlaceholder": "https://search.example.com",
"apiKeyRequired": "此搜尋供應商需要 API 金鑰。",
"baseUrlRequired": "SearXNG 需要 Base URL。",
"baseUrlRequired": "SearXNG 需要基礎 URL。",
"missingCredential": "填寫必要憑證後才能儲存。",
"saveHint": "變更會套用至新的網搜尋請求。"
"saveHint": "變更會套用至新的網搜尋請求。"
}
},
"overview": {
@@ -308,7 +317,7 @@
"providers": "供應商",
"configuredCount": "已設定 {{count}} 個",
"totalProviders": "共 {{count}} 個可用",
"webSearch": "網搜尋",
"webSearch": "網搜尋",
"imageGeneration": "圖片生成",
"voiceInput": "語音輸入",
"workspace": "工作區"
@@ -362,9 +371,19 @@
"selectProvider": "選擇供應商",
"selectAspect": "選擇比例",
"selectSize": "選擇尺寸",
"selectModel": "選擇圖片模型",
"searchOrTypeModel": "搜尋或輸入模型 ID",
"typeModelId": "輸入此供應商支援的模型 ID。",
"configureProvider": "設定供應商",
"missingCredential": "啟用圖片生成功能前,請先設定此供應商。"
},
"capabilities": {
"providerSupport": "供應商支援",
"providerInstallOnSave": "儲存此供應商時會自動安裝所需支援。",
"searchSupport": "搜尋供應商支援",
"searchInstallOnSave": "儲存時會自動安裝 Olostep 支援。",
"installing": "正在安裝支援…"
},
"models": {
"selectModel": "選擇模型",
"addConfiguration": "新增設定",
@@ -387,7 +406,7 @@
"advancedOptions": "進階選項",
"advancedSummary": "上下文 {{context}} · 最大輸出 {{max}} tokens",
"maxTokens": "最大輸出 tokens",
"temperature": "Temperature",
"temperature": "溫度",
"reasoningEffort": "推理強度",
"convertTitle": "轉換現有模型設定",
"convertHelp": "將現有主要模型和備用模型轉換為預設,之後即可在這裡管理呼叫順序。",
@@ -507,6 +526,7 @@
"statusMissingCredentials": "需要金鑰",
"statusMissingDependency": "需要相依項",
"statusComingSoon": "即將推出",
"comingSoon": "即將推出",
"statusNotInstalled": "未啟用",
"toolScope": "工具",
"allTools": "全部",
@@ -514,7 +534,7 @@
"testForTools": "執行 [測試] 以檢視並選擇個別工具。"
},
"api": {
"title": "API 伺服器", "openaiCompatible": "OpenAI 相容 API", "description": "讓 SDK 與其他 Agent 透過本機 /v1 端點連線 nanobot。",
"title": "API 伺服器", "openaiCompatible": "OpenAI 相容 API", "description": "讓 SDK 與其他智能體透過本機 /v1 端點連線 nanobot。",
"start": "啟動 API 伺服器", "starting": "正在啟動…", "stop": "停止", "stopping": "正在停止…",
"access": "存取範圍", "thisDevice": "僅此裝置", "localNetwork": "區域網路",
"localHelp": "只有目前裝置可以連線。", "networkHelp": "區域網路內其他裝置可以連線,因此必須設定 API 金鑰。",
@@ -569,6 +589,8 @@
"advanced": "進階",
"checkAndEnable": "檢查並啟用",
"checkConnection": "檢查連線",
"connectionChecks": "連線檢查",
"open": "開啟",
"checkedAndEnabled": "已檢查並啟用。",
"checking": "正在檢查...",
"checkOnly": "僅檢查",
@@ -664,6 +686,8 @@
"protected": "受保護",
"editTitle": "編輯自動任務",
"save": "儲存",
"commandCopied": "已複製",
"copyCommand": "複製",
"deleteTitle": "刪除自動任務",
"deleteDescription": "這會從 cron 儲存區移除 {{name}},過往的聊天訊息仍會保留在該對話中。",
"cancel": "取消",
@@ -723,6 +747,7 @@
"fields": {
"name": "名稱",
"message": "訊息",
"command": "指令",
"scheduleType": "排程類型",
"every": "每隔",
"unit": "單位",
@@ -780,7 +805,7 @@
"finishSignIn": "完成登入"
},
"skills": {
"description": "檢閱此 Agent 可在對話期間載入的指令技能。",
"description": "檢閱此智能體可在對話期間載入的指令技能。",
"caption": "{{available}} 個可用 · 共 {{total}} 個",
"views": "技能檢視",
"installedTab": "已安裝",
@@ -799,7 +824,7 @@
"showLess": "收合",
"showMore": "展開",
"enabledControl": "使用此技能",
"enabledDescription": "當技能需求已滿足時,允許 agent 載入並使用它。",
"enabledDescription": "當技能需求已滿足時,允許智能體載入並使用它。",
"enableSkill": "啟用 {{name}}",
"disableSkill": "停用 {{name}}",
"updateFailed": "無法更新此技能。",
@@ -840,7 +865,7 @@
"marketplaceInstall": "安裝",
"marketplaceNoTrend": "暫無趨勢",
"marketplaceTrendLabel": "近 8 週安裝趨勢",
"featured": "Agent 技能",
"featured": "智能體技能",
"empty": "目前沒有可用的技能。",
"sourceWorkspace": "自訂",
"sourceBuiltin": "內建",
@@ -881,8 +906,8 @@
"actions": "「{{title}}」的話題操作",
"newInProject": "在 {{project}} 中開始新話題",
"activity": {
"running": "Agent 正在執行",
"complete": "Agent 已完成",
"running": "智能體正在執行",
"complete": "智能體已完成",
"updated": "有新內容"
},
"pin": "置頂",
@@ -1113,7 +1138,7 @@
},
"stop": {
"title": "停止目前任務",
"description": "取消這個對話中正在執行的 Agent 回合。"
"description": "取消這個對話中正在執行的智能體回合。"
},
"restart": {
"title": "重新啟動 nanobot",
@@ -1199,7 +1224,9 @@
"cliBadge": "CLI",
"mcpBadge": "MCP",
"cliDescription": "將 @{{name}} 作為本機 CLI 應用程式使用",
"mcpDescription": "將 @{{name}} 作為 MCP 伺服器使用"
"mcpDescription": "將 @{{name}} 作為 MCP 伺服器使用",
"cliTitle": "CLI 應用程式:{{name}}",
"mcpTitle": "MCP 伺服器:{{name}}"
},
"workspace": {
"accessAria": "工作區存取模式",
@@ -1219,7 +1246,8 @@
"title": "提示詞",
"search": "搜尋提示詞",
"noResults": "找不到符合的提示詞。",
"jumpTo": "跳到提示詞:{{label}}"
"jumpTo": "跳到提示詞:{{label}}",
"railAria": "使用者提示詞導覽"
}
},
"message": {
@@ -1243,6 +1271,14 @@
"agentActivityLiveSummary": "進行中… · {{reasoning}} 步 · {{tools}} 次工具呼叫",
"agentActivityLiveToolsOnly": "進行中… · {{tools}} 次工具呼叫",
"imageAttachment": "圖片附件",
"videoAttachment": "影片附件",
"fileAttachment": "檔案附件",
"attachmentUnavailable": "附件無法使用",
"dataTable": "資料表",
"fileEditPreparing": "正在準備檔案編輯…",
"openLink": "開啟連結:{{label}}",
"openAttachment": "開啟 {{name}}",
"skill": "技能:{{name}}",
"forkFromHere": "建立分支",
"copyReply": "複製",
"copiedReply": "已複製",
@@ -1283,6 +1319,7 @@
},
"filePreview": {
"aria": "檔案預覽",
"breadcrumb": "檔案路徑",
"close": "關閉檔案預覽",
"loading": "正在載入預覽…",
"failed": "無法預覽這個檔案。",
@@ -1297,7 +1334,10 @@
"copied": "已複製"
},
"common": {
"dismiss": "關閉"
"dismiss": "關閉",
"close": "關閉",
"current": "目前",
"cancel": "取消"
},
"errors": {
"messageTooBig": {
-2
View File
@@ -858,8 +858,6 @@ export async function updateSettings(
query.set("context_window_tokens", String(update.contextWindowTokens));
}
if (update.timezone !== undefined) query.set("timezone", update.timezone);
if (update.botName !== undefined) query.set("bot_name", update.botName);
if (update.botIcon !== undefined) query.set("bot_icon", update.botIcon);
if (update.toolHintMaxLength !== undefined) {
query.set("tool_hint_max_length", String(update.toolHintMaxLength));
}
-4
View File
@@ -490,8 +490,6 @@ export interface SettingsPayload {
temperature: number;
reasoning_effort: string | null;
timezone: string;
bot_name: string;
bot_icon: string;
tool_hint_max_length: number;
};
model_presets: Array<{
@@ -1028,8 +1026,6 @@ export interface SettingsUpdate {
modelPreset?: string | null;
contextWindowTokens?: number;
timezone?: string;
botName?: string;
botIcon?: string;
toolHintMaxLength?: number;
}
+1 -3
View File
@@ -413,13 +413,11 @@ describe("webui API helpers", () => {
provider: "openrouter",
contextWindowTokens: 262144,
timezone: "Asia/Shanghai",
botName: "nanobot",
botIcon: "nb",
toolHintMaxLength: 120,
});
expect(fetch).toHaveBeenCalledWith(
"/api/settings/update?model_preset=default&model=openrouter%2Ftest&provider=openrouter&context_window_tokens=262144&timezone=Asia%2FShanghai&bot_name=nanobot&bot_icon=nb&tool_hint_max_length=120",
"/api/settings/update?model_preset=default&model=openrouter%2Ftest&provider=openrouter&context_window_tokens=262144&timezone=Asia%2FShanghai&tool_hint_max_length=120",
expect.objectContaining({
headers: { Authorization: "Bearer tok" },
}),
+56 -9
View File
@@ -62,8 +62,6 @@ function baseSettingsPayload() {
temperature: 0.1,
reasoning_effort: null,
timezone: "UTC",
bot_name: "nanobot",
bot_icon: "nb",
tool_hint_max_length: 40,
},
model_presets: [{
@@ -349,6 +347,22 @@ describe("App layout", () => {
).toBeTruthy();
});
it("highlights the blank new-topic destination immediately", async () => {
render(<App />);
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
const sidebar = screen.getByRole("navigation", { name: "Sidebar navigation" });
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",
);
});
it("restores the Settings route after a restart fallback hash", async () => {
localStorage.setItem("nanobot-webui.restartStartedAt", String(Date.now()));
localStorage.setItem("nanobot-webui.restartRoute", "#/settings?section=channels");
@@ -1745,8 +1759,6 @@ describe("App layout", () => {
temperature: 0.1,
reasoning_effort: null,
timezone: "UTC",
bot_name: "nanobot",
bot_icon: "nb",
tool_hint_max_length: 40,
},
model_presets: [
@@ -2073,7 +2085,10 @@ describe("App layout", () => {
expect(screen.queryByDisplayValue("unsaved-brave-key")).not.toBeInTheDocument();
fireEvent.click(within(settingsNav).getByRole("button", { name: "System" }));
expect(screen.getByText("Bot name")).toBeInTheDocument();
expect(screen.getByText("Regional")).toBeInTheDocument();
expect(screen.getByText("Timezone")).toBeInTheDocument();
expect(screen.queryByText("Bot name")).not.toBeInTheDocument();
expect(screen.queryByText("Bot icon")).not.toBeInTheDocument();
expect(screen.queryByText("Tool hint length")).not.toBeInTheDocument();
expect(screen.queryByText("Heartbeat")).not.toBeInTheDocument();
expect(screen.queryByText("Dream")).not.toBeInTheDocument();
@@ -2128,16 +2143,41 @@ describe("App layout", () => {
expect(window.location.hash).toBe("#/settings");
const settingsNav = screen.getByRole("navigation", { name: "Settings sections" });
fireEvent.click(within(settingsNav).getByRole("button", { name: "Models" }));
const overviewButton = within(settingsNav).getByRole("button", {
name: "Overview",
exact: true,
});
const modelsButton = within(settingsNav).getByRole("button", {
name: "Models",
exact: true,
});
const settingsHighlight = within(settingsNav).getByTestId(
"settings-selection-highlight",
);
expect(overviewButton).toHaveAttribute("aria-current", "page");
expect(overviewButton).not.toHaveClass("bg-sidebar-accent");
expect(overviewButton).toHaveClass("transition-[color]");
expect(settingsHighlight).toHaveAttribute("data-active-id", "overview");
fireEvent.click(modelsButton);
expect(await screen.findByText("Model presets")).toBeInTheDocument();
expect(screen.queryByRole("heading", { name: "Models" })).not.toBeInTheDocument();
expect(window.location.hash).toBe("#/settings?section=models");
expect(modelsButton).toHaveAttribute("aria-current", "page");
expect(settingsHighlight).toHaveAttribute("data-active-id", "models");
fireEvent.click(within(settingsNav).getByRole("button", { name: "Voice" }));
const voiceButton = within(settingsNav).getByRole("button", {
name: "Voice",
exact: true,
});
fireEvent.click(voiceButton);
expect(await screen.findByRole("heading", { name: "Voice input" })).toBeInTheDocument();
expect(window.location.hash).toBe("#/settings?section=voice");
expect(voiceButton).toHaveAttribute("aria-current", "page");
expect(settingsHighlight).toHaveAttribute("data-active-id", "voice");
});
it("transitions between Apps and Skills without replacing the sidebar", async () => {
@@ -2163,6 +2203,11 @@ describe("App layout", () => {
"aria-current",
"page",
);
expect(within(sidebar).getByTestId("actions-selection-highlight")).toHaveAttribute(
"data-active-id",
"utility:apps",
);
expect(within(sidebar).queryAllByRole("button", { current: "page" })).toHaveLength(1);
expect(screen.getByTestId("settings-section-transition")).toHaveAttribute(
"data-settings-section",
"apps",
@@ -2190,6 +2235,10 @@ describe("App layout", () => {
"aria-current",
"page",
);
expect(within(sidebar).getByTestId("actions-selection-highlight")).toHaveAttribute(
"data-active-id",
"utility:skills",
);
expect(document.title).toBe("Skills · nanobot");
});
@@ -2231,8 +2280,6 @@ describe("App layout", () => {
temperature: 0.1,
reasoning_effort: null,
timezone: "UTC",
bot_name: "nanobot",
bot_icon: "nb",
tool_hint_max_length: 40,
},
model_presets: [
+44 -20
View File
@@ -44,6 +44,7 @@ function rect({
describe("ChatList", () => {
afterEach(() => {
vi.restoreAllMocks();
vi.unstubAllGlobals();
});
it("orders chats by latest session activity by default", () => {
@@ -220,8 +221,20 @@ describe("ChatList", () => {
expect(within(chatsSection).queryByText("Project chat")).not.toBeInTheDocument();
});
it("floats a borderless highlight in, then slides it between selected topics", () => {
it("positions one background highlight and resets it across hidden targets", () => {
let revealFrame: FrameRequestCallback | null = null;
let resizeObserverCallback: ResizeObserverCallback | null = null;
let activeTargetVisible = true;
class MockResizeObserver {
constructor(callback: ResizeObserverCallback) {
resizeObserverCallback = callback;
}
observe() {}
unobserve() {}
disconnect() {}
}
vi.stubGlobal("ResizeObserver", MockResizeObserver);
vi.spyOn(window, "requestAnimationFrame").mockImplementation((callback) => {
revealFrame = callback;
return 1;
@@ -232,7 +245,9 @@ describe("ChatList", () => {
return rect({ left: 0, top: 0, width: 300, height: 200 });
}
if (this.getAttribute("data-chat-row") === "websocket:active") {
return rect({ left: 8, top: 12, width: 284, height: 32 });
return activeTargetVisible
? rect({ left: 8, top: 12, width: 284, height: 32 })
: rect({ left: 0, top: 0, width: 0, height: 0 });
}
if (this.getAttribute("data-chat-row") === "websocket:inactive") {
return rect({ left: 8, top: 48, width: 284, height: 40 });
@@ -253,30 +268,26 @@ describe("ChatList", () => {
};
const { rerender } = render(
<ChatList
{...props}
activeKey={null}
/>,
);
const highlight = screen.getByTestId("active-chat-highlight");
const surface = screen.getByTestId("active-chat-highlight-surface");
expect(surface).toHaveClass(
"bg-sidebar-foreground/[0.055]",
"transition-[opacity,transform]",
"motion-reduce:transition-none",
);
expect(surface).toHaveStyle("opacity: 0; transform: scale(0.97)");
rerender(
<ChatList
{...props}
activeKey="websocket:active"
/>,
);
const highlight = screen.getByTestId("sessions-selection-highlight");
expect(highlight).toHaveClass(
"bg-sidebar-foreground/[0.055]",
"transition-[transform,width,height]",
"motion-reduce:transition-none",
);
expect(screen.queryByTestId("sessions-selection-highlight-surface"))
.not.toBeInTheDocument();
expect(resizeObserverCallback).not.toBeNull();
const activeButton = screen.getByTitle("Active topic");
expect(activeButton).toHaveAttribute("aria-current", "page");
expect(activeButton.parentElement).toHaveClass("transition-[color]");
expect(activeButton.parentElement).not.toHaveClass("transition-colors");
expect(activeButton.parentElement).not.toHaveClass(
"bg-sidebar-accent",
"shadow-[inset_0_0_0_1px_hsl(var(--sidebar-border)/0.55)]",
@@ -286,13 +297,23 @@ describe("ChatList", () => {
"motion-reduce:transition-none",
);
expect(highlight).toHaveStyle(
"width: 284px; height: 32px; transform: translate3d(8px, 12px, 0); transition-property: none",
"width: 284px; height: 32px; transform: translate3d(8px, 12px, 0); opacity: 1; transition-property: none",
);
expect(surface).toHaveStyle("opacity: 1; transform: scale(1)");
revealFrame?.(0);
expect(highlight.style.transitionProperty).toBe("");
activeTargetVisible = false;
resizeObserverCallback?.([], {} as ResizeObserver);
expect(highlight).toHaveStyle("opacity: 0");
activeTargetVisible = true;
resizeObserverCallback?.([], {} as ResizeObserver);
expect(highlight).toHaveStyle(
"width: 284px; height: 32px; transform: translate3d(8px, 12px, 0); opacity: 1; transition-property: none",
);
revealFrame?.(0);
rerender(
<ChatList
{...props}
@@ -305,6 +326,9 @@ describe("ChatList", () => {
expect(highlight).toHaveStyle(
"width: 284px; height: 40px; transform: translate3d(8px, 48px, 0)",
);
rerender(<ChatList {...props} activeKey={null} />);
expect(highlight).toHaveStyle("opacity: 0");
});
it("can collapse a project group and keeps project rename separate from chat titles", async () => {
+84 -5
View File
@@ -236,6 +236,72 @@ const LOCALIZED_CHANNEL_SHELL_KEYS = [
"settings.channels.validation.unsupported",
"settings.channels.validationFailed",
];
const LOCALIZED_NEW_SURFACE_KEYS = [
"chat.activity.running",
"chat.activity.complete",
"chat.activity.updated",
"chat.pin",
"chat.unpin",
"chat.rename",
"chat.renameProjectTitle",
"chat.renameProjectDescription",
"chat.renameProjectPlaceholder",
"chat.renameSave",
"chat.archive",
"chat.unarchive",
"chat.showArchived",
"chat.hideArchived",
"chat.groups.pinned",
"chat.groups.projects",
"chat.groups.today",
"chat.groups.yesterday",
"chat.groups.earlier",
"chat.groups.archived",
"thread.promptNavigator.railAria",
"thread.composer.mentions.cliTitle",
"thread.composer.mentions.mcpTitle",
"message.openLink",
"message.openAttachment",
"message.skill",
"settings.channels.connectionChecks",
"settings.channels.open",
];
const ACCIDENTALLY_SPANISH_SETTINGS_KEYS = [
"settings.help.provider",
"settings.help.configPath",
"settings.help.selectedPreset",
"settings.help.maxResults",
"settings.help.timeout",
"settings.help.jinaReader",
"settings.help.imageGeneration",
"settings.help.imageProvider",
"settings.help.imageProviderStatus",
"settings.help.imageModel",
"settings.help.defaultAspectRatio",
"settings.help.timezone",
"settings.help.securityManagedControls",
"settings.help.selectedModelProvider",
"settings.help.selectedModelValue",
"settings.help.cliAppsCatalog",
"settings.help.cliAppsFilter",
"settings.help.logs",
"settings.help.diagnostics",
"settings.help.localServiceAccessNative",
"settings.help.webuiDefaultAccessNative",
"settings.status.savedRestart",
"settings.status.restartAfterSaving",
"settings.status.savedRestartApply",
"settings.status.imageProviderRestart",
"settings.status.hostRestartAfterSaving",
"settings.status.hostRestartPending",
"settings.status.hostApiUnavailable",
"settings.status.logsOpened",
"settings.status.logsOpenFailed",
"settings.status.diagnosticsExported",
"settings.status.diagnosticsExportFailed",
"settings.image.missingCredential",
"settings.oauth.signInHelp",
];
const INDEX_HTML = readFileSync(resolve(process.cwd(), "index.html"), "utf8");
const PREBOOT_SCRIPT = INDEX_HTML.match(
/<script>\s*(\(function \(\) \{\s*var localeKey = "nanobot\.locale";[\s\S]*?\}\)\(\);)\s*<\/script>/,
@@ -479,6 +545,7 @@ describe("webui i18n", () => {
...LOCALIZED_SETTINGS_COPY_KEYS,
...LOCALIZED_WORKSPACE_COPY_KEYS,
...LOCALIZED_CHANNEL_SHELL_KEYS,
...LOCALIZED_NEW_SURFACE_KEYS,
].filter(
(key) => current.get(key) === english.get(key),
);
@@ -490,10 +557,10 @@ describe("webui i18n", () => {
it("keeps Simplified Chinese settings overview copy localized", () => {
const settings = resources["zh-CN"].common.settings;
expect(settings.nav.browser).toBe("网");
expect(settings.sections.webSearch).toBe("网搜索");
expect(settings.byok.tabs.webSearch).toBe("网搜索");
expect(settings.overview.webSearch).toBe("网搜索");
expect(settings.nav.browser).toBe("网");
expect(settings.sections.webSearch).toBe("网搜索");
expect(settings.byok.tabs.webSearch).toBe("网搜索");
expect(settings.overview.webSearch).toBe("网搜索");
expect(settings.overview.workspace).toBe("工作区");
expect(settings.skills.installedTab).toBe("已安装");
expect(settings.skills.discoverTab).toBe("发现");
@@ -503,6 +570,18 @@ describe("webui i18n", () => {
expect(settings.skills.marketplaceTrendingTitle).toBe("各市场热门技能");
});
it("keeps Indonesian and Vietnamese settings free of copied Spanish help text", () => {
const spanish = flattenResource(resources.es.common);
for (const locale of ["id", "vi"] as const) {
const current = flattenResource(resources[locale].common);
const copied = ACCIDENTALLY_SPANISH_SETTINGS_KEYS.filter(
(key) => current.get(key) === spanish.get(key),
);
expect({ locale, copied }).toEqual({ locale, copied: [] });
}
});
it("keeps Brazilian Portuguese settings overview copy localized", () => {
const settings = resources["pt-BR"].common.settings;
const sidebar = resources["pt-BR"].common.sidebar;
@@ -514,6 +593,6 @@ describe("webui i18n", () => {
expect(settings.sections.webSearch).toBe("Busca na web");
expect(settings.byok.tabs.webSearch).toBe("Busca na web");
expect(settings.overview.webSearch).toBe("Busca na web");
expect(settings.overview.workspace).toBe("Workspace");
expect(settings.overview.workspace).toBe("Espaço de trabalho");
});
});
+39
View File
@@ -374,6 +374,45 @@ describe("MessageBubble", () => {
);
});
it("falls back to the assistant creation time when replay has no completion time", () => {
const createdAt = Date.UTC(2026, 6, 25, 12, 34, 56);
const { container } = render(
<MessageBubble
message={{
id: "a-created-at",
role: "assistant",
content: "Proactive answer",
createdAt,
}}
/>,
);
const time = container.querySelector("[data-message-timestamp]");
expect(time).toHaveTextContent(formatMessageEndTime(createdAt));
expect(time).toHaveAttribute("dateTime", new Date(createdAt).toISOString());
expect(time).toHaveAttribute("title", fmtDateTime(createdAt));
expect(time).not.toHaveAttribute("data-assistant-completed-at");
});
it("renders the creation time for user messages", () => {
const createdAt = Date.UTC(2026, 6, 25, 12, 34, 56);
const { container } = render(
<MessageBubble
message={{
id: "u-created-at",
role: "user",
content: "A user message",
createdAt,
}}
/>,
);
const time = container.querySelector("[data-message-created-at]");
expect(time).toHaveTextContent(formatMessageEndTime(createdAt));
expect(time).toHaveAttribute("dateTime", new Date(createdAt).toISOString());
expect(time).toHaveAttribute("title", fmtDateTime(createdAt));
});
it("does not infer completion time from the assistant creation timestamp", () => {
const createdAt = Date.UTC(2026, 6, 25, 12, 34, 0);
const latencyMs = 13_000;
@@ -113,6 +113,43 @@ describe("SessionInfoPopover", () => {
expect(screen.queryByText(/ago/i)).not.toBeInTheDocument();
});
it("shows the actual message received by a local trigger", async () => {
vi.stubGlobal(
"fetch",
vi.fn().mockResolvedValue(
automationsResponse([
{
id: "trg_123",
name: "PR monitor",
enabled: true,
kind: "local_trigger",
schedule: { kind: "local" },
payload: {
kind: "local_trigger",
message: "Review PR #4591",
command: 'nanobot trigger trg_123 "message"',
},
state: { pending: false },
},
]),
),
);
const user = userEvent.setup();
render(
<SessionInfoPopover
sessionKey="websocket:chat-1"
token="tok"
title="Release work"
/>,
);
await user.click(screen.getByRole("button", { name: "Session details" }));
expect(await screen.findByText("Review PR #4591")).toBeInTheDocument();
expect(screen.queryByText('nanobot trigger trg_123 "message"')).not.toBeInTheDocument();
});
it("refreshes while open so completed one-shot automations disappear", async () => {
vi.stubGlobal(
"fetch",
-2
View File
@@ -30,8 +30,6 @@ function settingsPayload(): SettingsPayload {
temperature: 0.1,
reasoning_effort: null,
timezone: "UTC",
bot_name: "nanobot",
bot_icon: "nb",
tool_hint_max_length: 40,
},
model_presets: [{
+62
View File
@@ -336,6 +336,41 @@ function longPress(badge: HTMLElement, pointerId = 7) {
}
describe("ThreadComposer", () => {
it("dismisses the touch keyboard after a successful send", async () => {
vi.stubGlobal("matchMedia", vi.fn((query: string) => ({
matches: query === "(hover: none) and (pointer: coarse)",
media: query,
onchange: null,
addEventListener: vi.fn(),
removeEventListener: vi.fn(),
dispatchEvent: vi.fn(),
})));
const onSend = vi.fn();
render(
<ThreadComposer
onSend={onSend}
placeholder="Type your message..."
/>,
);
const input = screen.getByLabelText("Message input");
await act(async () => {
await new Promise<void>((resolve) => requestAnimationFrame(() => resolve()));
});
expect(input).not.toHaveFocus();
input.focus();
expect(input).toHaveFocus();
fireEvent.change(input, { target: { value: "hello from mobile" } });
fireEvent.click(screen.getByRole("button", { name: "Send message" }));
await act(async () => {
await new Promise<void>((resolve) => requestAnimationFrame(() => resolve()));
});
expect(onSend).toHaveBeenCalledWith("hello from mobile", undefined, undefined);
expect(input).toHaveValue("");
expect(input).not.toHaveFocus();
});
it("focuses and sends a removable quoted answer excerpt", async () => {
const onSend = vi.fn();
const onQuotedContextChange = vi.fn();
@@ -406,6 +441,33 @@ describe("ThreadComposer", () => {
expect(input.parentElement?.parentElement?.className).toContain("max-w-[58rem]");
});
it("defers textarea autosizing until IME composition commits", () => {
render(
<ThreadComposer
onSend={vi.fn()}
placeholder="Type your message..."
/>,
);
const input = screen.getByLabelText("Message input") as HTMLTextAreaElement;
Object.defineProperty(input, "scrollHeight", {
configurable: true,
value: 120,
});
input.style.height = "50px";
fireEvent.input(input, {
target: { value: "zhongwen" },
isComposing: true,
});
expect(input.style.height).toBe("50px");
fireEvent.input(input, {
target: { value: "中文" },
isComposing: false,
});
expect(input.style.height).toBe("120px");
});
it("lets long model preset labels use their intrinsic width", () => {
render(
<ThreadComposer
+54
View File
@@ -410,6 +410,9 @@ describe("ThreadMotionCoordinator", () => {
expect(camera.jumpTo).toHaveBeenCalledWith(780);
coordinator.takeUserControl();
expect(coordinator.observeScroll(true)).toBe("user");
expect(coordinator.snapshot().mode).toBe("browsing-history");
expect(coordinator.observeScroll(false)).toBe("user");
expect(coordinator.snapshot().mode).toBe("browsing-history");
@@ -417,6 +420,57 @@ describe("ThreadMotionCoordinator", () => {
expect(coordinator.snapshot().mode).toBe("anchor-prompt");
});
it("resumes shallow history browsing when user intent turns toward latest", () => {
const {
camera,
coordinator,
advanceFrame,
} = motionHarness({
scrollTop: 1_400,
});
coordinator.updateTurn({
id: "turn-1",
promptId: "prompt-1",
hasOutput: true,
});
advanceFrame();
camera.followTo.mockClear();
coordinator.handleUserScrollIntent(true);
expect(coordinator.observeScroll(true)).toBe("user");
advanceFrame();
expect(camera.followTo).not.toHaveBeenCalled();
coordinator.handleUserScrollIntent(true, true);
expect(coordinator.observeScroll(true)).toBe("automatic");
expect(coordinator.snapshot().mode).toBe("follow-output");
advanceFrame();
expect(camera.followTo).toHaveBeenCalledWith(1_400);
});
it("resumes shallow history browsing from forward intent at the boundary", () => {
const {
advanceFrame,
coordinator,
onAutoFollow,
} = motionHarness({
scrollTop: 1_400,
});
coordinator.updateTurn({
id: "turn-1",
promptId: "prompt-1",
hasOutput: true,
});
advanceFrame();
coordinator.handleUserScrollIntent(true);
expect(coordinator.observeScroll(true)).toBe("user");
coordinator.handleUserScrollIntent(false, true);
expect(coordinator.snapshot().mode).toBe("follow-output");
expect(onAutoFollow).toHaveBeenCalledTimes(1);
});
it("preserves history browsing when an active turn is cleared", () => {
const {
camera,
-2
View File
@@ -309,8 +309,6 @@ function modelSettings(model: string, provider: string): SettingsPayload {
temperature: 0.7,
reasoning_effort: null,
timezone: "UTC",
bot_name: "nanobot",
bot_icon: "",
tool_hint_max_length: 40,
},
model_presets: [{
+125
View File
@@ -763,6 +763,101 @@ describe("ThreadViewport", () => {
}
});
it("keeps shallow wheel and touch scrolling user-owned until intent reverses", async () => {
const followTo = vi.spyOn(ThreadCameraController.prototype, "followTo");
const threaded: UIMessage[] = [
{ id: "u1", role: "user", content: "old question", turnId: "turn-1", createdAt: 1 },
{ id: "a1", role: "assistant", content: "old answer", turnId: "turn-1", createdAt: 2 },
{ id: "u2", role: "user", content: "new question", turnId: "turn-2", createdAt: 3 },
];
const answer: UIMessage = {
id: "a2",
role: "assistant",
content: "streaming answer",
turnId: "turn-2",
isStreaming: true,
createdAt: 4,
};
const { container, rerender } = render(
<ThreadViewport
messages={threaded}
isStreaming
composer={<div>composer</div>}
/>,
);
const scroller = getScroller(container);
Object.defineProperties(scroller, {
scrollHeight: { configurable: true, value: 1_904 },
clientHeight: { configurable: true, value: 500 },
scrollTop: { configurable: true, writable: true, value: 1_404 },
});
const prompt = container.querySelector<HTMLElement>('[data-user-prompt-id="u2"]');
expect(prompt).not.toBeNull();
Object.defineProperty(prompt, "offsetTop", {
configurable: true,
value: 1_420,
});
rerender(
<ThreadViewport
messages={[...threaded, answer]}
isStreaming
composer={<div>composer</div>}
activeTurnId="turn-2"
activeTurnStartedHere
/>,
);
await flushAnimationFrame();
followTo.mockClear();
act(() => {
fireEvent.wheel(scroller, { deltaY: -24 });
scroller.scrollTop = 1_380;
scroller.dispatchEvent(new Event("scroll"));
});
await flushAnimationFrame();
expect(followTo).not.toHaveBeenCalled();
expect(scroller.scrollTop).toBe(1_380);
expect(screen.getByRole("button", { name: "Scroll to bottom" })).toBeInTheDocument();
act(() => {
scroller.scrollTop = 1_404;
scroller.dispatchEvent(new Event("scroll"));
fireEvent.wheel(scroller, { deltaY: 24 });
});
await flushAnimationFrame();
expect(followTo).toHaveBeenCalledWith(1_404);
expect(scroller.scrollTop).toBe(1_404);
expect(screen.queryByRole("button", { name: "Scroll to bottom" }))
.not.toBeInTheDocument();
followTo.mockClear();
act(() => {
fireEvent.touchStart(scroller, { touches: [{ clientY: 300 }] });
fireEvent.touchMove(scroller, { touches: [{ clientY: 324 }] });
scroller.scrollTop = 1_380;
scroller.dispatchEvent(new Event("scroll"));
});
await flushAnimationFrame();
expect(followTo).not.toHaveBeenCalled();
expect(screen.getByRole("button", { name: "Scroll to bottom" })).toBeInTheDocument();
act(() => {
fireEvent.touchMove(scroller, { touches: [{ clientY: 300 }] });
scroller.scrollTop = 1_404;
scroller.dispatchEvent(new Event("scroll"));
fireEvent.touchEnd(scroller);
});
await flushAnimationFrame();
expect(followTo).toHaveBeenCalledWith(1_404);
expect(screen.queryByRole("button", { name: "Scroll to bottom" }))
.not.toBeInTheDocument();
});
it("keeps the scroll-to-bottom button above a growing composer", async () => {
const resizeObserver = stubResizeObserver();
@@ -1021,6 +1116,36 @@ describe("ThreadViewport", () => {
}
});
it("restores thread scroll after the textarea autosize measurement collapses it", () => {
let scroller: HTMLElement | null = null;
const { container } = render(
<ThreadViewport
messages={messages}
isStreaming={false}
composer={(
<textarea
aria-label="Message input"
onInput={() => {
if (scroller) scroller.scrollTop = 692;
}}
/>
)}
/>,
);
scroller = getScroller(container);
Object.defineProperty(scroller, "scrollTop", {
configurable: true,
writable: true,
value: 700,
});
fireEvent.input(screen.getByLabelText("Message input"), {
target: { value: "中文" },
});
expect(scroller.scrollTop).toBe(700);
});
it("keeps the thread scrollport above a mobile soft keyboard", async () => {
const visualViewport = stubVisualViewport({ innerHeight: 800, height: 480 });
try {
+1 -1
View File
@@ -685,7 +685,7 @@ describe("useSessions", () => {
"tok",
"websocket:paged",
expect.objectContaining({
limit: 160,
limit: 80,
direction: "latest",
signal: expect.any(AbortSignal),
}),