fix(claude): skills picked from the composer now run (#9128)

Co-authored-by: Rodrigo Brechard <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-09-01 17:44:13 -07:00
1 parent 9a7b1e21e5
commit ea71a19d41
16 files changed
+1080 -82

No files matched your search

@@ -12,6 +12,7 @@ import {
import {
dedupeProviderSkillsByName,
getProviderSkillsForSlashMenu,
isProviderSkillUserInvocable,
} from "@t3tools/client-runtime/providerSkills";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -114,8 +115,14 @@ export function useComposerCommandMenu({
(item.command === "model" || onUpdateInteractionMode !== undefined),
);
// A provider expands a slash command only when it opens the whole
// message; elsewhere it arrives as literal text. Built-ins apply
// locally and skills insert a `$` mention the server dispatches from
// any position, so only provider commands are position-gated.
const providerCommands: ComposerCommandItem[] = [];
for (const command of selectedProviderStatus?.slashCommands ?? []) {
const expandableCommands =
trigger.rangeStart === 0 ? (selectedProviderStatus?.slashCommands ?? []) : [];
for (const command of expandableCommands) {
if (!command.name.toLowerCase().includes(q)) continue;
// Codex feedback uploads an existing thread's session and logs.
if (
@@ -149,7 +156,7 @@ export function useComposerCommandMenu({
if (trigger.kind === "skill") {
const enabledSkills = dedupeProviderSkillsByName(
(selectedProviderStatus?.skills ?? []).filter((skill) => skill.enabled),
(selectedProviderStatus?.skills ?? []).filter(isProviderSkillUserInvocable),
);
const normalizedQuery = normalizeSearchQuery(trigger.query, {
trimLeadingPattern: /^\$+/,