Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): hide invalid slash skill completions #8904

MergednateEc(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/8904/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 56 additions and 7 deletions.

x
0 of 3 viewed, 3 left
8 additions and 6 deletionsapps/web/src/components/chat/ChatComposer.tsxModified
View file
@@ -146,7 +146,10 @@
import { ComposerPlanFollowUpBanner } from "./ComposerPlanFollowUpBanner";
import { ComposerControl, ComposerControlIcon, ComposerSelectControl } from "./ComposerControl";
import { resolveComposerMenuActiveItemId } from "./composerMenuHighlight";
-import { searchSlashCommandItems } from "./composerSlashCommandSearch";
+import {
+ searchSlashCommandItems,
+ slashCommandItemsForPromptPosition,
+} from "./composerSlashCommandSearch";
import {
getComposerPromptInjectionState,
getComposerProviderState,
@@ -1360,11 +1363,10 @@
skill.description ??
(skill.scope ? `${skill.scope} skill` : ""),
- const slashCommandItems = [
- ...builtInSlashCommandItems,
- ...providerSlashCommandItems,
- ...skillItems,
- ];
+ const slashCommandItems = slashCommandItemsForPromptPosition(
+ [...builtInSlashCommandItems, ...providerSlashCommandItems, ...skillItems],
+ composerTrigger.rangeStart === 0,
+ );
return searchSlashCommandItems(slashCommandItems, query);
if (composerTrigger.kind === "skill") {