Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/9128/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 16 changed files with 128 additions and 2 deletions (loading 13).

x
0 of 16 viewed, 16 left
9 additions and 2 deletionsapps/mobile/src/features/threads/use-composer-command-menu.tsModified
View file
@@ -12,6 +12,7 @@
import {
dedupeProviderSkillsByName,
getProviderSkillsForSlashMenu,
+ isProviderSkillUserInvocable,
} from "@t3tools/client-runtime/providerSkills";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
​
@@ -114,8 +115,14 @@
(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 @@
​
if (trigger.kind === "skill") {
const enabledSkills = dedupeProviderSkillsByName(