Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(skills): distinguish skills with the same name #11166

Closedfloklein(GitHub profile, opens in a new tab)wants to merge 9 commits intomain fromrefs/pull/11166/headopened View on GitHub

Showing 43 changed files with 56 additions and 18 deletions (loading 40).

x
0 of 43 viewed, 43 left
26 additions and 0 deletionsapps/mobile/src/features/threads/use-composer-command-menu.test.tsModified
View file
@@ -1,5 +1,7 @@
import { describe, expect, it, vi } from "vite-plus/test";
import { ProviderDriverKind } from "@t3tools/contracts";
+import { collectSkillReferences } from "@t3tools/shared/composerInlineTokens";
+​
vi.mock("react-native", () => ({ Alert: { alert: vi.fn() } }));
​
vi.mock("../../state/queries", () => ({
@@ -24,6 +26,30 @@
} from "./use-composer-command-menu";
​
describe("mobile slash commands", () => {
+ it.each(["$code", "/skill:code"])(
+ "preserves the selected skill source from %s",
+ (draftMessage) => {
+ const skill = {
+ name: "code-review",
+ path: "/personal/My Skills/code-review/SKILL.md",
+ enabled: true,
+ };
+ const result = resolveComposerCommandSelection({
+ draftMessage,
+ trigger: { rangeStart: 0, rangeEnd: draftMessage.length },
+ allowInteractionMode: false,
+ item: {
+ id: "personal-review",
+ type: "skill",
+ skill,
+ label: "Code Review",
+ description: "Standards and spec",