@chat-lab/ui 0.1.0-beta.57 → 0.1.0-beta.58
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/adk/components/Debug/Events/EventDetail.cjs +2 -2
- package/dist/adk/components/Debug/Events/EventDetail.js +2 -2
- package/dist/adk/components/Debug/Events/useADKEventHooks.cjs +1 -1
- package/dist/adk/components/Debug/Events/useADKEventHooks.js +1 -1
- package/dist/adk/components/Debug/Trace/TraceDetail.cjs +2 -2
- package/dist/adk/components/Debug/Trace/TraceDetail.js +2 -2
- package/dist/adk/components/Debug/Trace/store.cjs +2 -2
- package/dist/adk/components/Debug/Trace/store.js +2 -2
- package/dist/components/Chatkit/index.cjs +4 -4
- package/dist/components/Chatkit/index.js +4 -4
- package/dist/components/SwitchAgentModal/index.cjs +10 -10
- package/dist/components/SwitchAgentModal/index.js +10 -10
- package/dist/components/ThreadOptionsMenu.cjs +3 -3
- package/dist/components/ThreadOptionsMenu.js +3 -3
- package/dist/components/VoiceInput/index.cjs +3 -3
- package/dist/components/VoiceInput/index.js +3 -3
- package/dist/components/assistant-ui/WarningModal.cjs +1 -1
- package/dist/components/assistant-ui/WarningModal.js +1 -1
- package/dist/components/assistant-ui/attachment.cjs +10 -10
- package/dist/components/assistant-ui/attachment.js +10 -10
- package/dist/components/assistant-ui/file/pdf.cjs +8 -8
- package/dist/components/assistant-ui/file/pdf.js +8 -8
- package/dist/components/assistant-ui/file/video.cjs +3 -3
- package/dist/components/assistant-ui/file/video.js +3 -3
- package/dist/components/assistant-ui/markdown-text.cjs +5 -5
- package/dist/components/assistant-ui/markdown-text.js +5 -5
- package/dist/components/assistant-ui/message-components-with-avatar.cjs +3 -3
- package/dist/components/assistant-ui/message-components-with-avatar.js +3 -3
- package/dist/components/assistant-ui/reasoning.cjs +3 -3
- package/dist/components/assistant-ui/reasoning.js +3 -3
- package/dist/components/assistant-ui/shiki-highlighter.cjs +1 -1
- package/dist/components/assistant-ui/shiki-highlighter.js +1 -1
- package/dist/components/assistant-ui/thread.cjs +33 -33
- package/dist/components/assistant-ui/thread.js +33 -33
- package/dist/components/assistant-ui/tool-fallback.cjs +2 -2
- package/dist/components/assistant-ui/tool-fallback.js +2 -2
- package/dist/components/assistant-ui/tooltip-icon-button.cjs +1 -1
- package/dist/components/assistant-ui/tooltip-icon-button.d.ts +1 -1
- package/dist/components/assistant-ui/tooltip-icon-button.d.ts.map +1 -1
- package/dist/components/assistant-ui/tooltip-icon-button.js +1 -1
- package/dist/components/assistant-ui-tools/execution-card.cjs +5 -5
- package/dist/components/assistant-ui-tools/execution-card.js +5 -5
- package/dist/components/assistant-ui-tools/skill-agent-tool-set.cjs +7 -7
- package/dist/components/assistant-ui-tools/skill-agent-tool-set.js +7 -7
- package/dist/components/ui/button.cjs +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/collapsible.cjs +1 -1
- package/dist/components/ui/collapsible.js +1 -1
- package/dist/components/ui/dialog.cjs +2 -2
- package/dist/components/ui/dialog.js +2 -2
- package/dist/components/ui/tabs.cjs +1 -1
- package/dist/components/ui/tabs.d.ts +3 -3
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/toast.d.ts +7 -7
- package/dist/components/ui/toast.d.ts.map +1 -1
- package/dist/components/ui/tooltip.cjs +1 -1
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/hooks/useDebugChat.cjs +1 -1
- package/dist/hooks/useDebugChat.js +1 -1
- package/dist/hooks/useSkillAgent/SkillAgentPlugin.cjs +4 -1
- package/dist/hooks/useSkillAgent/SkillAgentPlugin.cjs.map +1 -1
- package/dist/hooks/useSkillAgent/SkillAgentPlugin.d.ts.map +1 -1
- package/dist/hooks/useSkillAgent/SkillAgentPlugin.js +4 -1
- package/dist/hooks/useSkillAgent/SkillAgentPlugin.js.map +1 -1
- package/dist/hooks/useSkillAgent/index.cjs +1 -1
- package/dist/hooks/useSkillAgent/index.js +1 -1
- package/dist/hooks/useThread.cjs +1 -1
- package/dist/hooks/useThread.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@17.0.2_@types_react@17.0.2_react-do_5tjbc4lq6d3wd7wce3f4vqmehe/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +0 -4
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@17.0.2_@types_react@17.0.2_react-do_5tjbc4lq6d3wd7wce3f4vqmehe/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@17.0.2_@types_react@17.0.2_react-do_5tjbc4lq6d3wd7wce3f4vqmehe/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +1 -3
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@17.0.2_@types_react@17.0.2_react-do_5tjbc4lq6d3wd7wce3f4vqmehe/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.4_@types_react@18.2.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -12
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.4_@types_react@18.2.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.4_@types_react@18.2.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.js +2 -12
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.4_@types_react@18.2.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ahooks@3.9.6_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/ahooks/es/utils/index.cjs +2 -0
- package/dist/node_modules/.pnpm/ahooks@3.9.6_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/ahooks/es/utils/index.cjs.map +1 -1
- package/dist/node_modules/.pnpm/ahooks@3.9.6_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/ahooks/es/utils/index.js +2 -1
- package/dist/node_modules/.pnpm/ahooks@3.9.6_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/ahooks/es/utils/index.js.map +1 -1
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@17.0.2_react@17.0.2/node_modules/use-sidecar/dist/es2015/medium.cjs +5 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@17.0.2_react@17.0.2/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -1
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@17.0.2_react@17.0.2/node_modules/use-sidecar/dist/es2015/medium.js +5 -1
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@17.0.2_react@17.0.2/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.2.0_react@18.2.0/node_modules/use-sidecar/dist/es2015/medium.cjs +0 -5
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.2.0_react@18.2.0/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -1
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.2.0_react@18.2.0/node_modules/use-sidecar/dist/es2015/medium.js +1 -5
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.2.0_react@18.2.0/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/.pnpm/use-sync-external-store@1.6.0_react@17.0.2/node_modules/use-sync-external-store/shim/index.cjs +1 -1
- package/dist/node_modules/.pnpm/use-sync-external-store@1.6.0_react@17.0.2/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/packages/chatui/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
- package/dist/packages/chatui/node_modules/@radix-ui/react-slot/dist/index.js +1 -1
- package/dist/packages/core/dist/index.cjs +19 -8
- package/dist/packages/core/dist/index.cjs.map +1 -1
- package/dist/packages/core/dist/index.js +20 -9
- package/dist/packages/core/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import dayjs from '../../../node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/dayjs.min.js';
|
|
2
2
|
import { ClientFactory, ClientFactoryOptions, DefaultAgentCardResolver } from '../../../node_modules/.pnpm/@a2a-js_sdk@0.3.7_express@5.1.0/node_modules/@a2a-js/sdk/dist/client/index.js';
|
|
3
3
|
import mitt from '../../../node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/dist/mitt.js';
|
|
4
|
-
import { proxy } from '../../../node_modules/.pnpm/valtio@2.1.8_patch_hash_boxi3qpsg2dztwe4vz7tsjpr3m_@types_react@
|
|
5
|
-
export { snapshot, subscribe } from '../../../node_modules/.pnpm/valtio@2.1.8_patch_hash_boxi3qpsg2dztwe4vz7tsjpr3m_@types_react@
|
|
4
|
+
import { proxy } from '../../../node_modules/.pnpm/valtio@2.1.8_patch_hash_boxi3qpsg2dztwe4vz7tsjpr3m_@types_react@17.0.2_react@17.0.2/node_modules/valtio/esm/vanilla.js';
|
|
5
|
+
export { snapshot, subscribe } from '../../../node_modules/.pnpm/valtio@2.1.8_patch_hash_boxi3qpsg2dztwe4vz7tsjpr3m_@types_react@17.0.2_react@17.0.2/node_modules/valtio/esm/vanilla.js';
|
|
6
6
|
import v4 from '../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js';
|
|
7
7
|
import last from '../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/last.js';
|
|
8
8
|
import isNil from '../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isNil.js';
|
|
@@ -1281,7 +1281,7 @@ var Compiler = class {
|
|
|
1281
1281
|
beforeDestroy: new AsyncSeriesWaterfallHook()
|
|
1282
1282
|
},
|
|
1283
1283
|
message: {
|
|
1284
|
-
received: new
|
|
1284
|
+
received: new SyncHook(),
|
|
1285
1285
|
beforeSend: new AsyncSeriesWaterfallHook(),
|
|
1286
1286
|
error: new SyncWaterfallHook(),
|
|
1287
1287
|
end: new AsyncSeriesWaterfallHook()
|
|
@@ -1720,6 +1720,7 @@ async function fetchChatCompletion({
|
|
|
1720
1720
|
completions,
|
|
1721
1721
|
protocolAdaptor,
|
|
1722
1722
|
onResponse,
|
|
1723
|
+
onReceivedMessage,
|
|
1723
1724
|
storeManager,
|
|
1724
1725
|
thread
|
|
1725
1726
|
}) {
|
|
@@ -1741,12 +1742,16 @@ async function fetchChatCompletion({
|
|
|
1741
1742
|
response
|
|
1742
1743
|
});
|
|
1743
1744
|
currentMessage = updatedMessage;
|
|
1745
|
+
onReceivedMessage?.(currentMessage);
|
|
1744
1746
|
if (updatedMessage.status === "error" /* ERROR */) {
|
|
1745
1747
|
throttledOnResponse.cancel();
|
|
1746
|
-
onResponse({ ...
|
|
1748
|
+
onResponse(() => ({ ...currentMessage, status: "error" /* ERROR */ }));
|
|
1747
1749
|
return;
|
|
1748
1750
|
}
|
|
1749
|
-
throttledOnResponse(
|
|
1751
|
+
throttledOnResponse(() => ({
|
|
1752
|
+
...currentMessage,
|
|
1753
|
+
status: "pending" /* PENDING */
|
|
1754
|
+
}));
|
|
1750
1755
|
};
|
|
1751
1756
|
try {
|
|
1752
1757
|
if (abortController?.signal) {
|
|
@@ -2059,13 +2064,19 @@ var ChatController = class {
|
|
|
2059
2064
|
protocolAdaptor,
|
|
2060
2065
|
storeManager,
|
|
2061
2066
|
thread,
|
|
2062
|
-
|
|
2067
|
+
onReceivedMessage: async (message) => {
|
|
2068
|
+
this.pluginManager.hooks.message.received.call(message);
|
|
2069
|
+
},
|
|
2070
|
+
onResponse: async (updatedMessageOrFactory) => {
|
|
2071
|
+
let updatedMessage;
|
|
2072
|
+
if (typeof updatedMessageOrFactory === "function") {
|
|
2073
|
+
updatedMessage = updatedMessageOrFactory();
|
|
2074
|
+
} else {
|
|
2075
|
+
updatedMessage = updatedMessageOrFactory;
|
|
2076
|
+
}
|
|
2063
2077
|
if (updatedMessage.status === "pending" /* PENDING */ && !updatedMessage.createdAt) {
|
|
2064
2078
|
updatedMessage.createdAt = Date.now();
|
|
2065
2079
|
}
|
|
2066
|
-
this.pluginManager.hooks.message.received.callAsync(
|
|
2067
|
-
toRaw(updatedMessage)
|
|
2068
|
-
);
|
|
2069
2080
|
storeManager.updateMessage(threadId, updatedMessage.id, {
|
|
2070
2081
|
updatedMessage,
|
|
2071
2082
|
partial: true
|