Commit Graph

5 Commits

Author SHA1 Message Date
Mason Daugherty b1600a8da7 feat(code): /tools slash command (#4649)
Deep Agents Code now supports `/tools`, which lists the built-in and MCP
tools available to the current agent.

---

Adds an interactive `/tools` slash command to the `deepagents-code` TUI
so users can see the tools available to the current agent, grouped into
built-in tools and tools from each MCP server. MCP servers that are
disabled, need login, or failed to load are shown separately instead of
disappearing from the list.

For managed sessions, built-in tools are enumerated off the UI thread
with a credential-free agent compile. For preconfigured local agents,
`/tools` inspects the active graph directly so custom tool sets remain
authoritative. When a custom or remote agent cannot be inspected, the
command explains that limitation rather than incorrectly reporting that
no tools are available.

MCP entries reuse the metadata loaded for the running agent instead of
starting discovery inside Textual's live event loop. If `/mcp`
configuration changes are waiting for a reconnect, `/tools` keeps using
the pre-change snapshot so its output continues to match the tools the
agent can currently invoke.

The catalog is rendered as a chat message, like `/tokens`, and is
discoverable through `/help`, command completion, and a startup tip.

Made by [Open
SWE](https://openswe.vercel.app/agents/626ca1ec-726e-58e8-7dae-4e85363c953d)

## References

- Plan:
https://openswe.vercel.app/agents/626ca1ec-726e-58e8-7dae-4e85363c953d/plan

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-07-13 03:13:37 -04:00
Mason Daugherty 4d2aa8a968 fix(code): infer Fireworks provider from qualified model IDs (#4594)
Deep Agents Code now preserves the Fireworks provider when `/model`
receives a fully qualified Fireworks model or router ID, so the switch
confirmation and status bar display the provider correctly.

---

Switching models with a fully qualified Fireworks ID such as `/model
accounts/fireworks/models/kimi-k2p7-code` succeeded because LangChain
inferred the provider during model initialization. Deep Agents Code did
not make the same inference beforehand, though, so it lost the provider
name: the switch confirmation showed only the raw ID and the status bar
omitted the `fireworks:` prefix.

`detect_provider` now recognizes the broad `accounts/fireworks/` stem,
matching LangChain's inference for both model and router IDs. The
existing, narrower model and router prefixes remain responsible for
shortening those IDs in the status bar and classifying reasoning-effort
support.

Made by [Open
SWE](https://openswe.vercel.app/agents/1f74e649-60d9-d586-f671-41b471b5a5d8)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-07-13 01:50:31 -04:00
Mason Daugherty 1c08d2705f feat(code): support Fireworks /routers model ids (#4591)
Fireworks router model ids (`accounts/fireworks/routers/...`) now
display compactly in the status bar and support `/effort` reasoning
controls, matching individual Fireworks model ids.

---

Fireworks exposes two fully-qualified model-id forms: individual models
(`accounts/fireworks/models/...`) and routers that dispatch across
models (`accounts/fireworks/routers/...`, e.g.
`accounts/fireworks/routers/glm-5p1-fast`; see
[models.dev](https://models.dev/providers/fireworks-ai/)). Previously
only the `models/` form was recognized, so router ids rendered with the
full prefix in the status bar and never qualified for reasoning-effort
controls.

This teaches the two places that key off the qualified prefix to accept
both forms:

- `ModelLabel`'s `PROVIDER_PREFIX_STRIPS` now strips the `routers/`
prefix for compact status-bar display.
- `_classify_reasoning_provider` gates `/effort` on a shared
`_FIREWORKS_MODEL_ID_PREFIXES` tuple covering both forms, so router
models get the same family-based effort support as individual models.

The model-family logic (Kimi/GLM/DeepSeek) is substring-based and
already works for either form.

Made by [Open
SWE](https://openswe.vercel.app/agents/29503e81-c1ee-65e7-b10d-56661b75aa89)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-07-11 19:32:08 -04:00
Mason Daugherty 68fa0cb4d4 fix(code): hide [SYSTEM] interrupt notices from /threads prompt (#3988)
When a task is interrupted, dcode persists a synthetic `[SYSTEM] Task
interrupted by user.` `HumanMessage` into the thread's `messages`
channel. Because `_initial_prompt_from_messages` returned the first
human-typed message verbatim, this notice could surface as a thread's
prompt in the `/threads` selector instead of the user's real request.

The parser now skips `[SYSTEM]`-prefixed human messages and falls
through to the next genuine human message, mirroring the existing
`[SYSTEM]` filtering already done when rendering a loaded thread's
messages.

Made by [Open SWE](https://openswe.vercel.app)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-06-17 13:15:18 -04:00
Mason Daugherty 2ac7d41533 feat(code): port from libs/cli (#3388)
Release-As: 0.1.0
2026-05-12 20:45:09 +00:00