Conversation
|
Hi! Friendly bump on this PR. The implementation is locally verified, but the required CI workflows are still waiting for maintainer approval. Could someone approve them and take a look when convenient? |
592ebb8 to
600aa5a
Compare
600aa5a to
d65e04a
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Related to #24990, #39033, and #33333.
Type of change
What does this PR do?
Adds a local CLI debug command:
The command prints the resolved effective system prompt for the current project, agent, and model. It supports optional
--agentand--modelflags.This is useful when debugging prompt-affecting customization layers such as
AGENTS.md,opencode.jsoninstructions, skills, MCP instructions, custom agents, andexperimental.chat.system.transformplugins.The implementation uses the same existing system prompt services used by normal request assembly:
SystemPrompt.provider(model)for the model-family base promptSystemPrompt.environment(model)for environment contextInstruction.system()forAGENTS.mdand configured instruction filesSystemPrompt.mcp(agent)for MCP instructionsSystemPrompt.skills(agent)for the available skills blockexperimental.chat.system.transformfor plugin transformationsThis is intentionally narrower than a full context dump or export feature. It does not persist anything to
opencode.db, does not change transcript export behavior, does not add a TUI surface, and does not dump the full request/message array.How did you verify your code works?
bun typecheckinpackages/opencodebun --conditions=browser ./src/index.ts debug prompt --helpbun --conditions=browser ./src/index.ts --pure debug prompt --model opencode/big-picklebun run build --single --skip-install --skip-embed-web-uidist/opencode-darwin-arm64/bin/opencode --versiondist/opencode-darwin-arm64/bin/opencode debug prompt --helpbun turbo typechecksuccessfullyScreenshots / recordings
N/A. CLI-only change.
Checklist