Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: composer picks up new project skills without a server restart #16750

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/16750/headmerged by juliusmarminge View on GitHub

Showing 7 changed files with 45 additions and 15 deletions (loading 4).

x
0 of 7 viewed, 7 left
22 additions and 12 deletionsapps/mobile/src/features/threads/use-composer-command-menu.tsModified
View file
@@ -9,7 +9,10 @@
import type { EnvironmentThreadShell } from "@t3tools/client-runtime/state/models";
​
const EMPTY_THREAD_SHELLS: ReadonlyArray<EnvironmentThreadShell> = [];
-import { COMPOSER_CONTEXT_MAX_RECORDS } from "@t3tools/contracts";
+import {
+ COMPOSER_CONTEXT_MAX_RECORDS,
+ PROVIDER_WORKSPACE_SNAPSHOT_TTL_MS,
+} from "@t3tools/contracts";
import { Alert } from "react-native";
import { formatComposerContextReference } from "@t3tools/shared/composerContextReferences";
import { pullRequestComposerContext, threadComposerContext } from "../../lib/composerContext";
@@ -37,6 +40,7 @@
getProviderSlashCommandsForSlashMenu,
isProviderSkillUserInvocable,
hasCompleteProviderWorkspaceSnapshot,
+ hasCurrentProviderWorkspaceSnapshot,
resolveProviderSkillsForCwd,
resolveProviderSlashCommandsForCwd,
} from "@t3tools/client-runtime/providerSkills";
@@ -250,7 +254,9 @@
selectedProviderStatus,
projectCwd,
- const workspaceRefreshKeyRef = useRef<string | null>(null);
+ // The last scan this composer asked for. A request inside the TTL is not
+ // repeated, so a client clock ahead of the server's cannot loop rescans.
+ const workspaceRefreshKeyRef = useRef<{ key: string; requestedAt: number } | null>(null);