@hef2024/llmasaservice-ui 0.22.5 → 0.22.6
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 +0 -9
- package/dist/index.mjs +0 -9
- package/package.json +1 -1
- package/src/AIChatPanel.tsx +3 -14
package/dist/index.js
CHANGED
|
@@ -4777,12 +4777,6 @@ var AIChatPanel = ({
|
|
|
4777
4777
|
) : /* @__PURE__ */ import_react12.default.createElement("code", __spreadValues({ className }, props), children);
|
|
4778
4778
|
}, [effectivePrismStyle]);
|
|
4779
4779
|
const AgentSuggestionCard = import_react12.default.memo(({ agentId, agentName, reason }) => {
|
|
4780
|
-
(0, import_react12.useEffect)(() => {
|
|
4781
|
-
const timer = setTimeout(() => {
|
|
4782
|
-
scrollToBottom(true);
|
|
4783
|
-
}, 100);
|
|
4784
|
-
return () => clearTimeout(timer);
|
|
4785
|
-
}, []);
|
|
4786
4780
|
if (!agentId || !onAgentChange) return null;
|
|
4787
4781
|
const isValidUUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(agentId);
|
|
4788
4782
|
const agentOption = agentOptions.find((opt) => opt.value === agentId);
|
|
@@ -4825,9 +4819,6 @@ var AIChatPanel = ({
|
|
|
4825
4819
|
className: "ai-chat-agent-suggestion__button",
|
|
4826
4820
|
onClick: () => {
|
|
4827
4821
|
onAgentChange(agentId);
|
|
4828
|
-
setTimeout(() => {
|
|
4829
|
-
scrollToBottom(true);
|
|
4830
|
-
}, 100);
|
|
4831
4822
|
}
|
|
4832
4823
|
},
|
|
4833
4824
|
"Switch"
|
package/dist/index.mjs
CHANGED
|
@@ -4744,12 +4744,6 @@ var AIChatPanel = ({
|
|
|
4744
4744
|
) : /* @__PURE__ */ React12.createElement("code", __spreadValues({ className }, props), children);
|
|
4745
4745
|
}, [effectivePrismStyle]);
|
|
4746
4746
|
const AgentSuggestionCard = React12.memo(({ agentId, agentName, reason }) => {
|
|
4747
|
-
useEffect7(() => {
|
|
4748
|
-
const timer = setTimeout(() => {
|
|
4749
|
-
scrollToBottom(true);
|
|
4750
|
-
}, 100);
|
|
4751
|
-
return () => clearTimeout(timer);
|
|
4752
|
-
}, []);
|
|
4753
4747
|
if (!agentId || !onAgentChange) return null;
|
|
4754
4748
|
const isValidUUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(agentId);
|
|
4755
4749
|
const agentOption = agentOptions.find((opt) => opt.value === agentId);
|
|
@@ -4792,9 +4786,6 @@ var AIChatPanel = ({
|
|
|
4792
4786
|
className: "ai-chat-agent-suggestion__button",
|
|
4793
4787
|
onClick: () => {
|
|
4794
4788
|
onAgentChange(agentId);
|
|
4795
|
-
setTimeout(() => {
|
|
4796
|
-
scrollToBottom(true);
|
|
4797
|
-
}, 100);
|
|
4798
4789
|
}
|
|
4799
4790
|
},
|
|
4800
4791
|
"Switch"
|
package/package.json
CHANGED
package/src/AIChatPanel.tsx
CHANGED
|
@@ -2112,15 +2112,8 @@ const AIChatPanel: React.FC<AIChatPanelProps> = ({
|
|
|
2112
2112
|
agentName: string;
|
|
2113
2113
|
reason: string;
|
|
2114
2114
|
}) => {
|
|
2115
|
-
//
|
|
2116
|
-
|
|
2117
|
-
// Small delay to ensure the card is fully rendered in the DOM
|
|
2118
|
-
// Force scroll since this is new content being added
|
|
2119
|
-
const timer = setTimeout(() => {
|
|
2120
|
-
scrollToBottom(true);
|
|
2121
|
-
}, 100);
|
|
2122
|
-
return () => clearTimeout(timer);
|
|
2123
|
-
}, []); // Empty deps - only run on mount
|
|
2115
|
+
// Note: Removed auto-scroll on card appearance - it was causing unwanted scrolling
|
|
2116
|
+
// The card appears as part of streaming response, which handles its own scrolling
|
|
2124
2117
|
|
|
2125
2118
|
if (!agentId || !onAgentChange) return null;
|
|
2126
2119
|
|
|
@@ -2236,11 +2229,7 @@ const AIChatPanel: React.FC<AIChatPanelProps> = ({
|
|
|
2236
2229
|
className="ai-chat-agent-suggestion__button"
|
|
2237
2230
|
onClick={() => {
|
|
2238
2231
|
onAgentChange(agentId);
|
|
2239
|
-
//
|
|
2240
|
-
// Force scroll since this is a user-initiated action
|
|
2241
|
-
setTimeout(() => {
|
|
2242
|
-
scrollToBottom(true);
|
|
2243
|
-
}, 100);
|
|
2232
|
+
// Note: Removed forced scroll - switching agents shouldn't scroll the chat
|
|
2244
2233
|
}}
|
|
2245
2234
|
>
|
|
2246
2235
|
Switch
|