Skip to content

Fix general#144

Merged
snakajima merged 2 commits intomainfrom
fix_general
Mar 22, 2026
Merged

Fix general#144
snakajima merged 2 commits intomainfrom
fix_general

Conversation

@snakajima
Copy link
Copy Markdown
Contributor

@snakajima snakajima commented Mar 22, 2026

Address #123 by simplifying the "general" role by just providing "switchRole" tool.

Summary by CodeRabbit

Release Notes

  • New Features

    • System now displays available roles in instructions for easy role navigation and switching.
  • Changes

    • General role redesigned to focus on role selection with plugins in fixed mode.
    • Removed outdated informational text from the interface.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 22, 2026

📝 Walkthrough

Walkthrough

The general role's configuration was updated to disable plugin customization and restrict available plugins to only the switchRole plugin. Instructions now automatically enumerate available roles. Related sidebar UI messaging was removed, and debug logging was added to the instruction-building process.

Changes

Cohort / File(s) Summary
Role Configuration
src/config/roles.ts
Updated general role to disable plugin inclusion (includePluginPrompts: false), switch to fixed mode (pluginMode: "fixed"), and restrict availablePlugins to ["switchRole"]. Replaced prompt text with role-switching guidance.
Instruction Generation
src/composables/useUserPreferences.ts, src/composables/useTextSession.ts
Modified instruction composition to include enumerated role listing (role ID, name, and available alternatives) after role prompt. Added debug log to output computed system instructions.
User Interface
src/components/Sidebar.vue
Removed informational text prompting users to switch to General role for plugin customization.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 With whiskers twitching, roles now shine,
The general path is redefined—
A switchRole tool, like carrot fine,
To hop between roles, one at a time!
The roster glows where roles align. 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Fix general' is vague and does not clearly communicate the specific change being made. While it relates to modifications of the 'general' role, it lacks concreteness about what the fix entails. Use a more descriptive title that explains the change, such as 'Simplify general role with switchRole tool' or 'Replace general role behavior with switchRole plugin'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix_general

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.

Change the reviews.profile setting to assertive to make CodeRabbit's nitpick more issues in your PRs.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/composables/useTextSession.ts (1)

77-77: Consider removing or guarding this debug log before merging.

This console.log statement will output potentially large instruction strings on every session initialization, which may clutter production logs. As per coding guidelines: "Prefer the existing structured logging pattern and minimize use of console.* in committed code."

If needed for debugging, consider wrapping it in a debug flag or removing it before release.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/composables/useTextSession.ts` at line 77, Remove or guard the raw
console.log in useTextSession.ts that prints "instructions" to avoid noisy
production logs: locate the console.log("[useTextSession] instructions:",
instructions) in the useTextSession initialization and either delete it or wrap
it behind a debug/config flag (e.g., only log when DEBUG or a local dev flag is
true) or replace it with the structured logger used elsewhere (e.g.,
processLogger.debug or similar) so instruction strings are not unconditionally
emitted in production.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/composables/useTextSession.ts`:
- Line 77: Remove or guard the raw console.log in useTextSession.ts that prints
"instructions" to avoid noisy production logs: locate the
console.log("[useTextSession] instructions:", instructions) in the
useTextSession initialization and either delete it or wrap it behind a
debug/config flag (e.g., only log when DEBUG or a local dev flag is true) or
replace it with the structured logger used elsewhere (e.g., processLogger.debug
or similar) so instruction strings are not unconditionally emitted in
production.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 458168c1-264a-4899-8acb-fccfa27c5e48

📥 Commits

Reviewing files that changed from the base of the PR and between e4dfe26 and f2af2c2.

📒 Files selected for processing (4)
  • src/components/Sidebar.vue
  • src/composables/useTextSession.ts
  • src/composables/useUserPreferences.ts
  • src/config/roles.ts
💤 Files with no reviewable changes (1)
  • src/components/Sidebar.vue

@snakajima snakajima merged commit 4965871 into main Mar 22, 2026
9 checks passed
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.

1 participant