fix(composer): show project skills in menus #7909
Closedt3-code-bot[bot](GitHub profile, opens in a new tab)wants to merge 23 commits into
main fromfix/project-skills-menusopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/mobile/src/features/threads/ThreadComposer.tsx line 365OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -355,3 +358,8 @@355358 ) ?? null356359 );357360 }, [props.serverConfig, props.selectedThread.modelSelection.instanceId]);361+ const projectSkillsQuery = useEnvironmentQuery(362+ selectedProviderStatus && props.projectCwd363+ ? projectEnvironment.listSkills({364+ environmentId: props.environmentId,365+ input: { cwd: props.projectCwd, driver: selectedProviderStatus.driver },
- apps/web/src/components/chat/ChatComposer.tsx lines 1244 to 1245OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1224,4 +1240,6 @@12241240 ]);1225124112261242 const isComposerMenuLoading =1227- composerTriggerKind === "path" && pathTriggerQuery.length > 0 && workspaceEntries.isPending;1243+ (composerTriggerKind === "path" && pathTriggerQuery.length > 0 && workspaceEntries.isPending) ||1244+ ((composerTriggerKind === "skill" || composerTriggerKind === "slash-command") &&1245+ projectSkillsQuery.isPending);
- apps/mobile/src/features/threads/ThreadComposer.tsx line 800Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -794,4 +809,3 @@794809 ref={inputRef}795810 multiline796811 value={props.draftMessage}797- skills={selectedProviderStatus?.skills ?? []}apps/web/src/components/chat/ChatComposer.tsx line 1245OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -1224,4 +1240,6 @@12241240 ]);1225124112261242 const isComposerMenuLoading =1227- composerTriggerKind === "path" && pathTriggerQuery.length > 0 && workspaceEntries.isPending;1243+ (composerTriggerKind === "path" && pathTriggerQuery.length > 0 && workspaceEntries.isPending) ||1244+ ((composerTriggerKind === "skill" || composerTriggerKind === "slash-command") &&1245+ projectSkillsQuery.isPending);
- @@ -886,3 +890,9 @@886890 () => selectedProviderEntry?.snapshot ?? null,887891 [selectedProviderEntry],888892 );893+ const selectedProviderSkills = selectedProviderStatus894+ ? resolveProviderSkillsForCwd(selectedProviderStatus, gitCwd)895+ : [];896+ const selectedProviderSlashCommands = selectedProviderStatus897+ ? resolveProviderSlashCommandsForCwd(selectedProviderStatus, gitCwd)898+ : [];
- apps/server/src/orchestration/Layers/ProviderCommandReactor.ts line 624OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -614,8 +612,13 @@614- ...(preferredProvider ? { provider: preferredProvider } : {}),615- providerInstanceId: desiredInstanceId,616- ...(effectiveCwd ? { cwd: effectiveCwd } : {}),617- ...(thread.title ? { title: thread.title } : {}),618- modelSelection: desiredModelSelection,619- ...(input?.resumeCursor !== undefined ? { resumeCursor: input.resumeCursor } : {}),620- runtimeMode: desiredRuntimeMode,621- });612+ providerService613+ .startSession(threadId, {614+ threadId,615+ ...(preferredProvider ? { provider: preferredProvider } : {}),616+ providerInstanceId: desiredInstanceId,617+ ...(effectiveCwd ? { cwd: effectiveCwd } : {}),618+ ...(thread.title ? { title: thread.title } : {}),619+ modelSelection: desiredModelSelection,620+ ...(input?.resumeCursor !== undefined ? { resumeCursor: input.resumeCursor } : {}),621+ runtimeMode: desiredRuntimeMode,622+ })623+ .pipe(624+ Effect.tap(() =>apps/server/src/provider/Layers/ProviderRegistry.ts line 769Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -704,3 +730,14 @@704730 return yield* Ref.get(providersRef);705731 });706732733+ const refreshWorkspaceSnapshot = Effect.fn("refreshWorkspaceSnapshot")(function* (input: {734+ readonly instanceId: ProviderInstanceId;735+ readonly cwd: string;736+ }) {737+ const providers = yield* Ref.get(providersRef);738+ const machineSnapshot = providers.find(739+ (provider) => provider.instanceId === input.instanceId,740+ );741+ if (742+ machineSnapshot === undefined ||743+ machineSnapshot.workspaceSnapshots?.some((snapshot) => snapshot.cwd === input.cwd)
- apps/server/src/provider/Drivers/CodexDriver.ts lines 182 to 182OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -166,7 +166,17 @@166166 // in as instance rebuilds from the registry rather than in-place167167 // updates. Pre-provide `ChildProcessSpawner` so the check fits168168 // `makeManagedServerProvider.checkProvider`'s `R = never`.169- const checkProvider = checkCodexProviderStatus(effectiveConfig, undefined, processEnv).pipe(170- Effect.map(stampIdentity),171- Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),172- );169+ const checkProviderForCwd = (cwd?: string) =>170+ checkCodexProviderStatus(effectiveConfig, undefined, processEnv, cwd).pipe(171+ Effect.map(stampIdentity),172+ Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),173+ );174+ const checkProvider = checkProviderForCwd();175+ const snapshotForCwd = (cwd: string) =>176+ checkProviderForCwd(cwd).pipe(177+ Effect.mapError(178+ (cause) =>179+ new ProviderDriverError({180+ driver: DRIVER_KIND,181+ instanceId,182+ detail: `Failed to probe Codex snapshot for '${cwd}': ${cause.message}`,
- apps/server/src/provider/Layers/ProviderRegistry.ts line 831Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -706,0 +750,21 @@750+ }751+ const scopedSnapshot = yield* instance.snapshotForCwd(input.cwd);752+ if (scopedSnapshot.status === "error") {753+ return yield* Ref.get(providersRef);754+ }755+ const source = buildSnapshotSource(instance);756+ const correlatedSnapshot = yield* correlateSnapshotWithSource(source, scopedSnapshot);757+ const latestProviders = yield* Ref.get(providersRef);758+ const latestMachineSnapshot = latestProviders.find(759+ (provider) => provider.instanceId === input.instanceId,760+ );761+ if (762+ latestMachineSnapshot === undefined ||763+ latestMachineSnapshot.workspaceSnapshots?.some((snapshot) => snapshot.cwd === input.cwd)764+ ) {765+ return latestProviders;766+ }767+ return yield* upsertProviders(768+ [upsertProviderWorkspaceSnapshot(latestMachineSnapshot, input.cwd, correlatedSnapshot)],769+ { persist: false, replace: true },770+ );apps/mobile/src/features/threads/ThreadComposer.tsx line 368Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -355,3 +360,9 @@355360 ) ?? null356361 );357362 }, [props.serverConfig, props.selectedThread.modelSelection.instanceId]);363+ const selectedProviderSkills = selectedProviderStatus364+ ? resolveProviderSkillsForCwd(selectedProviderStatus, props.threadCwd)365+ : [];366+ const selectedProviderSlashCommands = selectedProviderStatus367+ ? resolveProviderSlashCommandsForCwd(selectedProviderStatus, props.threadCwd)368+ : [];
- apps/server/src/provider/Layers/ProviderRegistry.ts line 598OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -563,3 +589,10 @@563589 newlyAdded.push([instanceId, instance] as const);564590 }565591592+ const rebuiltInstanceIds = new Set(593+ newlyAdded594+ .map(([instanceId]) => instanceId)595+ .filter((instanceId) => previousSubs.has(instanceId)),596+ );597+ if (rebuiltInstanceIds.size > 0) {598+ yield* Ref.update(providersRef, (providers) =>apps/server/src/provider/Layers/ProviderRegistry.ts line 782OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -706,0 +762,21 @@762+ const instance = yield* instanceRegistry.getInstance(input.instanceId);763+ if (instance?.snapshotForCwd === undefined) {764+ return providers;765+ }766+ const scopedSnapshot = yield* instance.snapshotForCwd(input.cwd);767+ if (scopedSnapshot.status === "error") {768+ return yield* Ref.get(providersRef);769+ }770+ const source = buildSnapshotSource(instance);771+ const correlatedSnapshot = yield* correlateSnapshotWithSource(source, scopedSnapshot);772+ const latestProviders = yield* Ref.get(providersRef);773+ const latestMachineSnapshot = latestProviders.find(774+ (provider) => provider.instanceId === input.instanceId,775+ );776+ if (777+ latestMachineSnapshot === undefined ||778+ latestMachineSnapshot.workspaceSnapshots?.some((snapshot) => snapshot.cwd === input.cwd)779+ ) {780+ return latestProviders;781+ }782+ return yield* upsertProviders(apps/server/src/provider/Layers/ProviderRegistry.ts line 766OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -705,2 +746,21 @@705746 });706747748+ const refreshWorkspaceSnapshot = Effect.fn("refreshWorkspaceSnapshot")(function* (input: {749+ readonly instanceId: ProviderInstanceId;750+ readonly cwd: string;751+ }) {752+ const providers = yield* Ref.get(providersRef);753+ const machineSnapshot = providers.find(754+ (provider) => provider.instanceId === input.instanceId,755+ );756+ if (757+ machineSnapshot === undefined ||758+ machineSnapshot.workspaceSnapshots?.some((snapshot) => snapshot.cwd === input.cwd)759+ ) {760+ return providers;761+ }762+ const instance = yield* instanceRegistry.getInstance(input.instanceId);763+ if (instance?.snapshotForCwd === undefined) {764+ return providers;765+ }766+ const scopedSnapshot = yield* instance.snapshotForCwd(input.cwd);
- @@ -704,3 +752,4 @@704752 return yield* Ref.get(providersRef);705753 });706754755+ const refreshWorkspaceSnapshot = Effect.fn("refreshWorkspaceSnapshot")(function* (input: {
- apps/server/src/provider/Drivers/OpenCodeDriver.ts line 194OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -187,3 +188,7 @@187188 accentColor,188189 enabled,189190 snapshot,191+ snapshotForCwd: (cwd) =>192+ Effect.all([193+ snapshot.getSnapshot,194+ openCodeRuntime.loadSkillsFromCli({apps/server/src/provider/Drivers/CodexDriver.ts line 210OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -197,3 +201,10 @@197201 }),198202 ),199203 );204+ const snapshotForCwd = (cwd: string) =>205+ Effect.all([206+ snapshot.getSnapshot,207+ probeCodexSkillsForCwd({208+ binaryPath: effectiveConfig.binaryPath,209+ homePath: effectiveConfig.homePath,210+ launchArgs: effectiveConfig.launchArgs,
- apps/server/src/provider/Drivers/CursorDriver.ts lines 186 to 186OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -181,3 +183,4 @@181183 accentColor,182184 enabled,183185 snapshot,186+ snapshotForCwd: checkProviderForCwd,apps/server/src/provider/Drivers/GrokDriver.ts lines 161 to 161OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -156,3 +158,4 @@156158 accentColor,157159 enabled,158160 snapshot,161+ snapshotForCwd: checkProviderForCwd,apps/server/src/provider/Drivers/CodexDriver.ts lines 208 to 218Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -197,3 +201,16 @@197201 }),198202 ),199203 );204+ const snapshotForCwd = (cwd: string) =>205+ Effect.all([206+ snapshot.getSnapshot,207+ probeCodexSkillsForCwd({208+ binaryPath: effectiveConfig.binaryPath,209+ homePath: effectiveConfig.homePath,210+ launchArgs: effectiveConfig.launchArgs,211+ cwd,212+ environment: processEnv,213+ }).pipe(214+ Effect.scoped,215+ Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),216+ ),
- apps/server/src/provider/Layers/CodexProvider.ts line 469Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -423,0 +449,21 @@449+ shell: spawnCommand.shell,450+ }),451+ )452+ .pipe(453+ Effect.mapError(454+ (cause) =>455+ new CodexErrors.CodexAppServerSpawnError({456+ command: `${input.binaryPath} app-server`,457+ cause,458+ }),459+ ),460+ );461+ const clientContext = yield* Layer.build(CodexClient.layerChildProcess(child));462+ const client = yield* Effect.service(CodexClient.CodexAppServerClient).pipe(463+ Effect.provide(clientContext),464+ );465+ yield* client.request("initialize", buildCodexInitializeParams());466+ yield* client.notify("initialized", undefined);467+ const skillsResponse = yield* client.request("skills/list", { cwds: [input.cwd] });468+ return parseCodexSkillsListResponse(skillsResponse, input.cwd);469+});apps/server/src/provider/Drivers/CodexDriver.ts line 214Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -197,3 +201,13 @@197201 }),198202 ),199203 );204+ const snapshotForCwd = (cwd: string) =>205+ Effect.all([206+ snapshot.getSnapshot,207+ probeCodexSkillsForCwd({208+ binaryPath: effectiveConfig.binaryPath,209+ homePath: effectiveConfig.homePath,210+ launchArgs: effectiveConfig.launchArgs,211+ cwd,212+ environment: processEnv,213+ }).pipe(apps/server/src/provider/opencodeRuntime.ts line 858Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -809,3 +814,21 @@809814 };810815 });811816817+ const loadSkillsFromCli: OpenCodeRuntimeShape["loadSkillsFromCli"] = (input) =>818+ runOpenCodeCommand({819+ binaryPath: input.binaryPath,820+ args: ["debug", "skill"],821+ cwd: input.cwd,822+ ...(input.environment !== undefined ? { environment: input.environment } : {}),823+ }).pipe(824+ Effect.flatMap((result) =>825+ result.code === 0826+ ? Effect.succeed(parseSkillsCliOutput(result.stdout))827+ : Effect.fail(828+ new OpenCodeRuntimeError({829+ operation: "loadSkillsFromCli",830+ detail: `OpenCode skills command exited with code ${result.code}.`,831+ }),832+ ),833+ ),834+ );
- apps/server/src/provider/Drivers/OpenCodeDriver.ts lines 191 to 191OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -178,3 +179,13 @@178179 }),179180 ),180181 );182+ const loadSkillsForCwd = (cwd: string) =>183+ effectiveConfig.serverUrl.trim().length > 0184+ ? Effect.scoped(185+ Effect.gen(function* () {186+ const server = yield* openCodeRuntime.connectToOpenCodeServer({187+ binaryPath: effectiveConfig.binaryPath,188+ serverUrl: effectiveConfig.serverUrl,189+ environment: processEnv,190+ });191+ const inventory = yield* openCodeRuntime.loadOpenCodeInventory(
- apps/server/src/provider/Drivers/OpenCodeDriver.ts line 206Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -180,0 +187,21 @@187+ binaryPath: effectiveConfig.binaryPath,188+ serverUrl: effectiveConfig.serverUrl,189+ environment: processEnv,190+ });191+ const inventory = yield* openCodeRuntime.loadOpenCodeInventory(192+ openCodeRuntime.createOpenCodeSdkClient({193+ baseUrl: server.url,194+ directory: cwd,195+ ...(effectiveConfig.serverPassword196+ ? { serverPassword: effectiveConfig.serverPassword }197+ : {}),198+ }),199+ );200+ return inventory.skills;201+ }),202+ )203+ : openCodeRuntime.loadSkillsFromCli({204+ binaryPath: effectiveConfig.binaryPath,205+ cwd,206+ environment: processEnv,207+ });
- apps/server/src/provider/opencodeRuntime.ts line 716OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -705,3 +713,4 @@705713 Effect.map((result) => (result.data ?? []) as ReadonlyArray<OpenCodeSkill>),706714 Effect.orElseSucceed((): ReadonlyArray<OpenCodeSkill> => []),707715 );716+ const loadOpenCodeSkills: OpenCodeRuntimeShape["loadOpenCodeSkills"] = loadSkills;
- apps/server/src/provider/Drivers/ClaudeDriver.ts lines 177 to 191OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -174,3 +174,18 @@174174 Effect.provideService(FileSystem.FileSystem, fileSystem),175175 Effect.provideService(Path.Path, path),176176 );177+ const snapshotForCwd = (workspaceCwd: string) =>178+ checkClaudeProviderStatus(179+ effectiveConfig,180+ () =>181+ probeClaudeCapabilities(effectiveConfig, processEnv, workspaceCwd).pipe(182+ Effect.provideService(Path.Path, path),183+ ),184+ processEnv,185+ workspaceCwd,186+ ).pipe(187+ Effect.map(stampIdentity),188+ Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),189+ Effect.provideService(FileSystem.FileSystem, fileSystem),190+ Effect.provideService(Path.Path, path),191+ );
- apps/server/src/provider/Layers/ClaudeProvider.ts line 821Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -789 +798,20 @@789-};798+799+export const probeClaudeWorkspaceCatalog = Effect.fn("probeClaudeWorkspaceCatalog")(function* (800+ claudeSettings: ClaudeSettings,801+ environment: NodeJS.ProcessEnv | undefined,802+ cwd: string,803+) {804+ const [capabilities, skills] = yield* Effect.all(805+ [806+ probeClaudeCapabilitiesStrict(claudeSettings, environment, cwd).pipe(807+ Effect.timeout(CAPABILITIES_PROBE_TIMEOUT_MS),808+ ),809+ discoverClaudeSkills(claudeSettings, cwd, environment ?? process.env),810+ ],811+ { concurrency: "unbounded" },812+ );813+ return {814+ skills,815+ slashCommands: dedupeSlashCommands(capabilities.slashCommands),816+ };817+});
- apps/server/src/provider/Layers/ProviderRegistry.ts lines 763 to 776OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -706,0 +756,21 @@756+ readonly instanceId: ProviderInstanceId;757+ readonly cwd: string;758+ }) {759+ const providers = yield* Ref.get(providersRef);760+ const machineSnapshot = providers.find(761+ (provider) => provider.instanceId === input.instanceId,762+ );763+ if (764+ machineSnapshot === undefined ||765+ machineSnapshot.workspaceSnapshots?.some((snapshot) => snapshot.cwd === input.cwd)766+ ) {767+ return providers;768+ }769+ const instance = yield* instanceRegistry.getInstance(input.instanceId);770+ if (instance?.snapshotForCwd === undefined) {771+ return providers;772+ }773+ const scopedSnapshot = yield* instance.snapshotForCwd(input.cwd);774+ if (scopedSnapshot.status === "error") {775+ return yield* Ref.get(providersRef);776+ }
- apps/server/src/provider/Layers/ProviderRegistry.ts line 798OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -706,0 +778,21 @@778+ const correlatedSnapshot = yield* correlateSnapshotWithSource(source, scopedSnapshot);779+ const currentInstance = yield* instanceRegistry.getInstance(input.instanceId);780+ if (currentInstance !== instance) {781+ return yield* Ref.get(providersRef);782+ }783+ const [previousProviders, nextProviders] = yield* Ref.modify(784+ providersRef,785+ (previousProviders) => {786+ const nextProviders = previousProviders.map((provider) =>787+ provider.instanceId === input.instanceId &&788+ !provider.workspaceSnapshots?.some((snapshot) => snapshot.cwd === input.cwd)789+ ? upsertProviderWorkspaceSnapshot(provider, input.cwd, correlatedSnapshot)790+ : provider,791+ );792+ return [[previousProviders, nextProviders] as const, nextProviders];793+ },794+ );795+ if (haveProvidersChanged(previousProviders, nextProviders)) {796+ yield* PubSub.publish(changesPubSub, nextProviders);797+ }798+ return nextProviders;
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
- apps/server/src/provider/Layers/ProviderRegistry.ts lines 792 to 792OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -706,0 +772,21 @@772+ }773+ const instance = yield* instanceRegistry.getInstance(input.instanceId);774+ if (instance === undefined || instance.snapshotForCwd === undefined) {775+ return providers;776+ }777+ const snapshotForCwd = instance.snapshotForCwd;778+ const claimed = yield* Ref.modify(workspaceRefreshesRef, (refreshes) => {779+ const instanceRefreshes = refreshes.get(instance);780+ if (instanceRefreshes?.has(input.cwd)) {781+ return [false, refreshes] as const;782+ }783+ const next = new Map(refreshes);784+ next.set(instance, new Set(instanceRefreshes).add(input.cwd));785+ return [true, next] as const;786+ });787+ if (!claimed) {788+ return yield* Ref.get(providersRef);789+ }790+ return yield* Effect.gen(function* () {791+ const scopedSnapshot = yield* snapshotForCwd(input.cwd);792+ if (scopedSnapshot.status === "error") {
- apps/server/src/provider/opencodeRuntime.ts line 841Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -828,3 +837,5 @@828837 };829838 });830839840+ const loadSkillsFromCli: OpenCodeRuntimeShape["loadSkillsFromCli"] = (input) =>841+ runOpenCodeCommand({
- apps/server/src/provider/opencodeRuntime.ts line 858Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -828,3 +837,21 @@828837 };829838 });830839840+ const loadSkillsFromCli: OpenCodeRuntimeShape["loadSkillsFromCli"] = (input) =>841+ runOpenCodeCommand({842+ binaryPath: input.binaryPath,843+ args: ["debug", "skill"],844+ cwd: input.cwd,845+ ...(input.environment !== undefined ? { environment: input.environment } : {}),846+ }).pipe(847+ Effect.flatMap((result) =>848+ result.code === 0849+ ? Effect.succeed(parseSkillsCliOutput(result.stdout))850+ : Effect.fail(851+ new OpenCodeRuntimeError({852+ operation: "loadSkillsFromCli",853+ detail: `OpenCode skills command exited with code ${result.code}.`,854+ }),855+ ),856+ ),857+ );apps/mobile/src/features/threads/ThreadComposer.tsx line 368Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -355,3 +359,10 @@355359 ) ?? null356360 );357361 }, [props.serverConfig, props.selectedThread.modelSelection.instanceId]);362+ const workspaceSnapshotCwd = props.selectedThread.worktreePath ?? props.projectCwd;363+ const selectedProviderSkills = selectedProviderStatus364+ ? resolveProviderSkillsForCwd(selectedProviderStatus, workspaceSnapshotCwd)365+ : [];366+ const selectedProviderSlashCommands = selectedProviderStatus367+ ? resolveProviderSlashCommandsForCwd(selectedProviderStatus, workspaceSnapshotCwd)368+ : [];
- apps/mobile/src/features/threads/new-task-flow-provider.tsx line 454Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -444,10 +445,4 @@444445 option.selection.instanceId === selectedModel.instanceId &&445446 option.selection.model === selectedModel.model,446447 ) ?? null;447- const selectedProviderSkills = useMemo(448- () =>449- selectedEnvironmentServerConfig?.providers.find(450- (provider) => provider.instanceId === selectedModel?.instanceId,451- )?.skills ?? [],452- [selectedEnvironmentServerConfig, selectedModel?.instanceId],453- );448+ const selectedProviderSkills = useMemo(() => {
- apps/mobile/src/features/threads/new-task-flow-provider.tsx line 455OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -444,10 +445,11 @@444445 option.selection.instanceId === selectedModel.instanceId &&445446 option.selection.model === selectedModel.model,446447 ) ?? null;447- const selectedProviderSkills = useMemo(448- () =>449- selectedEnvironmentServerConfig?.providers.find(450- (provider) => provider.instanceId === selectedModel?.instanceId,451- )?.skills ?? [],452- [selectedEnvironmentServerConfig, selectedModel?.instanceId],453- );448+ const selectedProviderSkills = useMemo(() => {449+ const provider = selectedEnvironmentServerConfig?.providers.find(450+ (provider) => provider.instanceId === selectedModel?.instanceId,451+ );452+ return provider453+ ? resolveProviderSkillsForCwd(provider, selectedProject?.workspaceRoot ?? null)454+ : [];455+ }, [selectedEnvironmentServerConfig, selectedModel?.instanceId, selectedProject?.workspaceRoot]);
- apps/mobile/src/features/threads/new-task-flow-provider.tsx line 463OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -449,5 +448,16 @@449- selectedEnvironmentServerConfig?.providers.find(450- (provider) => provider.instanceId === selectedModel?.instanceId,451- )?.skills ?? [],452- [selectedEnvironmentServerConfig, selectedModel?.instanceId],453- );448+ const selectedProviderSkills = useMemo(() => {449+ const provider = selectedEnvironmentServerConfig?.providers.find(450+ (provider) => provider.instanceId === selectedModel?.instanceId,451+ );452+ return provider453+ ? resolveProviderSkillsForCwd(454+ provider,455+ selectedWorktreePath ?? selectedProject?.workspaceRoot ?? null,456+ )457+ : [];458+ }, [459+ selectedEnvironmentServerConfig,460+ selectedModel?.instanceId,461+ selectedProject?.workspaceRoot,462+ selectedWorktreePath,463+ ]);
Sign in to join this conversation.


macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed