Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(providers): expose native slash commands across clients #11519

Mergedmaria-rcksmerged 5 commits intomain fromrefs/pull/11519/headmerged by maria-rcks View on GitHub

Showing 19 changed files with 56 additions and 32 deletions (loading 16).

x
0 of 19 viewed, 19 left
14 additions and 2 deletionsapps/mobile/src/features/threads/use-composer-command-menu.tsModified
View file
@@ -29,8 +29,10 @@
import {
dedupeProviderSkillsByName,
getProviderSkillsForSlashMenu,
+ getProviderSlashCommandsForSlashMenu,
isProviderSkillUserInvocable,
resolveProviderSkillsForCwd,
+ resolveProviderSlashCommandsForCwd,
} from "@t3tools/client-runtime/providerSkills";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
​
@@ -329,6 +331,7 @@
​
if (trigger.kind === "slash-command") {
const q = trigger.query.toLowerCase();
+ const visibleSkills = getProviderSkillsForSlashMenu(skills, true);
const commandItems = buildComposerSlashCommandItems({
query: q,
atMessageStart: trigger.rangeStart === 0,
@@ -336,10 +339,18 @@
hasCompactableConversation,
offersUsageLimits,
allowInteractionMode: onUpdateInteractionMode !== undefined,
- selectedProviderStatus,
+ selectedProviderStatus: selectedProviderStatus
+ ? {
+ ...selectedProviderStatus,
+ slashCommands: getProviderSlashCommandsForSlashMenu(