flare-chat-core 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6343 -0
- package/package.json +19 -22
- package/docs/CAPABILITY-INVENTORY.md +0 -42
- package/docs/CHAT-CORE-BOUNDARY.md +0 -47
- package/docs/CORE-APP-REALIGNMENT-WORKLOAD-2026-04-18.md +0 -86
- package/docs/SSOT-CHAT-CORE-BOUNDARY.md +0 -73
- package/docs/SSOT-CHAT-CORE-DATAFLOW.md +0 -97
- package/index.html +0 -12
- package/scripts/check.sh +0 -15
- package/src/adapters/index.js +0 -6
- package/src/adapters/message-api.adapter.js +0 -59
- package/src/adapters/session-api.adapter.js +0 -133
- package/src/adapters/session-message-api.http.js +0 -161
- package/src/adapters/session-message-api.js +0 -34
- package/src/adapters/session-message-api.normalize-source-record.test.mjs +0 -180
- package/src/adapters/session-message-api.normalizers.js +0 -153
- package/src/adapters/source-api.adapter.js +0 -135
- package/src/adapters/sse-client.js +0 -244
- package/src/adapters/sse-event-dispatcher.js +0 -121
- package/src/app/App.jsx +0 -11
- package/src/app/AppProviders.jsx +0 -12
- package/src/app/ChatWorkspaceScreen.jsx +0 -33
- package/src/app/WorkspaceLayout.jsx +0 -125
- package/src/app/components/AppCanvasPanel.jsx +0 -64
- package/src/app/components/TriggerThresholdPopoverContent.jsx +0 -122
- package/src/app/components/WorkspaceBodySection.jsx +0 -109
- package/src/app/components/WorkspaceMainPane.jsx +0 -113
- package/src/app/components/WorkspaceSessionPane.jsx +0 -48
- package/src/app/components/WorkspaceTopBarSection.jsx +0 -65
- package/src/app/core-chat-entry/ComposerSectionNode.jsx +0 -241
- package/src/app/core-chat-entry/attachmentSendRefs.js +0 -154
- package/src/app/core-chat-entry/attachmentSendRefs.test.mjs +0 -101
- package/src/app/core-chat-entry/composerActionRouter.js +0 -26
- package/src/app/core-chat-entry/constants.js +0 -108
- package/src/app/core-chat-entry/selectors.js +0 -28
- package/src/app/core-chat-entry/useAppActionErrorGuards.js +0 -68
- package/src/app/core-chat-entry/useChatCorePipelines.js +0 -110
- package/src/app/core-chat-entry/useComposerModeSuggestion.js +0 -89
- package/src/app/core-chat-entry/useDevCapabilityStatusNote.js +0 -22
- package/src/app/core-chat-entry/useProjectNameEditing.js +0 -41
- package/src/app/core-chat-entry/useProjectSourceUpload.js +0 -341
- package/src/app/core-chat-entry/useRealApiReadinessGate.js +0 -103
- package/src/app/core-chat-entry/useUnavailableActionError.js +0 -29
- package/src/app/core-chat-entry/useWorkspaceCanvasController.jsx +0 -177
- package/src/app/core-chat-entry/useWorkspaceCanvasProjection.jsx +0 -171
- package/src/app/core-chat-entry/useWorkspaceComposerController.jsx +0 -199
- package/src/app/core-chat-entry/useWorkspaceController.jsx +0 -226
- package/src/app/core-chat-entry/useWorkspacePanels.js +0 -55
- package/src/app/hooks/useComposerAttachmentSync.js +0 -223
- package/src/app/hooks/useComposerChooserHandlers.js +0 -52
- package/src/app/hooks/useSendWithContextRefs.js +0 -140
- package/src/app/hooks/useSendWithContextRefs.test.mjs +0 -29
- package/src/app/hooks/useUserThresholdProfile.js +0 -121
- package/src/app/index.js +0 -1
- package/src/app/selectors/assistantTextSelector.js +0 -73
- package/src/app/selectors/canvasEvidenceSummarySelector.js +0 -28
- package/src/app/selectors/canvasReportTemplateSelector.js +0 -28
- package/src/app/selectors/canvasTabsSelector.js +0 -58
- package/src/app/selectors/evidenceProjectionSelector.js +0 -175
- package/src/app/selectors/evidenceProjectionSelector.test.mjs +0 -107
- package/src/app/selectors/modeSuggestionSelector.js +0 -50
- package/src/chat-core/app/mockRuntime.js +0 -291
- package/src/chat-core/app/useAppStream.js +0 -187
- package/src/chat-core/app/useAppStream.refs.test.mjs +0 -44
- package/src/chat-core/app/useAppStream.request-body.test.mjs +0 -116
- package/src/chat-core/app/useCoreChatApp.js +0 -115
- package/src/chat-core/facade/useBasicConversationFacade.js +0 -280
- package/src/chat-core/index.js +0 -14
- package/src/chat-core/input/useChatInput.js +0 -103
- package/src/chat-core/messages/buildTimelineItems.analysis-route.test.mjs +0 -36
- package/src/chat-core/messages/buildTimelineItems.js +0 -233
- package/src/chat-core/messages/buildTimelineItems.knowledge-citation.test.mjs +0 -183
- package/src/chat-core/messages/contextUsageDefaults.js +0 -3
- package/src/chat-core/messages/contextUsageViewModel.js +0 -147
- package/src/chat-core/messages/contextUsageViewModel.test.mjs +0 -74
- package/src/chat-core/messages/useContextUsageViewModel.js +0 -41
- package/src/chat-core/orchestration/useBasicSendHandler.js +0 -55
- package/src/chat-core/pipelines/build-action-request.js +0 -46
- package/src/chat-core/pipelines/build-stream-request.js +0 -74
- package/src/chat-core/pipelines/entity-extraction.js +0 -159
- package/src/chat-core/pipelines/preprocess-message.js +0 -16
- package/src/chat-core/pipelines/stream-persist-utils.js +0 -32
- package/src/chat-core/pipelines/transport/send-mock-stream.js +0 -86
- package/src/chat-core/pipelines/transport/send-real-stream.js +0 -330
- package/src/chat-core/pipelines/transport/send-real-stream.test.mjs +0 -27
- package/src/chat-core/pipelines/transport/send-sourcing-search.js +0 -86
- package/src/chat-core/pipelines/transport/send-sourcing-search.test.mjs +0 -14
- package/src/chat-core/pipelines/transport/sourcing-response-templates.js +0 -55
- package/src/chat-core/pipelines/transport/sourcing-search-api.js +0 -155
- package/src/chat-core/runtime/runtimeMode.js +0 -69
- package/src/chat-core/session/chatSessionActionTypes.js +0 -24
- package/src/chat-core/session/chatSessionReducer.js +0 -352
- package/src/chat-core/session/chatSessionReducer.streaming-done.test.mjs +0 -39
- package/src/chat-core/session/index.js +0 -2
- package/src/chat-core/session/sessionActionsMessages.js +0 -44
- package/src/chat-core/session/sessionActionsSessionCrud.js +0 -131
- package/src/chat-core/session/sessionActionsStreaming.js +0 -80
- package/src/chat-core/session/sessionActionsUiState.js +0 -51
- package/src/chat-core/session/useChatSessionReducer.js +0 -131
- package/src/chat-core/session/useSessionListController.js +0 -67
- package/src/chat-core/stream/sse-client.js +0 -1
- package/src/chat-core/stream/sse-event-dispatcher.js +0 -1
- package/src/chat-core/stream/sse-events.js +0 -1
- package/src/chat-core/stream/useSSEStream.js +0 -1
- package/src/chat-core/stream/useStreamSendController.js +0 -46
- package/src/contracts/context-ssot.js +0 -47
- package/src/contracts/index.js +0 -1
- package/src/contracts/sse-events/base-parsers.js +0 -79
- package/src/contracts/sse-events/domain-parsers.js +0 -3
- package/src/contracts/sse-events/internal-normalizers.js +0 -143
- package/src/contracts/sse-events/parsers-intake.js +0 -235
- package/src/contracts/sse-events/parsers-runtime.js +0 -37
- package/src/contracts/sse-events/parsers-sourcing.js +0 -179
- package/src/contracts/sse-events/patch-event-parser.js +0 -121
- package/src/contracts/sse-events/runtime-parsers.js +0 -79
- package/src/contracts/sse-events.js +0 -4
- package/src/index.js +0 -6
- package/src/main.jsx +0 -28
- package/src/orchestration/index.js +0 -6
- package/src/orchestration/useSSEStream.js +0 -221
- package/src/state/index.js +0 -4
- package/vite.config.js +0 -36
package/src/main.jsx
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import 'antd/dist/reset.css';
|
|
4
|
-
import ChatApp from './app/App.jsx';
|
|
5
|
-
|
|
6
|
-
const FUNCTION_TYPE = import.meta.env.VITE_FLARE_CHAT_FUNCTION_TYPE || 'chat_component_debug';
|
|
7
|
-
const DEFAULT_SESSION_TITLE = import.meta.env.VITE_FLARE_CHAT_DEFAULT_SESSION_TITLE || '调试会话';
|
|
8
|
-
const PROJECT_ID = import.meta.env.VITE_FLARE_CHAT_PROJECT_ID || 'project_demo_001';
|
|
9
|
-
const USER_ID = import.meta.env.VITE_FLARE_CHAT_USER_ID || 'user_demo_001';
|
|
10
|
-
const DEV_DEFAULT_BACKEND = String(import.meta.env.VITE_FLARE_CHAT_DEV_DEFAULT_BACKEND || 'real').toLowerCase();
|
|
11
|
-
const KERNEL_BASE_URL = import.meta.env.VITE_FLARE_CHAT_KERNEL_BASE_URL || 'http://127.0.0.1:18002';
|
|
12
|
-
const API_BASE_URL = import.meta.env.VITE_FLARE_CHAT_API_BASE_URL || '';
|
|
13
|
-
const API_TOKEN = import.meta.env.VITE_FLARE_CHAT_API_TOKEN || '';
|
|
14
|
-
|
|
15
|
-
ReactDOM.createRoot(document.getElementById('root')).render(
|
|
16
|
-
<React.StrictMode>
|
|
17
|
-
<ChatApp
|
|
18
|
-
functionType={FUNCTION_TYPE}
|
|
19
|
-
defaultSessionTitle={DEFAULT_SESSION_TITLE}
|
|
20
|
-
projectId={PROJECT_ID}
|
|
21
|
-
userId={USER_ID}
|
|
22
|
-
backendMode={DEV_DEFAULT_BACKEND}
|
|
23
|
-
kernelBaseUrl={KERNEL_BASE_URL}
|
|
24
|
-
apiBaseUrl={API_BASE_URL}
|
|
25
|
-
apiToken={API_TOKEN}
|
|
26
|
-
/>
|
|
27
|
-
</React.StrictMode>
|
|
28
|
-
);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { useBasicSendHandler } from '../chat-core/orchestration/useBasicSendHandler.js';
|
|
2
|
-
export { useStreamSendController } from '../chat-core/stream/useStreamSendController.js';
|
|
3
|
-
export { useSessionListController } from '../chat-core/session/useSessionListController.js';
|
|
4
|
-
export { useBasicConversationFacade } from '../chat-core/facade/useBasicConversationFacade.js';
|
|
5
|
-
export { useCoreChatApp } from '../chat-core/app/useCoreChatApp.js';
|
|
6
|
-
export { useSSEStream } from './useSSEStream.js';
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { useRef, useState, useCallback, useEffect } from 'react';
|
|
2
|
-
import { SSEClient } from '../adapters/sse-client.js';
|
|
3
|
-
import { dispatchSSEEvent } from '../adapters/sse-event-dispatcher.js';
|
|
4
|
-
|
|
5
|
-
function classifyError(errorMessage) {
|
|
6
|
-
if (!errorMessage) return 'unknown';
|
|
7
|
-
|
|
8
|
-
const lowerMsg = errorMessage.toLowerCase();
|
|
9
|
-
if (lowerMsg.includes('network') || lowerMsg.includes('fetch')) return 'network';
|
|
10
|
-
if (lowerMsg.includes('timeout') || lowerMsg.includes('timed out')) return 'timeout';
|
|
11
|
-
if (/\b(500|502|503|504)\b/.test(lowerMsg)) return 'api';
|
|
12
|
-
return 'unknown';
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function useSSEStream(sessionId) {
|
|
16
|
-
const clientRef = useRef(new SSEClient());
|
|
17
|
-
const [loading, setLoading] = useState(false);
|
|
18
|
-
const [error, setError] = useState(null);
|
|
19
|
-
const accumulatedRef = useRef('');
|
|
20
|
-
const lastMessageRef = useRef({ content: '', handlers: {} });
|
|
21
|
-
|
|
22
|
-
const send = useCallback(async (content, handlers = {}, options = {}) => {
|
|
23
|
-
const hasSessionOverride = Object.prototype.hasOwnProperty.call(options, 'sessionIdOverride');
|
|
24
|
-
const resolvedSessionId = hasSessionOverride ? options.sessionIdOverride : sessionId;
|
|
25
|
-
if (!content.trim()) return;
|
|
26
|
-
|
|
27
|
-
lastMessageRef.current = { content, handlers, options };
|
|
28
|
-
setError(null);
|
|
29
|
-
accumulatedRef.current = '';
|
|
30
|
-
setLoading(true);
|
|
31
|
-
let latestSessionId = String(resolvedSessionId || '').trim();
|
|
32
|
-
|
|
33
|
-
const {
|
|
34
|
-
onAck,
|
|
35
|
-
onAgentStatus,
|
|
36
|
-
onThinkingTrace,
|
|
37
|
-
onExecutionTrace,
|
|
38
|
-
onContent,
|
|
39
|
-
onTextReplace,
|
|
40
|
-
onPhaseStart,
|
|
41
|
-
onPhaseUpdate,
|
|
42
|
-
onPhaseEnd,
|
|
43
|
-
onPatch,
|
|
44
|
-
onDone,
|
|
45
|
-
onTrace,
|
|
46
|
-
onWorkspaceActivation,
|
|
47
|
-
onUICards,
|
|
48
|
-
onKnowledgeBaseState,
|
|
49
|
-
onFieldProgress,
|
|
50
|
-
onRequirementDraft,
|
|
51
|
-
onNextActions,
|
|
52
|
-
onSourcingCandidates,
|
|
53
|
-
onRiskSummary,
|
|
54
|
-
onShortlistUpdated,
|
|
55
|
-
onEvaluationReportReady,
|
|
56
|
-
onCategoryIdentified,
|
|
57
|
-
onFieldsUpdated,
|
|
58
|
-
onInstanceProfile,
|
|
59
|
-
onModeRuntime,
|
|
60
|
-
onAgentRuntime,
|
|
61
|
-
onSkillRuntime,
|
|
62
|
-
onModeSwitchReason,
|
|
63
|
-
onKnowledgeSearch,
|
|
64
|
-
onKnowledgeCitation,
|
|
65
|
-
onOrchestrationStatus,
|
|
66
|
-
onCanvasState,
|
|
67
|
-
onCanvasRevision,
|
|
68
|
-
onPlanBlock,
|
|
69
|
-
onDoc,
|
|
70
|
-
onCapabilitySuggestion,
|
|
71
|
-
onPatchEvent,
|
|
72
|
-
onError,
|
|
73
|
-
onComplete,
|
|
74
|
-
} = handlers;
|
|
75
|
-
|
|
76
|
-
const eventHandler = (event) => {
|
|
77
|
-
dispatchSSEEvent(event, {
|
|
78
|
-
handlers: {
|
|
79
|
-
onAck,
|
|
80
|
-
onPhaseStart,
|
|
81
|
-
onPhaseUpdate,
|
|
82
|
-
onPhaseEnd,
|
|
83
|
-
onPatch,
|
|
84
|
-
onAgentStatus,
|
|
85
|
-
onThinkingTrace,
|
|
86
|
-
onExecutionTrace,
|
|
87
|
-
onContent,
|
|
88
|
-
onTextReplace,
|
|
89
|
-
onDone,
|
|
90
|
-
onTrace,
|
|
91
|
-
onWorkspaceActivation,
|
|
92
|
-
onUICards,
|
|
93
|
-
onKnowledgeBaseState,
|
|
94
|
-
onFieldProgress,
|
|
95
|
-
onRequirementDraft,
|
|
96
|
-
onNextActions,
|
|
97
|
-
onSourcingCandidates,
|
|
98
|
-
onRiskSummary,
|
|
99
|
-
onShortlistUpdated,
|
|
100
|
-
onEvaluationReportReady,
|
|
101
|
-
onCategoryIdentified,
|
|
102
|
-
onFieldsUpdated,
|
|
103
|
-
onInstanceProfile,
|
|
104
|
-
onModeRuntime,
|
|
105
|
-
onAgentRuntime,
|
|
106
|
-
onSkillRuntime,
|
|
107
|
-
onModeSwitchReason,
|
|
108
|
-
onKnowledgeSearch,
|
|
109
|
-
onKnowledgeCitation,
|
|
110
|
-
onOrchestrationStatus,
|
|
111
|
-
onCanvasState,
|
|
112
|
-
onCanvasRevision,
|
|
113
|
-
onPlanBlock,
|
|
114
|
-
onDoc,
|
|
115
|
-
onCapabilitySuggestion,
|
|
116
|
-
onPatchEvent,
|
|
117
|
-
onError,
|
|
118
|
-
},
|
|
119
|
-
appendChunk: (chunk) => {
|
|
120
|
-
accumulatedRef.current += chunk;
|
|
121
|
-
},
|
|
122
|
-
replaceChunk: (contentValue) => {
|
|
123
|
-
accumulatedRef.current = contentValue;
|
|
124
|
-
},
|
|
125
|
-
setLatestSessionId: (sessionValue) => {
|
|
126
|
-
latestSessionId = sessionValue;
|
|
127
|
-
},
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const completeHandler = async () => {
|
|
132
|
-
setLoading(false);
|
|
133
|
-
await onComplete?.(accumulatedRef.current, {
|
|
134
|
-
sessionId: latestSessionId || null,
|
|
135
|
-
});
|
|
136
|
-
accumulatedRef.current = '';
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
const transportErrorHandler = (errorMessage) => {
|
|
140
|
-
setLoading(false);
|
|
141
|
-
const errorType = classifyError(errorMessage);
|
|
142
|
-
setError({ message: errorMessage, type: errorType });
|
|
143
|
-
onError?.({ message: errorMessage });
|
|
144
|
-
accumulatedRef.current = '';
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const requestOptions = {
|
|
148
|
-
sessionId: String(resolvedSessionId || '').trim() || null,
|
|
149
|
-
content,
|
|
150
|
-
enabledCapabilities: Array.isArray(options.enabledCapabilities) ? options.enabledCapabilities : [],
|
|
151
|
-
modeKey: typeof options.modeKey === 'string' ? options.modeKey : '',
|
|
152
|
-
manualModeKey: typeof options.manualModeKey === 'string' ? options.manualModeKey : '',
|
|
153
|
-
command: typeof options.command === 'string' ? options.command : '',
|
|
154
|
-
clientRequestId: typeof options.clientRequestId === 'string' ? options.clientRequestId : '',
|
|
155
|
-
contractVersion: typeof options.contractVersion === 'string' ? options.contractVersion : '',
|
|
156
|
-
lastTurnId: typeof options.lastTurnId === 'string' ? options.lastTurnId : '',
|
|
157
|
-
payloadExtra: (
|
|
158
|
-
options.payloadExtra
|
|
159
|
-
&& typeof options.payloadExtra === 'object'
|
|
160
|
-
&& !Array.isArray(options.payloadExtra)
|
|
161
|
-
)
|
|
162
|
-
? options.payloadExtra
|
|
163
|
-
: {},
|
|
164
|
-
endpoint: options.endpoint,
|
|
165
|
-
baseUrl: options.baseUrl,
|
|
166
|
-
url: options.url,
|
|
167
|
-
token: typeof options.token === 'string' ? options.token : '',
|
|
168
|
-
auth: (
|
|
169
|
-
options.auth
|
|
170
|
-
&& typeof options.auth === 'object'
|
|
171
|
-
&& !Array.isArray(options.auth)
|
|
172
|
-
) ? options.auth : undefined,
|
|
173
|
-
onTiming: typeof options.onTiming === 'function' ? options.onTiming : undefined,
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
if (!requestOptions.enabledCapabilities.length) {
|
|
177
|
-
delete requestOptions.enabledCapabilities;
|
|
178
|
-
}
|
|
179
|
-
if (!requestOptions.modeKey) delete requestOptions.modeKey;
|
|
180
|
-
if (!requestOptions.manualModeKey) delete requestOptions.manualModeKey;
|
|
181
|
-
if (!requestOptions.command) delete requestOptions.command;
|
|
182
|
-
if (!requestOptions.clientRequestId) delete requestOptions.clientRequestId;
|
|
183
|
-
if (!requestOptions.contractVersion) delete requestOptions.contractVersion;
|
|
184
|
-
if (!requestOptions.lastTurnId) delete requestOptions.lastTurnId;
|
|
185
|
-
if (!Object.keys(requestOptions.payloadExtra || {}).length) delete requestOptions.payloadExtra;
|
|
186
|
-
|
|
187
|
-
if (!requestOptions.endpoint) delete requestOptions.endpoint;
|
|
188
|
-
if (!requestOptions.baseUrl) delete requestOptions.baseUrl;
|
|
189
|
-
if (!requestOptions.url) delete requestOptions.url;
|
|
190
|
-
if (!requestOptions.token) delete requestOptions.token;
|
|
191
|
-
if (!requestOptions.auth) delete requestOptions.auth;
|
|
192
|
-
if (!requestOptions.onTiming) delete requestOptions.onTiming;
|
|
193
|
-
|
|
194
|
-
await clientRef.current.sendMessage(
|
|
195
|
-
requestOptions,
|
|
196
|
-
eventHandler,
|
|
197
|
-
completeHandler,
|
|
198
|
-
transportErrorHandler
|
|
199
|
-
);
|
|
200
|
-
}, [sessionId]);
|
|
201
|
-
|
|
202
|
-
const retry = useCallback(async () => {
|
|
203
|
-
const { content, handlers, options } = lastMessageRef.current;
|
|
204
|
-
if (!content) return;
|
|
205
|
-
await send(content, handlers, options);
|
|
206
|
-
}, [send]);
|
|
207
|
-
|
|
208
|
-
const abort = useCallback(() => {
|
|
209
|
-
clientRef.current.abort();
|
|
210
|
-
setLoading(false);
|
|
211
|
-
accumulatedRef.current = '';
|
|
212
|
-
}, []);
|
|
213
|
-
|
|
214
|
-
useEffect(() => () => {
|
|
215
|
-
clientRef.current.abort();
|
|
216
|
-
}, []);
|
|
217
|
-
|
|
218
|
-
return { send, loading, error, retry, abort };
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export default useSSEStream;
|
package/src/state/index.js
DELETED
package/vite.config.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { defineConfig } from 'vite';
|
|
3
|
-
import react from '@vitejs/plugin-react';
|
|
4
|
-
|
|
5
|
-
const devPort = 9000;
|
|
6
|
-
const previewPort = 9001;
|
|
7
|
-
const devHost = process.env.FLARE_CHAT_CORE_DEV_HOST || '127.0.0.1';
|
|
8
|
-
const workspaceRoot = path.resolve(__dirname, '..', '..');
|
|
9
|
-
|
|
10
|
-
export default defineConfig({
|
|
11
|
-
plugins: [react()],
|
|
12
|
-
resolve: {
|
|
13
|
-
alias: [
|
|
14
|
-
{ find: /^@\//, replacement: `${path.resolve(__dirname, 'src')}/` },
|
|
15
|
-
{ find: /^flare-chat-core$/, replacement: path.resolve(__dirname, 'src', 'index.js') },
|
|
16
|
-
{ find: /^flare-generative-ui$/, replacement: path.resolve(__dirname, '..', 'flare-generative-ui', 'src', 'index.js') },
|
|
17
|
-
{ find: /^flare-canvas-ui$/, replacement: path.resolve(__dirname, '..', 'flare-canvas-ui', 'src', 'index.js') },
|
|
18
|
-
{ find: /^@dva89\/flare-api-client-ts$/, replacement: path.resolve(__dirname, '..', 'flare-api-client-ts', 'src', 'index.js') },
|
|
19
|
-
{ find: /^react$/, replacement: path.resolve(workspaceRoot, 'node_modules', 'react') },
|
|
20
|
-
{ find: /^react-dom$/, replacement: path.resolve(workspaceRoot, 'node_modules', 'react-dom') },
|
|
21
|
-
{ find: /^antd$/, replacement: path.resolve(workspaceRoot, 'node_modules', 'antd') },
|
|
22
|
-
{ find: /^@ant-design\/icons$/, replacement: path.resolve(workspaceRoot, 'node_modules', '@ant-design', 'icons') },
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
server: {
|
|
26
|
-
host: devHost,
|
|
27
|
-
port: devPort,
|
|
28
|
-
fs: {
|
|
29
|
-
allow: [workspaceRoot],
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
preview: {
|
|
33
|
-
host: devHost,
|
|
34
|
-
port: previewPort,
|
|
35
|
-
},
|
|
36
|
-
});
|