Skip to content

feat(ui): add /agents command to show loaded AGENTS.md instruction files (#262) - #287

Open
innocarpe wants to merge 1 commit into
lessweb:mainfrom
innocarpe:feat/262-agents-command
Open

feat(ui): add /agents command to show loaded AGENTS.md instruction files (#262)#287
innocarpe wants to merge 1 commit into
lessweb:mainfrom
innocarpe:feat/262-agents-command

Conversation

@innocarpe

Copy link
Copy Markdown

Summary

  • New /agents slash command reports which AGENTS.md instruction files exist and which one is actually loaded into the system prompt.

Why

Issue #262: users had no way to tell whether their AGENTS.md instructions were being picked up — project-level (./.deepcode/AGENTS.md./AGENTS.md) and user-level (~/.deepcode/AGENTS.md) files are all silently merged/selected by precedence. This command makes the effective instruction source visible.

Example output

Agent instructions loaded from ./.deepcode/AGENTS.md
./.deepcode/AGENTS.md — loaded
./AGENTS.md — present
~/.deepcode/AGENTS.md — not found

Changes

  • packages/core/src/session.ts: add getAgentInstructionSources() returning each candidate path with exists / loaded status (project files take precedence over the user file).
  • packages/cli/src/ui/core/agent-instructions.ts (new): buildAgentInstructionsReport() renders the human-readable report.
  • packages/cli/src/ui/core/slash-commands.ts + PromptInput.tsx + App.tsx: register and wire the /agents command.
  • Tests: agent-instructions.test.ts (report), slash-commands.test.ts (registry).

Validation

  • npm run typecheck
  • npm test — new tests pass ✅

Closes #262

…les (lessweb#262)

The /agents slash command reports which instruction files exist (./.deepcode/AGENTS.md, ./AGENTS.md, ~/.deepcode/AGENTS.md) and which one is actually loaded into the system prompt, so users can verify agent instructions are being applied.

(cherry picked from commit 1f011799cb6af63a691fa1b15eb0aecbc680ab7e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

看不到deepcode加载agents.md文件

1 participant