Skip to content

feat(agents): open an agent chat in a project, defaulting to the agent's own - #453

Merged
edenreich merged 1 commit into
mainfrom
feat/agent-project
Nov 7, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/agent-project

Conversation

@edenreich

@edenreich edenreich commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An agent chat can now open in a project. The agent editor gets an optional Project dropdown, which defaults to No project. When you pick an agent, its new chat opens in that project. A folder button in the bar above the composer switches the project, or clears it, before the first message. The bar reads code-reviewer (<project>), or just code-reviewer with no project.

The thread, prompts and persistence already handled a chat with both an agent and a project. Only the selection rules and the bar kept them apart.

Changes

  • backend/src/markdown_agents.rs: project is a desktop-only frontmatter key, like workspace. It is managed by the editor and omitted when blank. The round-trip test now covers both keys.
  • frontend/lib/agents.ts: agentDefaultProject returns the agent's project while that project still exists, else none. Covered by a bun test.
  • frontend/store.tsx: selectAgent opens a new agent chat in the agent's default project instead of clearing the project. Re-selecting the agent of the open chat leaves that chat's project alone. saveAgent passes the saved agent's default, since its agents closure is stale right after reload.
  • frontend/components/AgentEditor.tsx: an optional #agent-project select. A saved project that no longer exists shows as "(missing)".
  • frontend/components/Composer.tsx: the agent bar shows agent (project). A new AgentProjectMenu (Choose agent project, No project, Use project <name>) follows the MoveToWorkspace button-menu pattern, because the AX e2e driver cannot drive a native select.
  • AGENTS.md: the DOM contract lists the new id and button names.
  • e2e: a project_agent seed (agent defaulting to the test's content_project) and tests/agent-project.yaml, which checks the default, overrides it and sends.

Not in this PR: queued prompts and monitor-send re-send without the chat's agent (store.tsx sendPrompt(id, text, projects[id])). That bug already affects every agent chat and gets its own PR.

Docs follow-up: inference-gateway/docs#1122

@edenreich
edenreich marked this pull request as ready for review November 7, 2026 20:43
@edenreich
edenreich merged commit 87b697a into main Nov 7, 2026
1 check passed
@edenreich
edenreich deleted the feat/agent-project branch November 7, 2026 20:44
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.56.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant