Mirror: feat(slash-commands): type/source indicators (#5696)#39
Mirror: feat(slash-commands): type/source indicators (#5696)#39jeremylongshore wants to merge 1 commit intomainfrom
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ 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 |
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoEnhance slash commands with type indicators, source badges, skills, and argument hints
WalkthroughsDescription• Add type/source indicators to slash commands with color-coded badges • Integrate skills into slash command menu for discovery and invocation • Display argument hints as ghost text after skill command selection • Color-code slash command highlights in textarea by command type • Parse and propagate argument-hint from skill frontmatter metadata Diagramflowchart LR
A["Skill Metadata"] -->|argumentHint| B["SkillsManager"]
B -->|SkillInfo Array| C["parseKiloSlashCommands"]
C -->|skillsForMode| D["getSupportedSlashCommands"]
D -->|SlashCommand with type/source| E["SlashCommandMenu"]
E -->|Type Badges| F["UI Display"]
D -->|findSlashCommand| G["ChatTextArea"]
G -->|argumentHint| H["Ghost Text Hint"]
I["CSS Styles"] -->|Type Colors| F
I -->|Highlight Colors| G
File Changes1. webview-ui/src/utils/slash-commands.ts
|
|
Failed to generate code suggestions for PR |
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Code Review by Qodo
1. SlashCommandMenu inline style prop
|
| <span | ||
| className="text-[0.7em] px-1.5 py-0.5 rounded-sm leading-none" | ||
| style={{ | ||
| backgroundColor: getTypeBadgeColors(command.type).bg, | ||
| color: getTypeBadgeColors(command.type).text, | ||
| }}> |
There was a problem hiding this comment.
1. slashcommandmenu inline style prop 📘 Rule violation ✓ Correctness
New webview markup introduces an inline style={{ ... }} object for the type badge colors instead
of using Tailwind/CSS classes. This violates the repo requirement and can lead to inconsistent
styling patterns and theme compatibility issues.
Agent Prompt
## Issue description
New UI markup in `SlashCommandMenu` uses an inline `style={{ ... }}` object to color the type badge, but the repo requires using Tailwind classes (or established CSS classes) instead.
## Issue Context
The badge color is derived from `command.type`. You can keep dynamic behavior by mapping `SlashCommandType` to class strings (including Tailwind arbitrary values) or by defining CSS classes (e.g., `.slash-command-type-badge-command`) and applying them via `className`.
## Fix Focus Areas
- webview-ui/src/components/chat/SlashCommandMenu.tsx[105-110]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| const currentMode = await this.getTaskMode() | ||
| const skillsForMode = | ||
| this.providerRef.deref()?.getSkillsManager()?.getSkillsForMode(currentMode) ?? [] | ||
| const { processedText, needsRulesFileCheck: needsCheck } = await parseKiloSlashCommands( | ||
| parsedText.text, | ||
| localWorkflowToggles, | ||
| globalWorkflowToggles, | ||
| skillsForMode, |
There was a problem hiding this comment.
2. task.ts missing kilocode_change 📘 Rule violation ⛯ Reliability
New logic to fetch skillsForMode and pass it into parseKiloSlashCommands was added in an upstream-shared src/ file without surrounding kilocode_change markers. This increases the risk of merge conflicts during upstream syncs.
Agent Prompt
## Issue description
`src/core/task/Task.ts` was modified to include skills in slash-command parsing, but the new block is not marked with `kilocode_change` markers as required for upstream-shared files.
## Issue Context
This file is under `src/` (non-exempt) and must clearly mark Kilo-specific deltas to reduce upstream merge conflicts.
## Fix Focus Areas
- src/core/task/Task.ts[4127-4134]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| const typeBadgeColors: Record<string, { bg: string; text: string }> = { | ||
| command: { bg: "rgba(58, 150, 221, 0.15)", text: "rgba(58, 150, 221, 0.9)" }, | ||
| mode: { bg: "rgba(160, 100, 230, 0.15)", text: "rgba(160, 100, 230, 0.9)" }, | ||
| workflow: { bg: "rgba(80, 180, 100, 0.15)", text: "rgba(80, 180, 100, 0.9)" }, | ||
| skill: { bg: "rgba(220, 160, 50, 0.15)", text: "rgba(220, 160, 50, 0.9)" }, | ||
| } | ||
|
|
||
| const defaultBadgeColors = { bg: "rgba(128, 128, 128, 0.15)", text: "var(--vscode-descriptionForeground)" } | ||
|
|
||
| function getTypeBadgeColors(type?: SlashCommandType): { bg: string; text: string } { | ||
| return (type && typeBadgeColors[type]) || defaultBadgeColors | ||
| } | ||
|
|
||
| function getSourceLabel(source?: SlashCommandSource): string | null { | ||
| switch (source) { | ||
| case "project": | ||
| return "project" | ||
| case "global": | ||
| return "global" | ||
| case "organization": | ||
| return "org" | ||
| case "built-in": | ||
| default: | ||
| return null | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
3. slashcommandmenu unmarked additions 📘 Rule violation ⛯ Reliability
New helper/constants for slash command type/source badges were added in an upstream-shared webview-ui/ file without kilocode_change markers. This makes future upstream merges more conflict-prone.
Agent Prompt
## Issue description
`webview-ui/src/components/chat/SlashCommandMenu.tsx` adds new type/source badge helper logic without `kilocode_change` markers, even though `webview-ui/` is upstream-shared.
## Issue Context
Marking Kilo-specific changes reduces merge conflicts during upstream sync.
## Fix Focus Areas
- webview-ui/src/components/chat/SlashCommandMenu.tsx[14-40]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| supportsPromptCache: false, | ||
| supportsNativeTools: true, | ||
| defaultToolProtocol: "native", | ||
| defaultToolProtocol: "native", |
There was a problem hiding this comment.
4. fireworks.ts missing marker 📘 Rule violation ⛯ Reliability
A change was made in an upstream-shared packages/ file without adding any kilocode_change marker. This can create avoidable conflicts when syncing with upstream.
Agent Prompt
## Issue description
`packages/types/src/providers/fireworks.ts` was modified without `kilocode_change` markers even though `packages/` is upstream-shared per policy.
## Issue Context
If the change is purely formatting, consider reverting it to avoid touching upstream-shared code. If it must remain, add a marker (inline or block start/end) around the changed lines.
## Fix Focus Areas
- packages/types/src/providers/fireworks.ts[206-247]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| const currentMode = await this.getTaskMode() | ||
| const skillsForMode = | ||
| this.providerRef.deref()?.getSkillsManager()?.getSkillsForMode(currentMode) ?? [] | ||
| const { processedText, needsRulesFileCheck: needsCheck } = await parseKiloSlashCommands( | ||
| parsedText.text, | ||
| localWorkflowToggles, | ||
| globalWorkflowToggles, | ||
| skillsForMode, | ||
| ) |
There was a problem hiding this comment.
5. Skills not passed to parser 🐞 Bug ✓ Correctness
Skill support was added to parseKiloSlashCommands, but the main request-time pipeline still calls parseKiloSlashCommands without providing skills, so skills defaults to an empty array and /skill never matches. Users can see skills in the UI but the backend won’t inject SKILL.md content for slash-invocation.
Agent Prompt
### Issue description
Skill slash commands rely on `parseKiloSlashCommands(..., skills)` but the main request-time pipeline does not pass skills, so `/skill` is never recognized.
### Issue Context
- `parseKiloSlashCommands` now supports `skills: SkillMetadata[]`.
- The main Task path uses `processKiloUserContentMentions`, which calls `parseKiloSlashCommands` without that argument.
### Fix Focus Areas
- src/core/task/Task.ts[2835-2861]
- src/core/mentions/processKiloUserContentMentions.ts[45-72]
- src/core/slash-commands/kilo.ts[27-95]
### Implementation sketch
1) In `Task.ts`, compute `currentMode` and `skillsForMode` (via `getSkillsManager().getSkillsForMode(currentMode)`), and pass them into `processKiloUserContentMentions`.
2) Extend `processKiloUserContentMentions` signature to accept `skills?: SkillMetadata[]` and forward it into `parseKiloSlashCommands`.
3) Add/adjust a unit test to cover `/some-skill` being expanded into `<explicit_instructions>` when skills are provided.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| synthetic: "Synthetic", | ||
| "sap-ai-core": "SAP AI Core", | ||
| baseten: "BaseTen", | ||
| apertis: "Apertis", // kilocode_change | ||
| corethink: "Corethink", | ||
| } |
There was a problem hiding this comment.
6. Cli maps missing apertis 🐞 Bug ✓ Correctness
The PR removes the apertis entries from CLI provider label/default-model/required-fields maps, but ProviderName still includes apertis. This likely causes TypeScript errors for Record<ProviderName, ...> (missing key) and/or breaks CLI behavior for the apertis provider.
Agent Prompt
### Issue description
CLI provider constants no longer define `apertis`, but the shared `ProviderName` still includes it. This breaks type completeness and can break runtime selection.
### Issue Context
`PROVIDER_LABELS`, `PROVIDER_DEFAULT_MODELS`, and `PROVIDER_REQUIRED_FIELDS` are typed as `Record<ProviderName, ...>`.
### Fix Focus Areas
- cli/src/constants/providers/labels.ts[1-56]
- cli/src/constants/providers/settings.ts[1095-1114]
- cli/src/constants/providers/validation.ts[40-57]
- packages/types/src/provider-settings.ts[48-62]
### Implementation sketch
Option A (likely intended): add back `apertis` entries in all three CLI maps:
- label: "Apertis"
- default model: align with shared defaults (e.g. `claude-sonnet-4-20250514`)
- required fields: align with provider settings schema (e.g. `apertisApiKey`, `apertisModelId`)
Option B (if deprecating apertis): remove `apertis` from shared ProviderName/provider lists and all extension/api handlers accordingly (larger change).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
@greptileai review |
|
Merged into |
Mirror of Kilo-Org#5696
This PR mirrors the upstream change for multi-AI review analysis.
Bot Review Tracker
Links