feat: Introduce /init command for generating agent collab file (AGENTS.md)#643
feat: Introduce /init command for generating agent collab file (AGENTS.md)#643yanurag-dev wants to merge 4 commits intotruffle-ai:mainfrom
Conversation
…just command imports - Removed redundant user message display for executed commands in OverlayContainer. - Added handling for non-streaming commands to show user messages. - Updated command import path in general-commands for consistency. - Removed logging of command execution results in executeCommand function.
|
@yanurag-dev is attempting to deploy a commit to the Shaunak's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughRemoves a comment in the CLI config, adds an OverlayContainer prop to route prompt commands into the InputContainer pipeline, updates OverlayContainer callbacks, and introduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OverlayContainer
participant InputContainer
participant StreamingPipeline
User->>OverlayContainer: invoke command (e.g. /init)
OverlayContainer->>OverlayContainer: determine result.type === 'sendMessage'
alt onSubmitPromptCommand provided
OverlayContainer->>InputContainer: call onSubmitPromptCommand(commandText)
InputContainer->>StreamingPipeline: start streaming pipeline for prompt
StreamingPipeline-->>InputContainer: stream tokens / events
InputContainer-->>OverlayContainer: update UI with stream
else fallback (no callback)
OverlayContainer->>OverlayContainer: create local user message and append to UI
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cli/src/index-main.ts`:
- Around line 840-853: The CLI's DEXTO_LOG_LEVEL parsing is only applied in the
top-level main path; extract that logic into a shared resolver function (e.g.,
resolveDextoLogLevel or getEnvLogLevel) and replace the inline parsing with a
call to it where you build agent config (the enrichAgentConfig call) and inside
bootstrapAgentFromGlobalOpts so both call sites use the same resolved logLevel
instead of hardcoded 'info'/'error'; ensure the resolver reads
process.env.DEXTO_LOG_LEVEL, normalizes to lowercase, validates against
['debug','info','warn','error'], and returns the validated level (default
'info') so enrichAgentConfig and bootstrapAgentFromGlobalOpts consume the same
value.
In `@packages/tui/src/containers/OverlayContainer.tsx`:
- Around line 1255-1263: The code routes the literal commandText to
onSubmitPromptCommand, which re-submits the slash command instead of the
resolved prompt; change the call to pass the resolved payload
(result.messageToSend) so the generated prompt is submitted: await
onSubmitPromptCommand(result.messageToSend). Also ensure the no-callback path is
not a no-op—if onSubmitPromptCommand is undefined, forward result.messageToSend
into the existing InputContainer send pipeline (the same flow used for normal
user messages) so the resolved prompt is processed even without a callback.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d7958f9a-c074-40aa-acfe-aa77d1b8f490
📒 Files selected for processing (3)
packages/cli/src/index-main.tspackages/tui/src/containers/OverlayContainer.tsxpackages/tui/src/interactive-commands/general-commands.ts
- Remove env var parsing from index-main.ts (factory.ts already handles DEXTO_LOG_LEVEL internally) - Add changeset for /init command
Release Note
pnpm changeset(select packages + bump)Summary by CodeRabbit
New Features
/initcommand to analyze the codebase and generate or improve AGENTS.md documentation.Improvements