fix(deprecation): validate v1 folder transition

This commit is contained in:
Atai Barkai
2026-08-20 00:56:52 -07:00
committed by Mike Ryan
parent e499c65dce
commit 6058316e8c
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ Users can configure suggestions via `useCopilotChatSuggestions` hook which regis
- **@react-core**
- [copilot-context.tsx](mdc:packages/react-core/src/v1-deprecated/context/copilot-context.tsx) - Where the actual suggestions are stored, the "provider" or "context"
- [use-copilot-chat.ts](mdc:packages/react-core/src/v1-deprecated/hooks/use-copilot-chat.ts) - Hook that controls and contains logic for suggestions, often referred to as "headless UI"
- [suggestions.ts](mdc:packages/react-core/src/v1-deprecated/utils/suggestions.ts) - Core suggestion generation logic with streaming validation and error handling
- [use-configure-chat-suggestions.tsx](mdc:packages/react-core/src/v1-deprecated/hooks/use-configure-chat-suggestions.tsx) - V1 compatibility bridge that configures v2 suggestion generation and reloads suggestions when the target agent becomes available
- [suggestions-constants.ts](mdc:packages/react-core/src/v1-deprecated/utils/suggestions-constants.ts) - Retry configuration constants
## How Suggestions Work
+4 -1
View File
@@ -10,7 +10,10 @@ import path from "node:path";
// directory is added as a public package export.
function preservePublishedV1Layout(distDir: string) {
const v1DeprecatedDir = path.join(distDir, "v1-deprecated");
if (!fs.existsSync(v1DeprecatedDir)) return;
if (!fs.existsSync(v1DeprecatedDir)) {
// build:done runs for concurrent outputs; another callback may have already flattened it.
return;
}
const movedFiles = new Map<string, string>();
const moveTree = (source: string, destination: string) => {