@docyrus/ui-pro-ai-assistant 0.3.2 → 0.3.3
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/README.md +3 -0
- package/dist/index.js +24 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -269,6 +269,9 @@ The main chat interface component.
|
|
|
269
269
|
| Prop | Type | Default | Description |
|
|
270
270
|
|------|------|---------|-------------|
|
|
271
271
|
| `initialPrompt` | `string` | — | When provided, the assistant auto-sends this message on mount. Useful when launching the assistant from an agent trigger widget or deep link |
|
|
272
|
+
| `initialModelId` | `string` | — | Model ID to pre-select when auto-sending the initial prompt |
|
|
273
|
+
| `initialFeatures` | `{ webSearch?, thinking?, deepResearch?, documentSearch?, workCanvas?, files? }` | — | Feature flags to enable when auto-sending the initial prompt |
|
|
274
|
+
| `initialFiles` | `File[]` | — | Files to attach when auto-sending the initial prompt |
|
|
272
275
|
|
|
273
276
|
---
|
|
274
277
|
|
package/dist/index.js
CHANGED
|
@@ -24902,9 +24902,7 @@ var DocyAssistant = ({
|
|
|
24902
24902
|
apiClient,
|
|
24903
24903
|
configUser.id,
|
|
24904
24904
|
projectActions.setProjects,
|
|
24905
|
-
(
|
|
24906
|
-
fetchProjectThreads2(project.id);
|
|
24907
|
-
fetchProjectWorks2(project.id);
|
|
24905
|
+
() => {
|
|
24908
24906
|
},
|
|
24909
24907
|
() => projectActions.setProjectsLoaded(true),
|
|
24910
24908
|
activeAgentId
|
|
@@ -24913,8 +24911,6 @@ var DocyAssistant = ({
|
|
|
24913
24911
|
apiClient,
|
|
24914
24912
|
configUser.id,
|
|
24915
24913
|
projectActions,
|
|
24916
|
-
fetchProjectThreads2,
|
|
24917
|
-
fetchProjectWorks2,
|
|
24918
24914
|
activeAgentId
|
|
24919
24915
|
]);
|
|
24920
24916
|
const fetchWorks2 = useCallback(async () => {
|
|
@@ -24936,9 +24932,7 @@ var DocyAssistant = ({
|
|
|
24936
24932
|
fetchThreads
|
|
24937
24933
|
]);
|
|
24938
24934
|
useEffect(() => {
|
|
24939
|
-
if (isOpen && (enableSidebar || enableNavDropdown)
|
|
24940
|
-
fetchWorks2();
|
|
24941
|
-
} else if (isOpen && (enableSidebar || enableNavDropdown)) {
|
|
24935
|
+
if (isOpen && (enableSidebar || enableNavDropdown)) {
|
|
24942
24936
|
projectActions.setProjectsLoaded(false);
|
|
24943
24937
|
fetchProjects2();
|
|
24944
24938
|
}
|
|
@@ -24946,9 +24940,18 @@ var DocyAssistant = ({
|
|
|
24946
24940
|
isOpen,
|
|
24947
24941
|
enableSidebar,
|
|
24948
24942
|
enableNavDropdown,
|
|
24949
|
-
uiState.activeTab,
|
|
24950
24943
|
projectActions,
|
|
24951
|
-
fetchProjects2
|
|
24944
|
+
fetchProjects2
|
|
24945
|
+
]);
|
|
24946
|
+
useEffect(() => {
|
|
24947
|
+
if (isOpen && (enableSidebar || enableNavDropdown) && uiState.activeTab === 3) {
|
|
24948
|
+
fetchWorks2();
|
|
24949
|
+
}
|
|
24950
|
+
}, [
|
|
24951
|
+
isOpen,
|
|
24952
|
+
enableSidebar,
|
|
24953
|
+
enableNavDropdown,
|
|
24954
|
+
uiState.activeTab,
|
|
24952
24955
|
fetchWorks2
|
|
24953
24956
|
]);
|
|
24954
24957
|
useEffect(() => {
|
|
@@ -24956,6 +24959,17 @@ var DocyAssistant = ({
|
|
|
24956
24959
|
fetchWorks2();
|
|
24957
24960
|
}
|
|
24958
24961
|
}, [isOpen, uiState.isRightSidebarOpen, fetchWorks2]);
|
|
24962
|
+
useEffect(() => {
|
|
24963
|
+
const { selectedProject, projectThreads, projectWorks } = projectState;
|
|
24964
|
+
if (!selectedProject) return;
|
|
24965
|
+
const { id: projectId } = selectedProject;
|
|
24966
|
+
if (!projectThreads[projectId]) {
|
|
24967
|
+
fetchProjectThreads2(projectId);
|
|
24968
|
+
}
|
|
24969
|
+
if (!projectWorks[projectId]) {
|
|
24970
|
+
fetchProjectWorks2(projectId);
|
|
24971
|
+
}
|
|
24972
|
+
}, [projectState, fetchProjectThreads2, fetchProjectWorks2]);
|
|
24959
24973
|
const updateProject2 = async () => {
|
|
24960
24974
|
await updateProject(apiClient, projectState, projectActions, fetchProjects2, t);
|
|
24961
24975
|
};
|