@gendive/chatllm 0.21.3 → 0.21.5
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/react/index.d.mts +29 -2
- package/dist/react/index.d.ts +29 -2
- package/dist/react/index.js +1274 -759
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +1267 -753
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/react/ChatUI.tsx
|
|
2
|
-
import
|
|
2
|
+
import React17 from "react";
|
|
3
3
|
|
|
4
4
|
// src/react/hooks/useChatUI.ts
|
|
5
5
|
import { useState as useState6, useRef as useRef5, useCallback as useCallback6, useEffect as useEffect4, useMemo as useMemo3 } from "react";
|
|
@@ -1992,6 +1992,58 @@ var parseChecklistFromContent = (content) => {
|
|
|
1992
1992
|
};
|
|
1993
1993
|
};
|
|
1994
1994
|
|
|
1995
|
+
// src/react/utils/artifactParser.ts
|
|
1996
|
+
var ARTIFACT_LANGUAGE_VALUES = ["html", "svg", "mermaid"];
|
|
1997
|
+
var parseArtifactTags = (content) => {
|
|
1998
|
+
const artifactRegex = /<artifact(?:\s+title=["']([^"']*)["'])?(?:\s+language=["']([^"']*)["'])?(?:\s+title=["']([^"']*)["'])?>([\s\S]*?)<\/artifact>/gi;
|
|
1999
|
+
const artifacts = [];
|
|
2000
|
+
let cleanContent = content;
|
|
2001
|
+
let match;
|
|
2002
|
+
while ((match = artifactRegex.exec(content)) !== null) {
|
|
2003
|
+
const title = match[1] || match[3] || void 0;
|
|
2004
|
+
const rawLanguage = (match[2] || "html").toLowerCase();
|
|
2005
|
+
const language = ARTIFACT_LANGUAGE_VALUES.includes(
|
|
2006
|
+
rawLanguage
|
|
2007
|
+
) ? rawLanguage : "html";
|
|
2008
|
+
const code = match[4].trim();
|
|
2009
|
+
if (code) {
|
|
2010
|
+
artifacts.push({ type: "artifact", title, language, code });
|
|
2011
|
+
}
|
|
2012
|
+
cleanContent = cleanContent.replace(match[0], "");
|
|
2013
|
+
}
|
|
2014
|
+
return { artifacts, cleanContent };
|
|
2015
|
+
};
|
|
2016
|
+
var parseCodeBlockArtifacts = (content) => {
|
|
2017
|
+
const codeBlockRegex = /```(mermaid|svg)\s*\n([\s\S]*?)```/gi;
|
|
2018
|
+
const artifacts = [];
|
|
2019
|
+
let cleanContent = content;
|
|
2020
|
+
let match;
|
|
2021
|
+
while ((match = codeBlockRegex.exec(content)) !== null) {
|
|
2022
|
+
const rawLanguage = match[1].toLowerCase();
|
|
2023
|
+
const language = ARTIFACT_LANGUAGE_VALUES.includes(
|
|
2024
|
+
rawLanguage
|
|
2025
|
+
) ? rawLanguage : "html";
|
|
2026
|
+
const code = match[2].trim();
|
|
2027
|
+
if (code) {
|
|
2028
|
+
artifacts.push({ type: "artifact", language, code });
|
|
2029
|
+
}
|
|
2030
|
+
cleanContent = cleanContent.replace(match[0], "");
|
|
2031
|
+
}
|
|
2032
|
+
return { artifacts, cleanContent };
|
|
2033
|
+
};
|
|
2034
|
+
var parseArtifactsFromContent = (content) => {
|
|
2035
|
+
const tagResult = parseArtifactTags(content);
|
|
2036
|
+
const codeBlockResult = parseCodeBlockArtifacts(tagResult.cleanContent);
|
|
2037
|
+
const allArtifacts = [...tagResult.artifacts, ...codeBlockResult.artifacts];
|
|
2038
|
+
const cleanContent = codeBlockResult.cleanContent.replace(/\n{3,}/g, "\n\n").trim();
|
|
2039
|
+
return { artifacts: allArtifacts, cleanContent };
|
|
2040
|
+
};
|
|
2041
|
+
var hasArtifactTag = (content) => {
|
|
2042
|
+
if (/<artifact[\s>]/i.test(content) && /<\/artifact>/i.test(content)) return true;
|
|
2043
|
+
if (/```(?:mermaid|svg)\s*\n[\s\S]*?```/i.test(content)) return true;
|
|
2044
|
+
return false;
|
|
2045
|
+
};
|
|
2046
|
+
|
|
1995
2047
|
// src/react/utils/contextRefParser.ts
|
|
1996
2048
|
var parseContextRefs = (content) => {
|
|
1997
2049
|
const refRegex = /<ref_context\s+id=["']([^"']+)["']\s*\/>/gi;
|
|
@@ -2693,6 +2745,47 @@ ${projectMemoryContext}`);
|
|
|
2693
2745
|
const shouldIncludePoll = promptControl.includePoll !== false;
|
|
2694
2746
|
const shouldIncludeChecklist = promptControl.includeChecklist !== false;
|
|
2695
2747
|
const shouldIncludeCapabilityGuide = promptControl.includeCapabilityGuide !== false;
|
|
2748
|
+
parts.push(`
|
|
2749
|
+
## \uC2DC\uAC01\uD654 \uAE30\uB2A5
|
|
2750
|
+
|
|
2751
|
+
\uB370\uC774\uD130, \uD504\uB85C\uC138\uC2A4, \uAD6C\uC870\uB97C \uC124\uBA85\uD560 \uB54C \uC2DC\uAC01\uC801 \uD45C\uD604\uC774 \uB354 \uD6A8\uACFC\uC801\uC774\uBA74 \uC790\uB3D9\uC73C\uB85C \uC2DC\uAC01\uD654\uB97C \uC0DD\uC131\uD558\uC138\uC694.
|
|
2752
|
+
**\uC911\uC694: \uC808\uB300 ASCII art\uB098 \uC77C\uBC18 \uD14D\uC2A4\uD2B8 \uB2E4\uC774\uC5B4\uADF8\uB7A8\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694.**
|
|
2753
|
+
|
|
2754
|
+
**\uD615\uC2DD:**
|
|
2755
|
+
- mermaid, svg \u2192 \uB9C8\uD06C\uB2E4\uC6B4 \uCF54\uB4DC\uBE14\uB85D(\`\`\`mermaid, \`\`\`svg) \uC0AC\uC6A9
|
|
2756
|
+
- html (\uCC28\uD2B8/\uC778\uD130\uB799\uD2F0\uBE0C) \u2192 \uBC18\uB4DC\uC2DC <artifact> \uD0DC\uADF8 \uC0AC\uC6A9
|
|
2757
|
+
|
|
2758
|
+
**\uC0AC\uC6A9 \uC2DC\uC810 (\uC790\uB3D9 \uD310\uB2E8):**
|
|
2759
|
+
- \uD504\uB85C\uC138\uC2A4/\uD750\uB984 \uC124\uBA85 \u2192 mermaid \uD50C\uB85C\uCC28\uD2B8
|
|
2760
|
+
- \uC2DC\uC2A4\uD15C \uAD6C\uC870/\uAD00\uACC4 \uC124\uBA85 \u2192 mermaid \uB2E4\uC774\uC5B4\uADF8\uB7A8
|
|
2761
|
+
- \uB370\uC774\uD130 \uBE44\uAD50/\uCD94\uC774 \u2192 html (Chart.js CDN \uC0AC\uC6A9, <artifact> \uD0DC\uADF8)
|
|
2762
|
+
- \uC544\uC774\uCF58/\uB85C\uACE0/\uC77C\uB7EC\uC2A4\uD2B8 \u2192 svg
|
|
2763
|
+
|
|
2764
|
+
**mermaid \uC608\uC2DC:**
|
|
2765
|
+
\`\`\`mermaid
|
|
2766
|
+
graph TD
|
|
2767
|
+
A[\uC2DC\uC791] --> B{\uC870\uAC74}
|
|
2768
|
+
B -->|Yes| C[\uCC98\uB9AC]
|
|
2769
|
+
B -->|No| D[\uC885\uB8CC]
|
|
2770
|
+
\`\`\`
|
|
2771
|
+
|
|
2772
|
+
**html \uCC28\uD2B8 \uC608\uC2DC (<artifact> \uD0DC\uADF8 \uD544\uC218):**
|
|
2773
|
+
<artifact title="\uB9E4\uCD9C \uBE44\uAD50" language="html">
|
|
2774
|
+
<canvas id="chart" width="400" height="200"></canvas>
|
|
2775
|
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
2776
|
+
<script>
|
|
2777
|
+
new Chart(document.getElementById('chart'), {
|
|
2778
|
+
type: 'bar',
|
|
2779
|
+
data: { labels: ['A','B','C'], datasets: [{ label: '\uB9E4\uCD9C', data: [10,20,30] }] }
|
|
2780
|
+
});
|
|
2781
|
+
</script>
|
|
2782
|
+
</artifact>
|
|
2783
|
+
|
|
2784
|
+
**\uADDC\uCE59:**
|
|
2785
|
+
- html \uC2DC\uAC01\uD654\uB294 \uBC18\uB4DC\uC2DC <artifact language="html"> \uD0DC\uADF8\uB85C \uAC10\uC2F8\uC57C \uD568 (\`\`\`html \uCF54\uB4DC\uBE14\uB85D \uC0AC\uC6A9 \uAE08\uC9C0)
|
|
2786
|
+
- \uC0AC\uC6A9\uC790\uAC00 \uC2DC\uAC01\uD654\uB97C \uC694\uCCAD\uD558\uC9C0 \uC54A\uC544\uB3C4 \uC801\uC808\uD558\uBA74 \uC790\uB3D9\uC73C\uB85C \uD3EC\uD568
|
|
2787
|
+
- \uC2DC\uAC01\uD654 \uC55E\uB4A4\uC5D0 \uAC04\uACB0\uD55C \uD14D\uC2A4\uD2B8 \uC124\uBA85 \uD3EC\uD568
|
|
2788
|
+
- mermaid \uBB38\uBC95 \uC624\uB958 \uC8FC\uC758 (\uD2B9\uD788 \uAD04\uD638, \uB530\uC634\uD45C \uC774\uC2A4\uCF00\uC774\uD504)`);
|
|
2696
2789
|
if (shouldIncludeSkills) {
|
|
2697
2790
|
const skillsPrompt = buildSkillsPrompt();
|
|
2698
2791
|
if (skillsPrompt) {
|
|
@@ -2738,6 +2831,7 @@ ${capabilityFeatures.join("\n\n")}
|
|
|
2738
2831
|
const recentCount = msgCount - (session.compressionState.summaryAfterIndex || 0);
|
|
2739
2832
|
if (recentCount <= 2) return true;
|
|
2740
2833
|
}
|
|
2834
|
+
if (enableChecklist && !autoExecuteChecklist && session.messages.some((m) => m.checklistBlock)) return true;
|
|
2741
2835
|
return false;
|
|
2742
2836
|
})();
|
|
2743
2837
|
if (enablePoll && shouldIncludePoll) {
|
|
@@ -2915,7 +3009,7 @@ AI (\uD655\uC815):
|
|
|
2915
3009
|
ref_step\uC740 1\uBD80\uD130 \uC2DC\uC791\uD558\uB294 \uB2E8\uACC4 \uBC88\uD638, ref_image="last"\uB294 \uAC00\uC7A5 \uCD5C\uADFC \uC774\uBBF8\uC9C0
|
|
2916
3010
|
- \uBAA8\uB4E0 \uC18D\uC131\uC740 \uC120\uD0DD\uC0AC\uD56D\uC774\uBA70, \uD544\uC694\uD55C \uACBD\uC6B0\uC5D0\uB9CC \uC0AC\uC6A9\uD558\uC138\uC694`);
|
|
2917
3011
|
} else {
|
|
2918
|
-
parts.push(`## \uCCB4\uD06C\uB9AC\uC2A4\uD2B8: \uBCF5\uD569 \uC791\uC5C5 \uC2DC <checklist><step>\uC81C\uBAA9</step></checklist>\uB85C \uCD08\uC548 \uC81C\uC2DC \u2192 \uC720\uC800 \uD655\uC778/\uC218\uC815 \u2192 \uD655\uC815 <checklist> \uB2E4\uC2DC \uCD9C\uB825. \uB2E8\uC21C\uC778\uC0AC\xB7\uB2E8\uC77C\uC0AC\uC2E4\xB7\uB2E8\uC77C\uC791\uC5C5\uC740 \uBC14\uB85C \uB2F5\uBCC0
|
|
3012
|
+
parts.push(`## \uCCB4\uD06C\uB9AC\uC2A4\uD2B8: \uBCF5\uD569 \uC791\uC5C5 \uC2DC <checklist><step>\uC81C\uBAA9</step></checklist>\uB85C \uCD08\uC548 \uC81C\uC2DC \u2192 \uC720\uC800 \uD655\uC778/\uC218\uC815 \u2192 \uD655\uC815 <checklist> \uB2E4\uC2DC \uCD9C\uB825. \uB2E8\uC21C\uC778\uC0AC\xB7\uB2E8\uC77C\uC0AC\uC2E4\xB7\uB2E8\uC77C\uC791\uC5C5\uC740 \uBC14\uB85C \uB2F5\uBCC0. **\uD544\uC218: \uC720\uC800\uAC00 \uC2B9\uC778("\uC751", "\uC9C4\uD589\uD574", "\uC88B\uC544" \uB4F1)\uD558\uBA74 \uD14D\uC2A4\uD2B8 \uC124\uBA85 \uC5C6\uC774 \uC989\uC2DC <checklist> \uD0DC\uADF8\uB97C \uB2E4\uC2DC \uCD9C\uB825\uD558\uC138\uC694.**`);
|
|
2919
3013
|
}
|
|
2920
3014
|
}
|
|
2921
3015
|
}
|
|
@@ -4515,6 +4609,28 @@ ${stepSummary}
|
|
|
4515
4609
|
} else {
|
|
4516
4610
|
skipNextChecklistParsingRef.current = false;
|
|
4517
4611
|
}
|
|
4612
|
+
if (hasArtifactTag(accumulatedContent)) {
|
|
4613
|
+
setSessions(
|
|
4614
|
+
(prev) => prev.map((s) => {
|
|
4615
|
+
if (s.id !== capturedSessionId) return s;
|
|
4616
|
+
return {
|
|
4617
|
+
...s,
|
|
4618
|
+
messages: s.messages.map((m) => {
|
|
4619
|
+
if (m.id !== assistantMessageId) return m;
|
|
4620
|
+
const { artifacts, cleanContent } = parseArtifactsFromContent(m.content);
|
|
4621
|
+
if (artifacts.length === 0) return m;
|
|
4622
|
+
const existingParts = m.contentParts || [];
|
|
4623
|
+
const textPart = cleanContent.trim() ? [{ type: "text", content: cleanContent }] : [];
|
|
4624
|
+
return {
|
|
4625
|
+
...m,
|
|
4626
|
+
content: cleanContent,
|
|
4627
|
+
contentParts: [...textPart, ...existingParts.filter((p) => p.type !== "text" && p.type !== "artifact"), ...artifacts]
|
|
4628
|
+
};
|
|
4629
|
+
})
|
|
4630
|
+
};
|
|
4631
|
+
})
|
|
4632
|
+
);
|
|
4633
|
+
}
|
|
4518
4634
|
setSessions(
|
|
4519
4635
|
(prev) => prev.map((s) => {
|
|
4520
4636
|
if (s.id !== capturedSessionId) return s;
|
|
@@ -5800,6 +5916,7 @@ var UNCLOSED_THINKING_TAG_REGEX = /<thinking>(?![\s\S]*?<\/thinking>)/gi;
|
|
|
5800
5916
|
var UNCLOSED_POLL_TAG_REGEX = /<poll[^>]*>(?![\s\S]*?<\/poll>)[\s\S]*$/gi;
|
|
5801
5917
|
var UNCLOSED_SKILL_TAG_REGEX = /<skill_use[^>]*>(?![\s\S]*?<\/skill_use>)[\s\S]*$/gi;
|
|
5802
5918
|
var UNCLOSED_CHECKLIST_TAG_REGEX = /<checklist>(?![\s\S]*?<\/checklist>)[\s\S]*$/gi;
|
|
5919
|
+
var UNCLOSED_ARTIFACT_TAG_REGEX = /<artifact[^>]*>(?![\s\S]*?<\/artifact>)[\s\S]*$/gi;
|
|
5803
5920
|
var INLINE_CODE_REGEX = /`([^`]+)`/g;
|
|
5804
5921
|
var BOLD_REGEX = /\*\*([^*]+)\*\*/g;
|
|
5805
5922
|
var ITALIC_REGEX = /(?<!\*)\*([^*]+)\*(?!\*)/g;
|
|
@@ -6712,6 +6829,9 @@ var MarkdownRenderer = ({
|
|
|
6712
6829
|
processedContent = processedContent.replace(/<checklist>[\s\S]*?<\/checklist>/gi, "");
|
|
6713
6830
|
processedContent = processedContent.replace(UNCLOSED_CHECKLIST_TAG_REGEX, "");
|
|
6714
6831
|
UNCLOSED_CHECKLIST_TAG_REGEX.lastIndex = 0;
|
|
6832
|
+
processedContent = processedContent.replace(/<artifact[^>]*>[\s\S]*?<\/artifact>/gi, "");
|
|
6833
|
+
processedContent = processedContent.replace(UNCLOSED_ARTIFACT_TAG_REGEX, "");
|
|
6834
|
+
UNCLOSED_ARTIFACT_TAG_REGEX.lastIndex = 0;
|
|
6715
6835
|
const codeBlocks = [];
|
|
6716
6836
|
processedContent = processedContent.replace(CODE_BLOCK_REGEX, (match, lang, code) => {
|
|
6717
6837
|
if (lang === "markdown" || lang === "md") {
|
|
@@ -8714,10 +8834,10 @@ var iconButtonStyle = {
|
|
|
8714
8834
|
};
|
|
8715
8835
|
|
|
8716
8836
|
// src/react/components/MessageList.tsx
|
|
8717
|
-
import
|
|
8837
|
+
import React14, { useRef as useRef10, useEffect as useEffect10, useCallback as useCallback10, useState as useState18 } from "react";
|
|
8718
8838
|
|
|
8719
8839
|
// src/react/components/MessageBubble.tsx
|
|
8720
|
-
import { useState as
|
|
8840
|
+
import { useState as useState17 } from "react";
|
|
8721
8841
|
|
|
8722
8842
|
// src/react/components/DeepResearchProgressUI.tsx
|
|
8723
8843
|
import React7 from "react";
|
|
@@ -9927,8 +10047,324 @@ var ToolStatusCard = ({
|
|
|
9927
10047
|
] });
|
|
9928
10048
|
};
|
|
9929
10049
|
|
|
9930
|
-
// src/react/components/
|
|
10050
|
+
// src/react/components/ArtifactCard.tsx
|
|
10051
|
+
import { useRef as useRef9, useEffect as useEffect9, useState as useState15, useCallback as useCallback8 } from "react";
|
|
9931
10052
|
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
10053
|
+
var getThemeStyles = () => {
|
|
10054
|
+
const root = document.documentElement;
|
|
10055
|
+
const style = getComputedStyle(root);
|
|
10056
|
+
const vars = [
|
|
10057
|
+
"--chatllm-primary",
|
|
10058
|
+
"--chatllm-text",
|
|
10059
|
+
"--chatllm-text-muted",
|
|
10060
|
+
"--chatllm-bg",
|
|
10061
|
+
"--chatllm-bg-secondary",
|
|
10062
|
+
"--chatllm-border"
|
|
10063
|
+
];
|
|
10064
|
+
const cssVars = vars.map((v) => {
|
|
10065
|
+
const val = style.getPropertyValue(v).trim();
|
|
10066
|
+
return val ? `${v}: ${val};` : "";
|
|
10067
|
+
}).filter(Boolean).join("\n ");
|
|
10068
|
+
return `
|
|
10069
|
+
<style>
|
|
10070
|
+
:root { ${cssVars} }
|
|
10071
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
10072
|
+
body {
|
|
10073
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
10074
|
+
color: var(--chatllm-text, #1e293b);
|
|
10075
|
+
background: transparent;
|
|
10076
|
+
overflow: hidden;
|
|
10077
|
+
}
|
|
10078
|
+
</style>`;
|
|
10079
|
+
};
|
|
10080
|
+
var getAutoResizeScript = (id) => `
|
|
10081
|
+
<script>
|
|
10082
|
+
const ro = new ResizeObserver(() => {
|
|
10083
|
+
const h = document.documentElement.scrollHeight;
|
|
10084
|
+
window.parent.postMessage({ type: 'artifact-resize', id: '${id}', height: h }, '*');
|
|
10085
|
+
});
|
|
10086
|
+
ro.observe(document.body);
|
|
10087
|
+
window.addEventListener('load', () => {
|
|
10088
|
+
window.parent.postMessage({ type: 'artifact-resize', id: '${id}', height: document.documentElement.scrollHeight }, '*');
|
|
10089
|
+
});
|
|
10090
|
+
</script>`;
|
|
10091
|
+
var HtmlArtifact = ({ code }) => {
|
|
10092
|
+
const iframeRef = useRef9(null);
|
|
10093
|
+
const [height, setHeight] = useState15(200);
|
|
10094
|
+
const artifactId = useRef9(`artifact-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`);
|
|
10095
|
+
useEffect9(() => {
|
|
10096
|
+
const id = artifactId.current;
|
|
10097
|
+
const handleMessage = (e) => {
|
|
10098
|
+
if (e.data?.type === "artifact-resize" && e.data.id === id && typeof e.data.height === "number") {
|
|
10099
|
+
setHeight(Math.min(e.data.height + 2, 600));
|
|
10100
|
+
}
|
|
10101
|
+
};
|
|
10102
|
+
window.addEventListener("message", handleMessage);
|
|
10103
|
+
return () => window.removeEventListener("message", handleMessage);
|
|
10104
|
+
}, []);
|
|
10105
|
+
const srcdoc = `<!DOCTYPE html><html><head><meta charset="utf-8">${getThemeStyles()}</head><body>${code}${getAutoResizeScript(artifactId.current)}</body></html>`;
|
|
10106
|
+
return /* @__PURE__ */ jsx14(
|
|
10107
|
+
"iframe",
|
|
10108
|
+
{
|
|
10109
|
+
ref: iframeRef,
|
|
10110
|
+
sandbox: "allow-scripts",
|
|
10111
|
+
srcDoc: srcdoc,
|
|
10112
|
+
title: "artifact",
|
|
10113
|
+
style: {
|
|
10114
|
+
width: "100%",
|
|
10115
|
+
height: `${height}px`,
|
|
10116
|
+
border: "none",
|
|
10117
|
+
display: "block",
|
|
10118
|
+
transition: "height 0.3s ease"
|
|
10119
|
+
}
|
|
10120
|
+
}
|
|
10121
|
+
);
|
|
10122
|
+
};
|
|
10123
|
+
var sanitizeSvg = (svg) => {
|
|
10124
|
+
return svg.replace(/<script[\s\S]*?<\/script>/gi, "").replace(/<script[^>]*\/>/gi, "").replace(/\bon\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi, "").replace(/href\s*=\s*(?:"javascript:[^"]*"|'javascript:[^']*')/gi, "");
|
|
10125
|
+
};
|
|
10126
|
+
var SvgArtifact = ({ code }) => {
|
|
10127
|
+
return /* @__PURE__ */ jsx14(
|
|
10128
|
+
"div",
|
|
10129
|
+
{
|
|
10130
|
+
dangerouslySetInnerHTML: { __html: sanitizeSvg(code) },
|
|
10131
|
+
style: {
|
|
10132
|
+
width: "100%",
|
|
10133
|
+
display: "flex",
|
|
10134
|
+
justifyContent: "center",
|
|
10135
|
+
overflow: "hidden"
|
|
10136
|
+
}
|
|
10137
|
+
}
|
|
10138
|
+
);
|
|
10139
|
+
};
|
|
10140
|
+
var MermaidArtifact = ({ code }) => {
|
|
10141
|
+
const containerRef = useRef9(null);
|
|
10142
|
+
const [svgHtml, setSvgHtml] = useState15(null);
|
|
10143
|
+
const [error, setError] = useState15(null);
|
|
10144
|
+
const renderMermaid = useCallback8(async () => {
|
|
10145
|
+
try {
|
|
10146
|
+
let mermaid;
|
|
10147
|
+
try {
|
|
10148
|
+
mermaid = (await Function('return import("mermaid")')()).default;
|
|
10149
|
+
} catch {
|
|
10150
|
+
mermaid = (await Function('return import("https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs")')()).default;
|
|
10151
|
+
}
|
|
10152
|
+
mermaid.initialize({ startOnLoad: false, theme: "neutral" });
|
|
10153
|
+
const id = `mermaid-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
|
|
10154
|
+
const { svg } = await mermaid.render(id, code.trim());
|
|
10155
|
+
setSvgHtml(svg);
|
|
10156
|
+
} catch (e) {
|
|
10157
|
+
setError(e instanceof Error ? e.message : "Mermaid \uB80C\uB354\uB9C1 \uC2E4\uD328");
|
|
10158
|
+
}
|
|
10159
|
+
}, [code]);
|
|
10160
|
+
useEffect9(() => {
|
|
10161
|
+
renderMermaid();
|
|
10162
|
+
}, [renderMermaid]);
|
|
10163
|
+
if (error) {
|
|
10164
|
+
return /* @__PURE__ */ jsx14(
|
|
10165
|
+
"div",
|
|
10166
|
+
{
|
|
10167
|
+
style: {
|
|
10168
|
+
padding: "12px",
|
|
10169
|
+
fontSize: "13px",
|
|
10170
|
+
color: "var(--chatllm-error, #ef4444)",
|
|
10171
|
+
backgroundColor: "var(--chatllm-error-bg, #fef2f2)",
|
|
10172
|
+
borderRadius: "6px"
|
|
10173
|
+
},
|
|
10174
|
+
children: error
|
|
10175
|
+
}
|
|
10176
|
+
);
|
|
10177
|
+
}
|
|
10178
|
+
if (!svgHtml) {
|
|
10179
|
+
return /* @__PURE__ */ jsx14(
|
|
10180
|
+
"div",
|
|
10181
|
+
{
|
|
10182
|
+
style: {
|
|
10183
|
+
padding: "24px",
|
|
10184
|
+
display: "flex",
|
|
10185
|
+
alignItems: "center",
|
|
10186
|
+
justifyContent: "center"
|
|
10187
|
+
},
|
|
10188
|
+
children: /* @__PURE__ */ jsx14(IconSvg, { name: "loader-4-line", size: 20, color: "var(--chatllm-text-muted, #94a3b8)" })
|
|
10189
|
+
}
|
|
10190
|
+
);
|
|
10191
|
+
}
|
|
10192
|
+
return /* @__PURE__ */ jsx14(
|
|
10193
|
+
"div",
|
|
10194
|
+
{
|
|
10195
|
+
ref: containerRef,
|
|
10196
|
+
dangerouslySetInnerHTML: { __html: svgHtml },
|
|
10197
|
+
style: {
|
|
10198
|
+
width: "100%",
|
|
10199
|
+
display: "flex",
|
|
10200
|
+
justifyContent: "center",
|
|
10201
|
+
overflow: "auto"
|
|
10202
|
+
}
|
|
10203
|
+
}
|
|
10204
|
+
);
|
|
10205
|
+
};
|
|
10206
|
+
var ArtifactActions = ({ code, language }) => {
|
|
10207
|
+
const [showCode, setShowCode] = useState15(false);
|
|
10208
|
+
const [copied, setCopied] = useState15(false);
|
|
10209
|
+
const handleCopy = async () => {
|
|
10210
|
+
try {
|
|
10211
|
+
await navigator.clipboard.writeText(code);
|
|
10212
|
+
setCopied(true);
|
|
10213
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
10214
|
+
} catch {
|
|
10215
|
+
}
|
|
10216
|
+
};
|
|
10217
|
+
const langLabel = language === "mermaid" ? "Mermaid" : language === "svg" ? "SVG" : "HTML";
|
|
10218
|
+
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
10219
|
+
/* @__PURE__ */ jsxs13(
|
|
10220
|
+
"div",
|
|
10221
|
+
{
|
|
10222
|
+
style: {
|
|
10223
|
+
display: "flex",
|
|
10224
|
+
alignItems: "center",
|
|
10225
|
+
gap: "4px",
|
|
10226
|
+
padding: "6px 12px",
|
|
10227
|
+
borderTop: "1px solid var(--chatllm-border, #e5e7eb)",
|
|
10228
|
+
backgroundColor: "var(--chatllm-bg-secondary, #f9fafb)"
|
|
10229
|
+
},
|
|
10230
|
+
children: [
|
|
10231
|
+
/* @__PURE__ */ jsxs13(
|
|
10232
|
+
"button",
|
|
10233
|
+
{
|
|
10234
|
+
onClick: () => setShowCode(!showCode),
|
|
10235
|
+
style: {
|
|
10236
|
+
display: "flex",
|
|
10237
|
+
alignItems: "center",
|
|
10238
|
+
gap: "4px",
|
|
10239
|
+
padding: "4px 8px",
|
|
10240
|
+
fontSize: "12px",
|
|
10241
|
+
color: "var(--chatllm-text-muted, #64748b)",
|
|
10242
|
+
backgroundColor: showCode ? "var(--chatllm-bg-tertiary, #ededed)" : "transparent",
|
|
10243
|
+
border: "none",
|
|
10244
|
+
borderRadius: "4px",
|
|
10245
|
+
cursor: "pointer"
|
|
10246
|
+
},
|
|
10247
|
+
children: [
|
|
10248
|
+
/* @__PURE__ */ jsx14(IconSvg, { name: "code-s-slash-line", size: 12, color: "var(--chatllm-text-muted, #64748b)" }),
|
|
10249
|
+
langLabel,
|
|
10250
|
+
" \uCF54\uB4DC"
|
|
10251
|
+
]
|
|
10252
|
+
}
|
|
10253
|
+
),
|
|
10254
|
+
/* @__PURE__ */ jsxs13(
|
|
10255
|
+
"button",
|
|
10256
|
+
{
|
|
10257
|
+
onClick: handleCopy,
|
|
10258
|
+
style: {
|
|
10259
|
+
display: "flex",
|
|
10260
|
+
alignItems: "center",
|
|
10261
|
+
gap: "4px",
|
|
10262
|
+
padding: "4px 8px",
|
|
10263
|
+
fontSize: "12px",
|
|
10264
|
+
color: copied ? "var(--chatllm-success, #22c55e)" : "var(--chatllm-text-muted, #64748b)",
|
|
10265
|
+
backgroundColor: "transparent",
|
|
10266
|
+
border: "none",
|
|
10267
|
+
borderRadius: "4px",
|
|
10268
|
+
cursor: "pointer"
|
|
10269
|
+
},
|
|
10270
|
+
children: [
|
|
10271
|
+
/* @__PURE__ */ jsx14(
|
|
10272
|
+
IconSvg,
|
|
10273
|
+
{
|
|
10274
|
+
name: copied ? "check-line" : "file-copy-line",
|
|
10275
|
+
size: 12,
|
|
10276
|
+
color: copied ? "var(--chatllm-success, #22c55e)" : "var(--chatllm-text-muted, #64748b)"
|
|
10277
|
+
}
|
|
10278
|
+
),
|
|
10279
|
+
copied ? "\uBCF5\uC0AC\uB428" : "\uBCF5\uC0AC"
|
|
10280
|
+
]
|
|
10281
|
+
}
|
|
10282
|
+
)
|
|
10283
|
+
]
|
|
10284
|
+
}
|
|
10285
|
+
),
|
|
10286
|
+
showCode && /* @__PURE__ */ jsx14(
|
|
10287
|
+
"div",
|
|
10288
|
+
{
|
|
10289
|
+
style: {
|
|
10290
|
+
maxHeight: "300px",
|
|
10291
|
+
overflow: "auto",
|
|
10292
|
+
borderTop: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
10293
|
+
},
|
|
10294
|
+
children: /* @__PURE__ */ jsx14(
|
|
10295
|
+
"pre",
|
|
10296
|
+
{
|
|
10297
|
+
style: {
|
|
10298
|
+
margin: 0,
|
|
10299
|
+
padding: "12px",
|
|
10300
|
+
fontSize: "12px",
|
|
10301
|
+
lineHeight: 1.5,
|
|
10302
|
+
fontFamily: "'Fira Code', 'Consolas', monospace",
|
|
10303
|
+
color: "var(--chatllm-text, #1e293b)",
|
|
10304
|
+
backgroundColor: "var(--chatllm-bg-secondary, #f9fafb)",
|
|
10305
|
+
whiteSpace: "pre-wrap",
|
|
10306
|
+
wordBreak: "break-all"
|
|
10307
|
+
},
|
|
10308
|
+
children: code
|
|
10309
|
+
}
|
|
10310
|
+
)
|
|
10311
|
+
}
|
|
10312
|
+
)
|
|
10313
|
+
] });
|
|
10314
|
+
};
|
|
10315
|
+
var ArtifactCard = ({ part, index = 0 }) => {
|
|
10316
|
+
return /* @__PURE__ */ jsxs13(
|
|
10317
|
+
"div",
|
|
10318
|
+
{
|
|
10319
|
+
className: "chatllm-artifact-card",
|
|
10320
|
+
style: {
|
|
10321
|
+
borderRadius: "8px",
|
|
10322
|
+
border: "1px solid var(--chatllm-border, #e5e7eb)",
|
|
10323
|
+
overflow: "hidden",
|
|
10324
|
+
backgroundColor: "var(--chatllm-bg, #ffffff)",
|
|
10325
|
+
animationDelay: `${index * 300}ms`
|
|
10326
|
+
},
|
|
10327
|
+
children: [
|
|
10328
|
+
part.title && /* @__PURE__ */ jsxs13(
|
|
10329
|
+
"div",
|
|
10330
|
+
{
|
|
10331
|
+
style: {
|
|
10332
|
+
padding: "8px 12px",
|
|
10333
|
+
fontSize: "13px",
|
|
10334
|
+
fontWeight: 600,
|
|
10335
|
+
color: "var(--chatllm-text, #1e293b)",
|
|
10336
|
+
backgroundColor: "var(--chatllm-bg-secondary, #f9fafb)",
|
|
10337
|
+
borderBottom: "1px solid var(--chatllm-border, #e5e7eb)",
|
|
10338
|
+
display: "flex",
|
|
10339
|
+
alignItems: "center",
|
|
10340
|
+
gap: "6px"
|
|
10341
|
+
},
|
|
10342
|
+
children: [
|
|
10343
|
+
/* @__PURE__ */ jsx14(
|
|
10344
|
+
IconSvg,
|
|
10345
|
+
{
|
|
10346
|
+
name: "code-s-slash-line",
|
|
10347
|
+
size: 14,
|
|
10348
|
+
color: "var(--chatllm-text-muted, #64748b)"
|
|
10349
|
+
}
|
|
10350
|
+
),
|
|
10351
|
+
part.title
|
|
10352
|
+
]
|
|
10353
|
+
}
|
|
10354
|
+
),
|
|
10355
|
+
/* @__PURE__ */ jsxs13("div", { style: { padding: part.language === "html" ? 0 : "12px" }, children: [
|
|
10356
|
+
part.language === "html" && /* @__PURE__ */ jsx14(HtmlArtifact, { code: part.code }),
|
|
10357
|
+
part.language === "svg" && /* @__PURE__ */ jsx14(SvgArtifact, { code: part.code }),
|
|
10358
|
+
part.language === "mermaid" && /* @__PURE__ */ jsx14(MermaidArtifact, { code: part.code })
|
|
10359
|
+
] }),
|
|
10360
|
+
/* @__PURE__ */ jsx14(ArtifactActions, { code: part.code, language: part.language })
|
|
10361
|
+
]
|
|
10362
|
+
}
|
|
10363
|
+
);
|
|
10364
|
+
};
|
|
10365
|
+
|
|
10366
|
+
// src/react/components/ContentPartRenderer.tsx
|
|
10367
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
9932
10368
|
var ContentPartRenderer = ({
|
|
9933
10369
|
parts,
|
|
9934
10370
|
onChoiceClick,
|
|
@@ -9943,10 +10379,11 @@ var ContentPartRenderer = ({
|
|
|
9943
10379
|
collectedSources.push(...part.results);
|
|
9944
10380
|
}
|
|
9945
10381
|
}
|
|
9946
|
-
|
|
10382
|
+
let artifactIndex = 0;
|
|
10383
|
+
return /* @__PURE__ */ jsx15("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: parts.map((part, idx) => {
|
|
9947
10384
|
switch (part.type) {
|
|
9948
10385
|
case "text":
|
|
9949
|
-
return /* @__PURE__ */
|
|
10386
|
+
return /* @__PURE__ */ jsx15(
|
|
9950
10387
|
MarkdownRenderer,
|
|
9951
10388
|
{
|
|
9952
10389
|
content: part.content,
|
|
@@ -9958,11 +10395,11 @@ var ContentPartRenderer = ({
|
|
|
9958
10395
|
idx
|
|
9959
10396
|
);
|
|
9960
10397
|
case "image":
|
|
9961
|
-
return /* @__PURE__ */
|
|
10398
|
+
return /* @__PURE__ */ jsx15(ImageContentCard, { part }, idx);
|
|
9962
10399
|
case "file":
|
|
9963
|
-
return /* @__PURE__ */
|
|
10400
|
+
return /* @__PURE__ */ jsx15(FileContentCard, { part }, idx);
|
|
9964
10401
|
case "search_result":
|
|
9965
|
-
return /* @__PURE__ */
|
|
10402
|
+
return /* @__PURE__ */ jsx15("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px" }, children: part.results.map((source, si) => /* @__PURE__ */ jsx15(
|
|
9966
10403
|
LinkChip,
|
|
9967
10404
|
{
|
|
9968
10405
|
text: source.title,
|
|
@@ -9973,7 +10410,7 @@ var ContentPartRenderer = ({
|
|
|
9973
10410
|
si
|
|
9974
10411
|
)) }, idx);
|
|
9975
10412
|
case "tool_loading":
|
|
9976
|
-
return /* @__PURE__ */
|
|
10413
|
+
return /* @__PURE__ */ jsx15(
|
|
9977
10414
|
ToolStatusCard,
|
|
9978
10415
|
{
|
|
9979
10416
|
toolName: part.toolName,
|
|
@@ -9985,8 +10422,8 @@ var ContentPartRenderer = ({
|
|
|
9985
10422
|
case "tool_result": {
|
|
9986
10423
|
const { result } = part;
|
|
9987
10424
|
const effectiveType = result.type !== "text" ? result.type : result.metadata?.type || result.metadata?.resultType || result.type;
|
|
9988
|
-
return /* @__PURE__ */
|
|
9989
|
-
/* @__PURE__ */
|
|
10425
|
+
return /* @__PURE__ */ jsxs14("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: [
|
|
10426
|
+
/* @__PURE__ */ jsx15(
|
|
9990
10427
|
ToolStatusCard,
|
|
9991
10428
|
{
|
|
9992
10429
|
toolName: part.toolName,
|
|
@@ -9997,13 +10434,13 @@ var ContentPartRenderer = ({
|
|
|
9997
10434
|
errorMessage: effectiveType === "error" ? result.content : void 0
|
|
9998
10435
|
}
|
|
9999
10436
|
),
|
|
10000
|
-
effectiveType === "image" && /* @__PURE__ */
|
|
10437
|
+
effectiveType === "image" && /* @__PURE__ */ jsx15(
|
|
10001
10438
|
ImageContentCard,
|
|
10002
10439
|
{
|
|
10003
10440
|
part: { type: "image", url: result.content, alt: result.metadata?.alt }
|
|
10004
10441
|
}
|
|
10005
10442
|
),
|
|
10006
|
-
effectiveType === "file" && /* @__PURE__ */
|
|
10443
|
+
effectiveType === "file" && /* @__PURE__ */ jsx15(
|
|
10007
10444
|
FileContentCard,
|
|
10008
10445
|
{
|
|
10009
10446
|
part: {
|
|
@@ -10016,8 +10453,10 @@ var ContentPartRenderer = ({
|
|
|
10016
10453
|
)
|
|
10017
10454
|
] }, idx);
|
|
10018
10455
|
}
|
|
10456
|
+
case "artifact":
|
|
10457
|
+
return /* @__PURE__ */ jsx15(ArtifactCard, { part, index: artifactIndex++ }, idx);
|
|
10019
10458
|
case "error":
|
|
10020
|
-
return /* @__PURE__ */
|
|
10459
|
+
return /* @__PURE__ */ jsxs14(
|
|
10021
10460
|
"div",
|
|
10022
10461
|
{
|
|
10023
10462
|
style: {
|
|
@@ -10032,7 +10471,7 @@ var ContentPartRenderer = ({
|
|
|
10032
10471
|
gap: "8px"
|
|
10033
10472
|
},
|
|
10034
10473
|
children: [
|
|
10035
|
-
/* @__PURE__ */
|
|
10474
|
+
/* @__PURE__ */ jsx15(IconSvg, { name: "error-warning-line", size: 16, color: "var(--chatllm-error, #ef4444)" }),
|
|
10036
10475
|
part.message
|
|
10037
10476
|
]
|
|
10038
10477
|
},
|
|
@@ -10045,8 +10484,8 @@ var ContentPartRenderer = ({
|
|
|
10045
10484
|
};
|
|
10046
10485
|
|
|
10047
10486
|
// src/react/components/ChecklistCard.tsx
|
|
10048
|
-
import { useState as
|
|
10049
|
-
import { jsx as
|
|
10487
|
+
import { useState as useState16, useMemo as useMemo5 } from "react";
|
|
10488
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
10050
10489
|
var ChecklistCard = ({
|
|
10051
10490
|
items,
|
|
10052
10491
|
completed,
|
|
@@ -10055,7 +10494,7 @@ var ChecklistCard = ({
|
|
|
10055
10494
|
onSkipStep,
|
|
10056
10495
|
onStart
|
|
10057
10496
|
}) => {
|
|
10058
|
-
const [expandedItems, setExpandedItems] =
|
|
10497
|
+
const [expandedItems, setExpandedItems] = useState16(/* @__PURE__ */ new Set());
|
|
10059
10498
|
const { doneCount, isRunning, hasError, isWaiting } = useMemo5(() => {
|
|
10060
10499
|
const done = items.filter((it) => it.status === "done").length;
|
|
10061
10500
|
const running = items.some((it) => it.status === "in_progress");
|
|
@@ -10078,7 +10517,7 @@ var ChecklistCard = ({
|
|
|
10078
10517
|
const renderStatusIcon = (item) => {
|
|
10079
10518
|
switch (item.status) {
|
|
10080
10519
|
case "done":
|
|
10081
|
-
return /* @__PURE__ */
|
|
10520
|
+
return /* @__PURE__ */ jsx16(
|
|
10082
10521
|
"div",
|
|
10083
10522
|
{
|
|
10084
10523
|
style: {
|
|
@@ -10091,11 +10530,11 @@ var ChecklistCard = ({
|
|
|
10091
10530
|
justifyContent: "center",
|
|
10092
10531
|
flexShrink: 0
|
|
10093
10532
|
},
|
|
10094
|
-
children: /* @__PURE__ */
|
|
10533
|
+
children: /* @__PURE__ */ jsx16(IconSvg, { name: "check-line", size: 13, color: "#fff" })
|
|
10095
10534
|
}
|
|
10096
10535
|
);
|
|
10097
10536
|
case "in_progress":
|
|
10098
|
-
return /* @__PURE__ */
|
|
10537
|
+
return /* @__PURE__ */ jsx16(
|
|
10099
10538
|
"div",
|
|
10100
10539
|
{
|
|
10101
10540
|
style: {
|
|
@@ -10109,11 +10548,11 @@ var ChecklistCard = ({
|
|
|
10109
10548
|
flexShrink: 0,
|
|
10110
10549
|
animation: "chatllm-checklist-pulse 1.5s ease-in-out infinite"
|
|
10111
10550
|
},
|
|
10112
|
-
children: /* @__PURE__ */
|
|
10551
|
+
children: /* @__PURE__ */ jsx16("div", { style: { width: "6px", height: "6px", borderRadius: "50%", backgroundColor: "#fff" } })
|
|
10113
10552
|
}
|
|
10114
10553
|
);
|
|
10115
10554
|
case "error":
|
|
10116
|
-
return /* @__PURE__ */
|
|
10555
|
+
return /* @__PURE__ */ jsx16(
|
|
10117
10556
|
"div",
|
|
10118
10557
|
{
|
|
10119
10558
|
style: {
|
|
@@ -10126,11 +10565,11 @@ var ChecklistCard = ({
|
|
|
10126
10565
|
justifyContent: "center",
|
|
10127
10566
|
flexShrink: 0
|
|
10128
10567
|
},
|
|
10129
|
-
children: /* @__PURE__ */
|
|
10568
|
+
children: /* @__PURE__ */ jsx16(IconSvg, { name: "close-line", size: 13, color: "#fff" })
|
|
10130
10569
|
}
|
|
10131
10570
|
);
|
|
10132
10571
|
default:
|
|
10133
|
-
return /* @__PURE__ */
|
|
10572
|
+
return /* @__PURE__ */ jsx16(
|
|
10134
10573
|
"div",
|
|
10135
10574
|
{
|
|
10136
10575
|
style: {
|
|
@@ -10148,7 +10587,7 @@ var ChecklistCard = ({
|
|
|
10148
10587
|
const headerText = completed ? "\uBAA8\uB4E0 \uB2E8\uACC4 \uC644\uB8CC" : hasError ? "\uC791\uC5C5 \uC911\uB2E8\uB428" : isRunning ? `\uC791\uC5C5 \uC9C4\uD589 \uC911 \xB7 ${doneCount}/${items.length}` : `\uB300\uAE30 \uC911 \xB7 ${doneCount}/${items.length}`;
|
|
10149
10588
|
const headerColor = completed ? "var(--chatllm-success, #22c55e)" : hasError ? "var(--chatllm-error, #ef4444)" : "var(--chatllm-primary, #3584FA)";
|
|
10150
10589
|
const progressBarColor = completed ? "var(--chatllm-success, #22c55e)" : "var(--chatllm-primary, #3584FA)";
|
|
10151
|
-
return /* @__PURE__ */
|
|
10590
|
+
return /* @__PURE__ */ jsxs15(
|
|
10152
10591
|
"div",
|
|
10153
10592
|
{
|
|
10154
10593
|
style: {
|
|
@@ -10159,9 +10598,9 @@ var ChecklistCard = ({
|
|
|
10159
10598
|
marginTop: "8px"
|
|
10160
10599
|
},
|
|
10161
10600
|
children: [
|
|
10162
|
-
/* @__PURE__ */
|
|
10163
|
-
/* @__PURE__ */
|
|
10164
|
-
/* @__PURE__ */
|
|
10601
|
+
/* @__PURE__ */ jsxs15("div", { style: { padding: "14px 16px 10px" }, children: [
|
|
10602
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: [
|
|
10603
|
+
/* @__PURE__ */ jsx16(
|
|
10165
10604
|
IconSvg,
|
|
10166
10605
|
{
|
|
10167
10606
|
name: completed ? "checkbox-circle-line" : "list-check",
|
|
@@ -10169,9 +10608,9 @@ var ChecklistCard = ({
|
|
|
10169
10608
|
color: headerColor
|
|
10170
10609
|
}
|
|
10171
10610
|
),
|
|
10172
|
-
/* @__PURE__ */
|
|
10611
|
+
/* @__PURE__ */ jsx16("span", { style: { fontSize: "13px", fontWeight: 600, color: headerColor }, children: headerText })
|
|
10173
10612
|
] }),
|
|
10174
|
-
/* @__PURE__ */
|
|
10613
|
+
/* @__PURE__ */ jsx16(
|
|
10175
10614
|
"div",
|
|
10176
10615
|
{
|
|
10177
10616
|
style: {
|
|
@@ -10180,7 +10619,7 @@ var ChecklistCard = ({
|
|
|
10180
10619
|
borderRadius: "2px",
|
|
10181
10620
|
overflow: "hidden"
|
|
10182
10621
|
},
|
|
10183
|
-
children: /* @__PURE__ */
|
|
10622
|
+
children: /* @__PURE__ */ jsx16(
|
|
10184
10623
|
"div",
|
|
10185
10624
|
{
|
|
10186
10625
|
style: {
|
|
@@ -10195,12 +10634,12 @@ var ChecklistCard = ({
|
|
|
10195
10634
|
}
|
|
10196
10635
|
)
|
|
10197
10636
|
] }),
|
|
10198
|
-
/* @__PURE__ */
|
|
10637
|
+
/* @__PURE__ */ jsx16("div", { children: items.map((item, idx) => {
|
|
10199
10638
|
const isExpanded = expandedItems.has(item.id);
|
|
10200
10639
|
const canExpand = item.status === "done" && item.result && item.result !== "(\uAC74\uB108\uB700)";
|
|
10201
10640
|
const isStopped = !isRunning && !completed;
|
|
10202
|
-
return /* @__PURE__ */
|
|
10203
|
-
/* @__PURE__ */
|
|
10641
|
+
return /* @__PURE__ */ jsxs15("div", { children: [
|
|
10642
|
+
/* @__PURE__ */ jsxs15(
|
|
10204
10643
|
"div",
|
|
10205
10644
|
{
|
|
10206
10645
|
onClick: () => canExpand && toggleExpanded(item.id),
|
|
@@ -10217,7 +10656,7 @@ var ChecklistCard = ({
|
|
|
10217
10656
|
},
|
|
10218
10657
|
children: [
|
|
10219
10658
|
renderStatusIcon(item),
|
|
10220
|
-
/* @__PURE__ */
|
|
10659
|
+
/* @__PURE__ */ jsxs15(
|
|
10221
10660
|
"span",
|
|
10222
10661
|
{
|
|
10223
10662
|
style: {
|
|
@@ -10233,7 +10672,7 @@ var ChecklistCard = ({
|
|
|
10233
10672
|
]
|
|
10234
10673
|
}
|
|
10235
10674
|
),
|
|
10236
|
-
item.status === "error" && onRetryStep && /* @__PURE__ */
|
|
10675
|
+
item.status === "error" && onRetryStep && /* @__PURE__ */ jsx16(
|
|
10237
10676
|
"button",
|
|
10238
10677
|
{
|
|
10239
10678
|
onClick: (e) => {
|
|
@@ -10253,7 +10692,7 @@ var ChecklistCard = ({
|
|
|
10253
10692
|
children: "\uC7AC\uC2DC\uB3C4"
|
|
10254
10693
|
}
|
|
10255
10694
|
),
|
|
10256
|
-
item.status === "pending" && isStopped && hasError && onSkipStep && /* @__PURE__ */
|
|
10695
|
+
item.status === "pending" && isStopped && hasError && onSkipStep && /* @__PURE__ */ jsx16(
|
|
10257
10696
|
"button",
|
|
10258
10697
|
{
|
|
10259
10698
|
onClick: (e) => {
|
|
@@ -10273,7 +10712,7 @@ var ChecklistCard = ({
|
|
|
10273
10712
|
children: "\uAC74\uB108\uB6F0\uAE30"
|
|
10274
10713
|
}
|
|
10275
10714
|
),
|
|
10276
|
-
canExpand && /* @__PURE__ */
|
|
10715
|
+
canExpand && /* @__PURE__ */ jsx16(
|
|
10277
10716
|
IconSvg,
|
|
10278
10717
|
{
|
|
10279
10718
|
name: isExpanded ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
@@ -10281,11 +10720,11 @@ var ChecklistCard = ({
|
|
|
10281
10720
|
color: "var(--chatllm-text-muted, #94a3b8)"
|
|
10282
10721
|
}
|
|
10283
10722
|
),
|
|
10284
|
-
item.result === "(\uAC74\uB108\uB700)" && /* @__PURE__ */
|
|
10723
|
+
item.result === "(\uAC74\uB108\uB700)" && /* @__PURE__ */ jsx16("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #94a3b8)" }, children: "\uAC74\uB108\uB700" })
|
|
10285
10724
|
]
|
|
10286
10725
|
}
|
|
10287
10726
|
),
|
|
10288
|
-
canExpand && isExpanded && /* @__PURE__ */
|
|
10727
|
+
canExpand && isExpanded && /* @__PURE__ */ jsxs15(
|
|
10289
10728
|
"div",
|
|
10290
10729
|
{
|
|
10291
10730
|
className: "chatllm-scrollbar",
|
|
@@ -10301,7 +10740,7 @@ var ChecklistCard = ({
|
|
|
10301
10740
|
color: "var(--chatllm-text-secondary, #475569)"
|
|
10302
10741
|
},
|
|
10303
10742
|
children: [
|
|
10304
|
-
item.imageUrl && /* @__PURE__ */
|
|
10743
|
+
item.imageUrl && /* @__PURE__ */ jsx16(
|
|
10305
10744
|
"img",
|
|
10306
10745
|
{
|
|
10307
10746
|
src: item.imageUrl,
|
|
@@ -10313,13 +10752,13 @@ var ChecklistCard = ({
|
|
|
10313
10752
|
}
|
|
10314
10753
|
}
|
|
10315
10754
|
),
|
|
10316
|
-
item.result && /* @__PURE__ */
|
|
10755
|
+
item.result && /* @__PURE__ */ jsx16(MarkdownRenderer, { content: item.result })
|
|
10317
10756
|
]
|
|
10318
10757
|
}
|
|
10319
10758
|
)
|
|
10320
10759
|
] }, item.id);
|
|
10321
10760
|
}) }),
|
|
10322
|
-
/* @__PURE__ */
|
|
10761
|
+
/* @__PURE__ */ jsxs15(
|
|
10323
10762
|
"div",
|
|
10324
10763
|
{
|
|
10325
10764
|
style: {
|
|
@@ -10330,13 +10769,13 @@ var ChecklistCard = ({
|
|
|
10330
10769
|
borderTop: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
10331
10770
|
},
|
|
10332
10771
|
children: [
|
|
10333
|
-
/* @__PURE__ */
|
|
10772
|
+
/* @__PURE__ */ jsxs15("span", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #94a3b8)" }, children: [
|
|
10334
10773
|
doneCount,
|
|
10335
10774
|
"/",
|
|
10336
10775
|
items.length,
|
|
10337
10776
|
" \uC644\uB8CC"
|
|
10338
10777
|
] }),
|
|
10339
|
-
isWaiting && !completed && onStart && /* @__PURE__ */
|
|
10778
|
+
isWaiting && !completed && onStart && /* @__PURE__ */ jsx16(
|
|
10340
10779
|
"button",
|
|
10341
10780
|
{
|
|
10342
10781
|
onClick: onStart,
|
|
@@ -10354,7 +10793,7 @@ var ChecklistCard = ({
|
|
|
10354
10793
|
children: "\uC2E4\uD589"
|
|
10355
10794
|
}
|
|
10356
10795
|
),
|
|
10357
|
-
isRunning && onAbort && /* @__PURE__ */
|
|
10796
|
+
isRunning && onAbort && /* @__PURE__ */ jsx16(
|
|
10358
10797
|
"button",
|
|
10359
10798
|
{
|
|
10360
10799
|
onClick: onAbort,
|
|
@@ -10393,7 +10832,7 @@ var ChecklistMiniIndicator = ({
|
|
|
10393
10832
|
const statusText = completed ? "\uBAA8\uB4E0 \uB2E8\uACC4 \uC644\uB8CC" : hasError ? "\uC791\uC5C5 \uC911\uB2E8\uB428" : isRunning ? `\uC791\uC5C5 \uC9C4\uD589 \uC911 \xB7 ${doneCount}/${items.length}` : `\uB300\uAE30 \uC911 \xB7 ${items.length}\uB2E8\uACC4`;
|
|
10394
10833
|
const statusColor = completed ? "var(--chatllm-success, #22c55e)" : hasError ? "var(--chatllm-error, #ef4444)" : "var(--chatllm-primary, #3584FA)";
|
|
10395
10834
|
const barColor = completed ? "var(--chatllm-success, #22c55e)" : "var(--chatllm-primary, #3584FA)";
|
|
10396
|
-
return /* @__PURE__ */
|
|
10835
|
+
return /* @__PURE__ */ jsxs15(
|
|
10397
10836
|
"div",
|
|
10398
10837
|
{
|
|
10399
10838
|
style: {
|
|
@@ -10404,13 +10843,13 @@ var ChecklistMiniIndicator = ({
|
|
|
10404
10843
|
} : {}
|
|
10405
10844
|
},
|
|
10406
10845
|
children: [
|
|
10407
|
-
isWaiting && onStart && /* @__PURE__ */
|
|
10846
|
+
isWaiting && onStart && /* @__PURE__ */ jsx16("style", { children: `
|
|
10408
10847
|
@keyframes chatllm-checklist-pending-pulse {
|
|
10409
10848
|
0%, 100% { box-shadow: 0 0 0 0 rgba(53, 132, 250, 0.15); }
|
|
10410
10849
|
50% { box-shadow: 0 0 0 4px rgba(53, 132, 250, 0.15); }
|
|
10411
10850
|
}
|
|
10412
10851
|
` }),
|
|
10413
|
-
/* @__PURE__ */
|
|
10852
|
+
/* @__PURE__ */ jsxs15(
|
|
10414
10853
|
"div",
|
|
10415
10854
|
{
|
|
10416
10855
|
onClick: isWaiting ? void 0 : onClick,
|
|
@@ -10426,7 +10865,7 @@ var ChecklistMiniIndicator = ({
|
|
|
10426
10865
|
transition: "border-color 0.15s ease, background-color 0.15s ease"
|
|
10427
10866
|
},
|
|
10428
10867
|
children: [
|
|
10429
|
-
/* @__PURE__ */
|
|
10868
|
+
/* @__PURE__ */ jsx16(
|
|
10430
10869
|
IconSvg,
|
|
10431
10870
|
{
|
|
10432
10871
|
name: completed ? "checkbox-circle-line" : "list-check",
|
|
@@ -10434,7 +10873,7 @@ var ChecklistMiniIndicator = ({
|
|
|
10434
10873
|
color: statusColor
|
|
10435
10874
|
}
|
|
10436
10875
|
),
|
|
10437
|
-
/* @__PURE__ */
|
|
10876
|
+
/* @__PURE__ */ jsx16(
|
|
10438
10877
|
"span",
|
|
10439
10878
|
{
|
|
10440
10879
|
style: {
|
|
@@ -10446,7 +10885,7 @@ var ChecklistMiniIndicator = ({
|
|
|
10446
10885
|
children: statusText
|
|
10447
10886
|
}
|
|
10448
10887
|
),
|
|
10449
|
-
!isWaiting && /* @__PURE__ */
|
|
10888
|
+
!isWaiting && /* @__PURE__ */ jsx16(
|
|
10450
10889
|
"div",
|
|
10451
10890
|
{
|
|
10452
10891
|
style: {
|
|
@@ -10457,7 +10896,7 @@ var ChecklistMiniIndicator = ({
|
|
|
10457
10896
|
overflow: "hidden",
|
|
10458
10897
|
minWidth: "60px"
|
|
10459
10898
|
},
|
|
10460
|
-
children: /* @__PURE__ */
|
|
10899
|
+
children: /* @__PURE__ */ jsx16(
|
|
10461
10900
|
"div",
|
|
10462
10901
|
{
|
|
10463
10902
|
style: {
|
|
@@ -10471,8 +10910,8 @@ var ChecklistMiniIndicator = ({
|
|
|
10471
10910
|
)
|
|
10472
10911
|
}
|
|
10473
10912
|
),
|
|
10474
|
-
isWaiting && onStart && /* @__PURE__ */
|
|
10475
|
-
/* @__PURE__ */
|
|
10913
|
+
isWaiting && onStart && /* @__PURE__ */ jsxs15("div", { style: { display: "flex", gap: "6px", marginLeft: "auto" }, children: [
|
|
10914
|
+
/* @__PURE__ */ jsx16(
|
|
10476
10915
|
"span",
|
|
10477
10916
|
{
|
|
10478
10917
|
style: {
|
|
@@ -10484,7 +10923,7 @@ var ChecklistMiniIndicator = ({
|
|
|
10484
10923
|
children: "\uC218\uC815\uD558\uB824\uBA74 \uBA54\uC2DC\uC9C0\uB97C \uBCF4\uB0B4\uC138\uC694"
|
|
10485
10924
|
}
|
|
10486
10925
|
),
|
|
10487
|
-
/* @__PURE__ */
|
|
10926
|
+
/* @__PURE__ */ jsx16(
|
|
10488
10927
|
"button",
|
|
10489
10928
|
{
|
|
10490
10929
|
onClick: (e) => {
|
|
@@ -10507,7 +10946,7 @@ var ChecklistMiniIndicator = ({
|
|
|
10507
10946
|
}
|
|
10508
10947
|
)
|
|
10509
10948
|
] }),
|
|
10510
|
-
!isWaiting && onClick && /* @__PURE__ */
|
|
10949
|
+
!isWaiting && onClick && /* @__PURE__ */ jsx16(
|
|
10511
10950
|
IconSvg,
|
|
10512
10951
|
{
|
|
10513
10952
|
name: "arrow-right-line",
|
|
@@ -10524,7 +10963,7 @@ var ChecklistMiniIndicator = ({
|
|
|
10524
10963
|
};
|
|
10525
10964
|
|
|
10526
10965
|
// src/react/components/MessageBubble.tsx
|
|
10527
|
-
import { jsx as
|
|
10966
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
10528
10967
|
var MessageBubble = ({
|
|
10529
10968
|
message,
|
|
10530
10969
|
isLoading,
|
|
@@ -10553,9 +10992,9 @@ var MessageBubble = ({
|
|
|
10553
10992
|
onToggleChecklistPanel,
|
|
10554
10993
|
onChecklistStart
|
|
10555
10994
|
}) => {
|
|
10556
|
-
const [showActions, setShowActions] =
|
|
10557
|
-
const [showModelMenu, setShowModelMenu] =
|
|
10558
|
-
const [stepExpanded, setStepExpanded] =
|
|
10995
|
+
const [showActions, setShowActions] = useState17(false);
|
|
10996
|
+
const [showModelMenu, setShowModelMenu] = useState17(false);
|
|
10997
|
+
const [stepExpanded, setStepExpanded] = useState17(false);
|
|
10559
10998
|
const isUser = message.role === "user";
|
|
10560
10999
|
const isAssistant = message.role === "assistant";
|
|
10561
11000
|
const relevantAlternatives = isUser ? alternatives : message.alternatives;
|
|
@@ -10567,14 +11006,14 @@ var MessageBubble = ({
|
|
|
10567
11006
|
const displaySources = isAssistant && relevantAlternatives && relevantAlternatives.length > 0 && relevantActiveIndex > 0 ? relevantAlternatives[relevantActiveIndex - 1]?.sources : message.sources;
|
|
10568
11007
|
if (isAssistant && message.checklistStepInfo) {
|
|
10569
11008
|
const { step, total, title } = message.checklistStepInfo;
|
|
10570
|
-
return /* @__PURE__ */
|
|
11009
|
+
return /* @__PURE__ */ jsxs16(
|
|
10571
11010
|
"div",
|
|
10572
11011
|
{
|
|
10573
11012
|
style: {
|
|
10574
11013
|
padding: "2px 24px"
|
|
10575
11014
|
},
|
|
10576
11015
|
children: [
|
|
10577
|
-
/* @__PURE__ */
|
|
11016
|
+
/* @__PURE__ */ jsxs16(
|
|
10578
11017
|
"div",
|
|
10579
11018
|
{
|
|
10580
11019
|
onClick: () => setStepExpanded(!stepExpanded),
|
|
@@ -10591,7 +11030,7 @@ var MessageBubble = ({
|
|
|
10591
11030
|
marginLeft: "44px"
|
|
10592
11031
|
},
|
|
10593
11032
|
children: [
|
|
10594
|
-
/* @__PURE__ */
|
|
11033
|
+
/* @__PURE__ */ jsx17(
|
|
10595
11034
|
IconSvg,
|
|
10596
11035
|
{
|
|
10597
11036
|
name: "checkbox-circle-line",
|
|
@@ -10599,7 +11038,7 @@ var MessageBubble = ({
|
|
|
10599
11038
|
color: "var(--chatllm-success, #22c55e)"
|
|
10600
11039
|
}
|
|
10601
11040
|
),
|
|
10602
|
-
/* @__PURE__ */
|
|
11041
|
+
/* @__PURE__ */ jsxs16("span", { style: {
|
|
10603
11042
|
flex: 1,
|
|
10604
11043
|
fontSize: "13px",
|
|
10605
11044
|
color: "var(--chatllm-text-secondary, #475569)"
|
|
@@ -10610,7 +11049,7 @@ var MessageBubble = ({
|
|
|
10610
11049
|
"\uB2E8\uACC4: ",
|
|
10611
11050
|
title
|
|
10612
11051
|
] }),
|
|
10613
|
-
/* @__PURE__ */
|
|
11052
|
+
/* @__PURE__ */ jsx17(
|
|
10614
11053
|
IconSvg,
|
|
10615
11054
|
{
|
|
10616
11055
|
name: stepExpanded ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
@@ -10621,7 +11060,7 @@ var MessageBubble = ({
|
|
|
10621
11060
|
]
|
|
10622
11061
|
}
|
|
10623
11062
|
),
|
|
10624
|
-
stepExpanded && /* @__PURE__ */
|
|
11063
|
+
stepExpanded && /* @__PURE__ */ jsx17(
|
|
10625
11064
|
"div",
|
|
10626
11065
|
{
|
|
10627
11066
|
className: "chatllm-sheet",
|
|
@@ -10631,7 +11070,7 @@ var MessageBubble = ({
|
|
|
10631
11070
|
marginLeft: "44px",
|
|
10632
11071
|
maxWidth: "calc(100% - 44px)"
|
|
10633
11072
|
},
|
|
10634
|
-
children: /* @__PURE__ */
|
|
11073
|
+
children: /* @__PURE__ */ jsx17("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx17(MarkdownRenderer, { content: displayContent }) })
|
|
10635
11074
|
}
|
|
10636
11075
|
)
|
|
10637
11076
|
]
|
|
@@ -10639,7 +11078,7 @@ var MessageBubble = ({
|
|
|
10639
11078
|
);
|
|
10640
11079
|
}
|
|
10641
11080
|
if (isUser) {
|
|
10642
|
-
return /* @__PURE__ */
|
|
11081
|
+
return /* @__PURE__ */ jsxs16(
|
|
10643
11082
|
"div",
|
|
10644
11083
|
{
|
|
10645
11084
|
className: "chatllm-message chatllm-message--user",
|
|
@@ -10652,7 +11091,7 @@ var MessageBubble = ({
|
|
|
10652
11091
|
onMouseEnter: () => setShowActions(true),
|
|
10653
11092
|
onMouseLeave: () => setShowActions(false),
|
|
10654
11093
|
children: [
|
|
10655
|
-
/* @__PURE__ */
|
|
11094
|
+
/* @__PURE__ */ jsx17(
|
|
10656
11095
|
"div",
|
|
10657
11096
|
{
|
|
10658
11097
|
style: {
|
|
@@ -10662,9 +11101,9 @@ var MessageBubble = ({
|
|
|
10662
11101
|
borderRadius: "16px",
|
|
10663
11102
|
borderTopRightRadius: "4px"
|
|
10664
11103
|
},
|
|
10665
|
-
children: message.contentParts?.length ? /* @__PURE__ */
|
|
11104
|
+
children: message.contentParts?.length ? /* @__PURE__ */ jsx17("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: message.contentParts.map((part, idx) => {
|
|
10666
11105
|
if (part.type === "text") {
|
|
10667
|
-
return /* @__PURE__ */
|
|
11106
|
+
return /* @__PURE__ */ jsx17(
|
|
10668
11107
|
"div",
|
|
10669
11108
|
{
|
|
10670
11109
|
style: {
|
|
@@ -10679,7 +11118,7 @@ var MessageBubble = ({
|
|
|
10679
11118
|
);
|
|
10680
11119
|
}
|
|
10681
11120
|
if (part.type === "image") {
|
|
10682
|
-
return /* @__PURE__ */
|
|
11121
|
+
return /* @__PURE__ */ jsx17(
|
|
10683
11122
|
"img",
|
|
10684
11123
|
{
|
|
10685
11124
|
src: part.url,
|
|
@@ -10695,7 +11134,7 @@ var MessageBubble = ({
|
|
|
10695
11134
|
);
|
|
10696
11135
|
}
|
|
10697
11136
|
if (part.type === "file") {
|
|
10698
|
-
return /* @__PURE__ */
|
|
11137
|
+
return /* @__PURE__ */ jsxs16(
|
|
10699
11138
|
"div",
|
|
10700
11139
|
{
|
|
10701
11140
|
style: {
|
|
@@ -10709,15 +11148,15 @@ var MessageBubble = ({
|
|
|
10709
11148
|
color: "var(--chatllm-text)"
|
|
10710
11149
|
},
|
|
10711
11150
|
children: [
|
|
10712
|
-
/* @__PURE__ */
|
|
10713
|
-
/* @__PURE__ */
|
|
11151
|
+
/* @__PURE__ */ jsx17(IconSvg, { name: "file-text-line", size: 16, color: "var(--chatllm-text-muted)" }),
|
|
11152
|
+
/* @__PURE__ */ jsx17("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: part.name })
|
|
10714
11153
|
]
|
|
10715
11154
|
},
|
|
10716
11155
|
idx
|
|
10717
11156
|
);
|
|
10718
11157
|
}
|
|
10719
11158
|
return null;
|
|
10720
|
-
}) }) : /* @__PURE__ */
|
|
11159
|
+
}) }) : /* @__PURE__ */ jsx17(
|
|
10721
11160
|
"div",
|
|
10722
11161
|
{
|
|
10723
11162
|
style: {
|
|
@@ -10731,7 +11170,7 @@ var MessageBubble = ({
|
|
|
10731
11170
|
)
|
|
10732
11171
|
}
|
|
10733
11172
|
),
|
|
10734
|
-
!isLoading && /* @__PURE__ */
|
|
11173
|
+
!isLoading && /* @__PURE__ */ jsxs16(
|
|
10735
11174
|
"div",
|
|
10736
11175
|
{
|
|
10737
11176
|
style: {
|
|
@@ -10743,7 +11182,7 @@ var MessageBubble = ({
|
|
|
10743
11182
|
transition: "opacity 0.15s ease"
|
|
10744
11183
|
},
|
|
10745
11184
|
children: [
|
|
10746
|
-
/* @__PURE__ */
|
|
11185
|
+
/* @__PURE__ */ jsx17("button", { onClick: onCopy, style: actionButtonSmallStyle, title: "\uBCF5\uC0AC", children: /* @__PURE__ */ jsx17(
|
|
10747
11186
|
IconSvg,
|
|
10748
11187
|
{
|
|
10749
11188
|
name: isCopied ? "check-line" : "file-copy-line",
|
|
@@ -10751,7 +11190,7 @@ var MessageBubble = ({
|
|
|
10751
11190
|
color: isCopied ? "var(--chatllm-success)" : "var(--chatllm-text-muted)"
|
|
10752
11191
|
}
|
|
10753
11192
|
) }),
|
|
10754
|
-
/* @__PURE__ */
|
|
11193
|
+
/* @__PURE__ */ jsx17("button", { onClick: onEdit, style: actionButtonSmallStyle, title: "\uC218\uC815", children: /* @__PURE__ */ jsx17(IconSvg, { name: "edit-line", size: 12, color: "var(--chatllm-text-muted)" }) })
|
|
10755
11194
|
]
|
|
10756
11195
|
}
|
|
10757
11196
|
)
|
|
@@ -10759,7 +11198,7 @@ var MessageBubble = ({
|
|
|
10759
11198
|
}
|
|
10760
11199
|
);
|
|
10761
11200
|
}
|
|
10762
|
-
return /* @__PURE__ */
|
|
11201
|
+
return /* @__PURE__ */ jsxs16(
|
|
10763
11202
|
"div",
|
|
10764
11203
|
{
|
|
10765
11204
|
className: "chatllm-message chatllm-message--assistant",
|
|
@@ -10772,7 +11211,7 @@ var MessageBubble = ({
|
|
|
10772
11211
|
onMouseEnter: () => setShowActions(true),
|
|
10773
11212
|
onMouseLeave: () => setShowActions(false),
|
|
10774
11213
|
children: [
|
|
10775
|
-
/* @__PURE__ */
|
|
11214
|
+
/* @__PURE__ */ jsxs16(
|
|
10776
11215
|
"div",
|
|
10777
11216
|
{
|
|
10778
11217
|
className: "chatllm-sheet",
|
|
@@ -10783,7 +11222,7 @@ var MessageBubble = ({
|
|
|
10783
11222
|
gap: "12px"
|
|
10784
11223
|
},
|
|
10785
11224
|
children: [
|
|
10786
|
-
/* @__PURE__ */
|
|
11225
|
+
/* @__PURE__ */ jsx17("div", { style: { flexShrink: 0 }, children: assistantIcon || /* @__PURE__ */ jsx17(
|
|
10787
11226
|
"div",
|
|
10788
11227
|
{
|
|
10789
11228
|
style: {
|
|
@@ -10796,11 +11235,11 @@ var MessageBubble = ({
|
|
|
10796
11235
|
justifyContent: "center",
|
|
10797
11236
|
color: "var(--chatllm-primary)"
|
|
10798
11237
|
},
|
|
10799
|
-
children: /* @__PURE__ */
|
|
11238
|
+
children: /* @__PURE__ */ jsx17(IconSvg, { name: "magic-line", size: 20 })
|
|
10800
11239
|
}
|
|
10801
11240
|
) }),
|
|
10802
|
-
/* @__PURE__ */
|
|
10803
|
-
displayModel && /* @__PURE__ */
|
|
11241
|
+
/* @__PURE__ */ jsxs16("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
11242
|
+
displayModel && /* @__PURE__ */ jsx17(
|
|
10804
11243
|
"div",
|
|
10805
11244
|
{
|
|
10806
11245
|
style: {
|
|
@@ -10809,7 +11248,7 @@ var MessageBubble = ({
|
|
|
10809
11248
|
gap: "8px",
|
|
10810
11249
|
marginBottom: "8px"
|
|
10811
11250
|
},
|
|
10812
|
-
children: /* @__PURE__ */
|
|
11251
|
+
children: /* @__PURE__ */ jsx17(
|
|
10813
11252
|
"span",
|
|
10814
11253
|
{
|
|
10815
11254
|
style: {
|
|
@@ -10824,9 +11263,9 @@ var MessageBubble = ({
|
|
|
10824
11263
|
)
|
|
10825
11264
|
}
|
|
10826
11265
|
),
|
|
10827
|
-
message.isDeepResearch && message.researchProgress && message.researchProgress.phase !== "done" && /* @__PURE__ */
|
|
10828
|
-
message.skillExecution && message.skillExecution.status !== "done" && (message.skillExecution.progress?.subAgents ? /* @__PURE__ */
|
|
10829
|
-
message.isDeepResearch && displayContent && /* @__PURE__ */
|
|
11266
|
+
message.isDeepResearch && message.researchProgress && message.researchProgress.phase !== "done" && /* @__PURE__ */ jsx17(DeepResearchProgressUI, { progress: message.researchProgress }),
|
|
11267
|
+
message.skillExecution && message.skillExecution.status !== "done" && (message.skillExecution.progress?.subAgents ? /* @__PURE__ */ jsx17(DeepResearchProgressUI, { progress: message.skillExecution.progress }) : /* @__PURE__ */ jsx17(SkillProgressUI, { execution: message.skillExecution })),
|
|
11268
|
+
message.isDeepResearch && displayContent && /* @__PURE__ */ jsxs16(
|
|
10830
11269
|
"div",
|
|
10831
11270
|
{
|
|
10832
11271
|
className: "chatllm-deep-research__header",
|
|
@@ -10839,8 +11278,8 @@ var MessageBubble = ({
|
|
|
10839
11278
|
borderBottom: "1px solid var(--chatllm-border-light)"
|
|
10840
11279
|
},
|
|
10841
11280
|
children: [
|
|
10842
|
-
/* @__PURE__ */
|
|
10843
|
-
/* @__PURE__ */
|
|
11281
|
+
/* @__PURE__ */ jsx17(IconSvg, { name: "search-eye-line", size: 18, color: "var(--chatllm-primary)" }),
|
|
11282
|
+
/* @__PURE__ */ jsx17(
|
|
10844
11283
|
"span",
|
|
10845
11284
|
{
|
|
10846
11285
|
style: {
|
|
@@ -10851,7 +11290,7 @@ var MessageBubble = ({
|
|
|
10851
11290
|
children: "\uC2EC\uCE35\uC5F0\uAD6C"
|
|
10852
11291
|
}
|
|
10853
11292
|
),
|
|
10854
|
-
displaySources && displaySources.length > 0 && /* @__PURE__ */
|
|
11293
|
+
displaySources && displaySources.length > 0 && /* @__PURE__ */ jsxs16(
|
|
10855
11294
|
"span",
|
|
10856
11295
|
{
|
|
10857
11296
|
className: "chatllm-deep-research__source-count",
|
|
@@ -10873,7 +11312,7 @@ var MessageBubble = ({
|
|
|
10873
11312
|
]
|
|
10874
11313
|
}
|
|
10875
11314
|
),
|
|
10876
|
-
!!message.contentParts?.length && /* @__PURE__ */
|
|
11315
|
+
!!message.contentParts?.length && /* @__PURE__ */ jsx17("div", { style: { wordBreak: "break-word" }, children: /* @__PURE__ */ jsx17(
|
|
10877
11316
|
ContentPartRenderer,
|
|
10878
11317
|
{
|
|
10879
11318
|
parts: message.contentParts,
|
|
@@ -10884,13 +11323,13 @@ var MessageBubble = ({
|
|
|
10884
11323
|
) }),
|
|
10885
11324
|
isLoading && !displayContent && !message.isDeepResearch && (message.contentParts?.length ? (
|
|
10886
11325
|
/* contentParts 있을 때: 간소화된 AI 응답 대기 표시 */
|
|
10887
|
-
/* @__PURE__ */
|
|
10888
|
-
/* @__PURE__ */
|
|
10889
|
-
/* @__PURE__ */
|
|
10890
|
-
/* @__PURE__ */
|
|
10891
|
-
/* @__PURE__ */
|
|
11326
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginTop: "4px" }, children: [
|
|
11327
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
|
|
11328
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
11329
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
11330
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle })
|
|
10892
11331
|
] }),
|
|
10893
|
-
/* @__PURE__ */
|
|
11332
|
+
/* @__PURE__ */ jsx17(
|
|
10894
11333
|
"span",
|
|
10895
11334
|
{
|
|
10896
11335
|
style: {
|
|
@@ -10905,14 +11344,14 @@ var MessageBubble = ({
|
|
|
10905
11344
|
] })
|
|
10906
11345
|
) : (
|
|
10907
11346
|
/* contentParts 없을 때: 풀 스켈레톤 */
|
|
10908
|
-
/* @__PURE__ */
|
|
10909
|
-
/* @__PURE__ */
|
|
10910
|
-
/* @__PURE__ */
|
|
10911
|
-
/* @__PURE__ */
|
|
10912
|
-
/* @__PURE__ */
|
|
10913
|
-
/* @__PURE__ */
|
|
11347
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
11348
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
11349
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
|
|
11350
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
11351
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
11352
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle })
|
|
10914
11353
|
] }),
|
|
10915
|
-
/* @__PURE__ */
|
|
11354
|
+
/* @__PURE__ */ jsx17(
|
|
10916
11355
|
"span",
|
|
10917
11356
|
{
|
|
10918
11357
|
style: {
|
|
@@ -10925,17 +11364,17 @@ var MessageBubble = ({
|
|
|
10925
11364
|
}
|
|
10926
11365
|
)
|
|
10927
11366
|
] }),
|
|
10928
|
-
/* @__PURE__ */
|
|
10929
|
-
/* @__PURE__ */
|
|
10930
|
-
/* @__PURE__ */
|
|
10931
|
-
/* @__PURE__ */
|
|
10932
|
-
/* @__PURE__ */
|
|
10933
|
-
/* @__PURE__ */
|
|
11367
|
+
/* @__PURE__ */ jsxs16("div", { className: "chatllm-skeleton-pulse", style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
11368
|
+
/* @__PURE__ */ jsx17("div", { style: { height: "32px", width: "75%", backgroundColor: "var(--chatllm-bg-tertiary)", borderRadius: "8px" } }),
|
|
11369
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
11370
|
+
/* @__PURE__ */ jsx17("div", { style: { height: "16px", width: "100%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } }),
|
|
11371
|
+
/* @__PURE__ */ jsx17("div", { style: { height: "16px", width: "85%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } }),
|
|
11372
|
+
/* @__PURE__ */ jsx17("div", { style: { height: "16px", width: "65%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } })
|
|
10934
11373
|
] })
|
|
10935
11374
|
] })
|
|
10936
11375
|
] })
|
|
10937
11376
|
)),
|
|
10938
|
-
displayContent ? /* @__PURE__ */
|
|
11377
|
+
displayContent ? /* @__PURE__ */ jsx17("div", { className: isLoading ? "chatllm-streaming-content" : "", style: { wordBreak: "break-word" }, children: /* @__PURE__ */ jsx17(
|
|
10939
11378
|
MarkdownRenderer,
|
|
10940
11379
|
{
|
|
10941
11380
|
content: displayContent,
|
|
@@ -10944,7 +11383,30 @@ var MessageBubble = ({
|
|
|
10944
11383
|
thinkingDefaultOpen
|
|
10945
11384
|
}
|
|
10946
11385
|
) }) : null,
|
|
10947
|
-
message.
|
|
11386
|
+
isLoading && message.content && /<artifact[^>]*>(?![\s\S]*?<\/artifact>)/i.test(message.content) && /* @__PURE__ */ jsxs16(
|
|
11387
|
+
"div",
|
|
11388
|
+
{
|
|
11389
|
+
className: "chatllm-artifact-loading",
|
|
11390
|
+
style: {
|
|
11391
|
+
display: "flex",
|
|
11392
|
+
alignItems: "center",
|
|
11393
|
+
gap: "10px",
|
|
11394
|
+
padding: "14px 16px",
|
|
11395
|
+
marginTop: "8px",
|
|
11396
|
+
borderRadius: "8px",
|
|
11397
|
+
border: "1px solid var(--chatllm-border, #e5e7eb)",
|
|
11398
|
+
backgroundColor: "var(--chatllm-bg-secondary, #f9fafb)"
|
|
11399
|
+
},
|
|
11400
|
+
children: [
|
|
11401
|
+
/* @__PURE__ */ jsx17(IconSvg, { name: "loader-4-line", size: 18, color: "var(--chatllm-primary, #6366f1)" }),
|
|
11402
|
+
/* @__PURE__ */ jsx17("span", { style: {
|
|
11403
|
+
fontSize: "13px",
|
|
11404
|
+
color: "var(--chatllm-text-muted, #64748b)"
|
|
11405
|
+
}, children: "\uC2DC\uAC01\uD654 \uC0DD\uC131 \uC911..." })
|
|
11406
|
+
]
|
|
11407
|
+
}
|
|
11408
|
+
),
|
|
11409
|
+
message.pollBlock && message.pollBlock.questions.length > 0 && /* @__PURE__ */ jsx17(
|
|
10948
11410
|
PollCard,
|
|
10949
11411
|
{
|
|
10950
11412
|
questions: message.pollBlock.questions,
|
|
@@ -10956,7 +11418,7 @@ var MessageBubble = ({
|
|
|
10956
11418
|
}
|
|
10957
11419
|
}
|
|
10958
11420
|
),
|
|
10959
|
-
message.checklistBlock && message.checklistBlock.items.length > 0 && /* @__PURE__ */
|
|
11421
|
+
message.checklistBlock && message.checklistBlock.items.length > 0 && /* @__PURE__ */ jsx17(
|
|
10960
11422
|
ChecklistMiniIndicator,
|
|
10961
11423
|
{
|
|
10962
11424
|
items: message.checklistBlock.items,
|
|
@@ -10965,7 +11427,7 @@ var MessageBubble = ({
|
|
|
10965
11427
|
onStart: onChecklistStart
|
|
10966
11428
|
}
|
|
10967
11429
|
),
|
|
10968
|
-
!isLoading && !displayContent && !message.pollBlock && !message.checklistBlock && !message.contentParts?.length && /* @__PURE__ */
|
|
11430
|
+
!isLoading && !displayContent && !message.pollBlock && !message.checklistBlock && !message.contentParts?.length && /* @__PURE__ */ jsx17(
|
|
10969
11431
|
"div",
|
|
10970
11432
|
{
|
|
10971
11433
|
style: {
|
|
@@ -10978,7 +11440,7 @@ var MessageBubble = ({
|
|
|
10978
11440
|
children: "\uC751\uB2F5\uC744 \uC0DD\uC131\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."
|
|
10979
11441
|
}
|
|
10980
11442
|
),
|
|
10981
|
-
displaySources && displaySources.length > 0 && /* @__PURE__ */
|
|
11443
|
+
displaySources && displaySources.length > 0 && /* @__PURE__ */ jsxs16(
|
|
10982
11444
|
"div",
|
|
10983
11445
|
{
|
|
10984
11446
|
style: {
|
|
@@ -10990,7 +11452,7 @@ var MessageBubble = ({
|
|
|
10990
11452
|
borderTop: "1px solid var(--chatllm-border-light)"
|
|
10991
11453
|
},
|
|
10992
11454
|
children: [
|
|
10993
|
-
/* @__PURE__ */
|
|
11455
|
+
/* @__PURE__ */ jsx17(
|
|
10994
11456
|
"span",
|
|
10995
11457
|
{
|
|
10996
11458
|
style: {
|
|
@@ -11002,7 +11464,7 @@ var MessageBubble = ({
|
|
|
11002
11464
|
children: "\uCD9C\uCC98:"
|
|
11003
11465
|
}
|
|
11004
11466
|
),
|
|
11005
|
-
displaySources.map((source, index) => /* @__PURE__ */
|
|
11467
|
+
displaySources.map((source, index) => /* @__PURE__ */ jsx17(
|
|
11006
11468
|
LinkChip,
|
|
11007
11469
|
{
|
|
11008
11470
|
text: source.title,
|
|
@@ -11015,7 +11477,7 @@ var MessageBubble = ({
|
|
|
11015
11477
|
]
|
|
11016
11478
|
}
|
|
11017
11479
|
),
|
|
11018
|
-
relevantAlternatives && relevantAlternatives.length > 0 && /* @__PURE__ */
|
|
11480
|
+
relevantAlternatives && relevantAlternatives.length > 0 && /* @__PURE__ */ jsxs16(
|
|
11019
11481
|
"div",
|
|
11020
11482
|
{
|
|
11021
11483
|
style: {
|
|
@@ -11029,8 +11491,8 @@ var MessageBubble = ({
|
|
|
11029
11491
|
fontSize: "12px"
|
|
11030
11492
|
},
|
|
11031
11493
|
children: [
|
|
11032
|
-
/* @__PURE__ */
|
|
11033
|
-
/* @__PURE__ */
|
|
11494
|
+
/* @__PURE__ */ jsx17("span", { style: { color: "var(--chatllm-text-muted)", marginRight: "4px" }, children: displayModel || "\uBAA8\uB378" }),
|
|
11495
|
+
/* @__PURE__ */ jsx17(
|
|
11034
11496
|
"button",
|
|
11035
11497
|
{
|
|
11036
11498
|
onClick: () => onAlternativeChange?.(Math.max(0, relevantActiveIndex - 1)),
|
|
@@ -11040,15 +11502,15 @@ var MessageBubble = ({
|
|
|
11040
11502
|
opacity: relevantActiveIndex === 0 ? 0.5 : 1,
|
|
11041
11503
|
cursor: relevantActiveIndex === 0 ? "not-allowed" : "pointer"
|
|
11042
11504
|
},
|
|
11043
|
-
children: /* @__PURE__ */
|
|
11505
|
+
children: /* @__PURE__ */ jsx17(IconSvg, { name: "arrow-left-line", size: 12 })
|
|
11044
11506
|
}
|
|
11045
11507
|
),
|
|
11046
|
-
/* @__PURE__ */
|
|
11508
|
+
/* @__PURE__ */ jsxs16("span", { style: { color: "var(--chatllm-text-secondary)" }, children: [
|
|
11047
11509
|
relevantActiveIndex + 1,
|
|
11048
11510
|
" / ",
|
|
11049
11511
|
relevantAlternatives.length + 1
|
|
11050
11512
|
] }),
|
|
11051
|
-
/* @__PURE__ */
|
|
11513
|
+
/* @__PURE__ */ jsx17(
|
|
11052
11514
|
"button",
|
|
11053
11515
|
{
|
|
11054
11516
|
onClick: () => onAlternativeChange?.(Math.min(relevantAlternatives.length, relevantActiveIndex + 1)),
|
|
@@ -11058,13 +11520,13 @@ var MessageBubble = ({
|
|
|
11058
11520
|
opacity: relevantActiveIndex === relevantAlternatives.length ? 0.5 : 1,
|
|
11059
11521
|
cursor: relevantActiveIndex === relevantAlternatives.length ? "not-allowed" : "pointer"
|
|
11060
11522
|
},
|
|
11061
|
-
children: /* @__PURE__ */
|
|
11523
|
+
children: /* @__PURE__ */ jsx17(IconSvg, { name: "arrow-right-line", size: 12 })
|
|
11062
11524
|
}
|
|
11063
11525
|
)
|
|
11064
11526
|
]
|
|
11065
11527
|
}
|
|
11066
11528
|
),
|
|
11067
|
-
isLoadingAlternative && /* @__PURE__ */
|
|
11529
|
+
isLoadingAlternative && /* @__PURE__ */ jsxs16(
|
|
11068
11530
|
"div",
|
|
11069
11531
|
{
|
|
11070
11532
|
style: {
|
|
@@ -11079,12 +11541,12 @@ var MessageBubble = ({
|
|
|
11079
11541
|
color: "var(--chatllm-primary, #3584FA)"
|
|
11080
11542
|
},
|
|
11081
11543
|
children: [
|
|
11082
|
-
/* @__PURE__ */
|
|
11083
|
-
/* @__PURE__ */
|
|
11084
|
-
/* @__PURE__ */
|
|
11085
|
-
/* @__PURE__ */
|
|
11544
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
|
|
11545
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
11546
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
11547
|
+
/* @__PURE__ */ jsx17("span", { className: "chatllm-dot-bounce", style: dotStyle })
|
|
11086
11548
|
] }),
|
|
11087
|
-
/* @__PURE__ */
|
|
11549
|
+
/* @__PURE__ */ jsx17("span", { style: { fontWeight: 500 }, children: "\uB2E4\uB978 \uBAA8\uB378 \uC751\uB2F5 \uC0DD\uC131 \uC911..." })
|
|
11088
11550
|
]
|
|
11089
11551
|
}
|
|
11090
11552
|
)
|
|
@@ -11092,7 +11554,7 @@ var MessageBubble = ({
|
|
|
11092
11554
|
]
|
|
11093
11555
|
}
|
|
11094
11556
|
),
|
|
11095
|
-
!isLoading && /* @__PURE__ */
|
|
11557
|
+
!isLoading && /* @__PURE__ */ jsxs16(
|
|
11096
11558
|
"div",
|
|
11097
11559
|
{
|
|
11098
11560
|
style: {
|
|
@@ -11105,7 +11567,7 @@ var MessageBubble = ({
|
|
|
11105
11567
|
transition: "opacity 0.15s ease"
|
|
11106
11568
|
},
|
|
11107
11569
|
children: [
|
|
11108
|
-
/* @__PURE__ */
|
|
11570
|
+
/* @__PURE__ */ jsx17("button", { onClick: onCopy, style: actionButtonSmallStyle, title: "\uBCF5\uC0AC", children: /* @__PURE__ */ jsx17(
|
|
11109
11571
|
IconSvg,
|
|
11110
11572
|
{
|
|
11111
11573
|
name: isCopied ? "check-line" : "file-copy-line",
|
|
@@ -11113,19 +11575,19 @@ var MessageBubble = ({
|
|
|
11113
11575
|
color: isCopied ? "var(--chatllm-success)" : "var(--chatllm-text-muted)"
|
|
11114
11576
|
}
|
|
11115
11577
|
) }),
|
|
11116
|
-
onExport && /* @__PURE__ */
|
|
11117
|
-
onRegenerate && /* @__PURE__ */
|
|
11118
|
-
onAskOtherModel && otherModels.length > 0 && /* @__PURE__ */
|
|
11119
|
-
/* @__PURE__ */
|
|
11578
|
+
onExport && /* @__PURE__ */ jsx17("button", { onClick: () => onExport("markdown"), style: actionButtonSmallStyle, title: "MD \uB2E4\uC6B4\uB85C\uB4DC", children: /* @__PURE__ */ jsx17(IconSvg, { name: "download-line", size: 12, color: "var(--chatllm-text-muted)" }) }),
|
|
11579
|
+
onRegenerate && /* @__PURE__ */ jsx17("button", { onClick: onRegenerate, style: actionButtonSmallStyle, title: "\uB2E4\uC2DC \uC0DD\uC131", children: /* @__PURE__ */ jsx17(IconSvg, { name: "refresh-line", size: 12, color: "var(--chatllm-text-muted)" }) }),
|
|
11580
|
+
onAskOtherModel && otherModels.length > 0 && /* @__PURE__ */ jsxs16("div", { style: { position: "relative" }, children: [
|
|
11581
|
+
/* @__PURE__ */ jsx17(
|
|
11120
11582
|
"button",
|
|
11121
11583
|
{
|
|
11122
11584
|
onClick: () => setShowModelMenu(!showModelMenu),
|
|
11123
11585
|
style: actionButtonSmallStyle,
|
|
11124
11586
|
title: "\uB2E4\uB978 \uBAA8\uB378\uC5D0\uAC8C \uC9C8\uBB38",
|
|
11125
|
-
children: /* @__PURE__ */
|
|
11587
|
+
children: /* @__PURE__ */ jsx17(IconSvg, { name: "robot-line", size: 12, color: "var(--chatllm-text-muted)" })
|
|
11126
11588
|
}
|
|
11127
11589
|
),
|
|
11128
|
-
showModelMenu && /* @__PURE__ */
|
|
11590
|
+
showModelMenu && /* @__PURE__ */ jsx17(
|
|
11129
11591
|
ModelMenu,
|
|
11130
11592
|
{
|
|
11131
11593
|
models: otherModels,
|
|
@@ -11144,7 +11606,7 @@ var MessageBubble = ({
|
|
|
11144
11606
|
}
|
|
11145
11607
|
);
|
|
11146
11608
|
};
|
|
11147
|
-
var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */
|
|
11609
|
+
var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ jsxs16(
|
|
11148
11610
|
"div",
|
|
11149
11611
|
{
|
|
11150
11612
|
style: {
|
|
@@ -11162,7 +11624,7 @@ var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ jsxs15(
|
|
|
11162
11624
|
},
|
|
11163
11625
|
onMouseLeave: onClose,
|
|
11164
11626
|
children: [
|
|
11165
|
-
/* @__PURE__ */
|
|
11627
|
+
/* @__PURE__ */ jsx17(
|
|
11166
11628
|
"div",
|
|
11167
11629
|
{
|
|
11168
11630
|
style: {
|
|
@@ -11177,7 +11639,7 @@ var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ jsxs15(
|
|
|
11177
11639
|
children: "\uB2E4\uB978 \uBAA8\uB378\uC5D0\uAC8C \uC9C8\uBB38"
|
|
11178
11640
|
}
|
|
11179
11641
|
),
|
|
11180
|
-
models.map((model) => /* @__PURE__ */
|
|
11642
|
+
models.map((model) => /* @__PURE__ */ jsxs16(
|
|
11181
11643
|
"button",
|
|
11182
11644
|
{
|
|
11183
11645
|
onClick: () => onSelect(model.id),
|
|
@@ -11202,9 +11664,9 @@ var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ jsxs15(
|
|
|
11202
11664
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
11203
11665
|
},
|
|
11204
11666
|
children: [
|
|
11205
|
-
/* @__PURE__ */
|
|
11206
|
-
/* @__PURE__ */
|
|
11207
|
-
model.provider && /* @__PURE__ */
|
|
11667
|
+
/* @__PURE__ */ jsx17(IconSvg, { name: "robot-line", size: 16, color: "var(--chatllm-primary)" }),
|
|
11668
|
+
/* @__PURE__ */ jsx17("span", { style: { flex: 1, fontWeight: 500 }, children: model.name }),
|
|
11669
|
+
model.provider && /* @__PURE__ */ jsx17(
|
|
11208
11670
|
"span",
|
|
11209
11671
|
{
|
|
11210
11672
|
style: {
|
|
@@ -11253,7 +11715,7 @@ var navButtonStyle = {
|
|
|
11253
11715
|
};
|
|
11254
11716
|
|
|
11255
11717
|
// src/react/components/MessageList.tsx
|
|
11256
|
-
import { jsx as
|
|
11718
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
11257
11719
|
var MessageList = ({
|
|
11258
11720
|
messages,
|
|
11259
11721
|
isLoading,
|
|
@@ -11283,14 +11745,14 @@ var MessageList = ({
|
|
|
11283
11745
|
onExport,
|
|
11284
11746
|
onToggleChecklistPanel
|
|
11285
11747
|
}) => {
|
|
11286
|
-
const messagesEndRef =
|
|
11287
|
-
const containerRef =
|
|
11288
|
-
const [selectedText, setSelectedText] =
|
|
11289
|
-
const [selectionPosition, setSelectionPosition] =
|
|
11290
|
-
const [showScrollButton, setShowScrollButton] =
|
|
11291
|
-
const userScrollLockRef =
|
|
11748
|
+
const messagesEndRef = useRef10(null);
|
|
11749
|
+
const containerRef = useRef10(null);
|
|
11750
|
+
const [selectedText, setSelectedText] = useState18("");
|
|
11751
|
+
const [selectionPosition, setSelectionPosition] = useState18(null);
|
|
11752
|
+
const [showScrollButton, setShowScrollButton] = useState18(false);
|
|
11753
|
+
const userScrollLockRef = useRef10(false);
|
|
11292
11754
|
const SCROLL_THRESHOLD = 100;
|
|
11293
|
-
|
|
11755
|
+
useEffect10(() => {
|
|
11294
11756
|
const container = containerRef.current;
|
|
11295
11757
|
if (!container) return;
|
|
11296
11758
|
const handleWheel = (e) => {
|
|
@@ -11327,7 +11789,7 @@ var MessageList = ({
|
|
|
11327
11789
|
container.removeEventListener("touchmove", handleTouchMove);
|
|
11328
11790
|
};
|
|
11329
11791
|
}, []);
|
|
11330
|
-
const handleScroll =
|
|
11792
|
+
const handleScroll = useCallback10(() => {
|
|
11331
11793
|
if (!containerRef.current) return;
|
|
11332
11794
|
const { scrollTop, scrollHeight, clientHeight } = containerRef.current;
|
|
11333
11795
|
const distanceFromBottom = scrollHeight - scrollTop - clientHeight;
|
|
@@ -11336,14 +11798,14 @@ var MessageList = ({
|
|
|
11336
11798
|
setShowScrollButton(false);
|
|
11337
11799
|
}
|
|
11338
11800
|
}, []);
|
|
11339
|
-
|
|
11801
|
+
useEffect10(() => {
|
|
11340
11802
|
if (userScrollLockRef.current) return;
|
|
11341
11803
|
containerRef.current?.scrollTo({
|
|
11342
11804
|
top: containerRef.current.scrollHeight,
|
|
11343
11805
|
behavior: "smooth"
|
|
11344
11806
|
});
|
|
11345
11807
|
}, [messages]);
|
|
11346
|
-
const scrollToBottom =
|
|
11808
|
+
const scrollToBottom = useCallback10(() => {
|
|
11347
11809
|
userScrollLockRef.current = false;
|
|
11348
11810
|
setShowScrollButton(false);
|
|
11349
11811
|
containerRef.current?.scrollTo({
|
|
@@ -11351,7 +11813,7 @@ var MessageList = ({
|
|
|
11351
11813
|
behavior: "smooth"
|
|
11352
11814
|
});
|
|
11353
11815
|
}, []);
|
|
11354
|
-
const handleMouseUp =
|
|
11816
|
+
const handleMouseUp = useCallback10(() => {
|
|
11355
11817
|
const selection = typeof window !== "undefined" ? window.getSelection() : null;
|
|
11356
11818
|
const text = selection?.toString().trim();
|
|
11357
11819
|
if (text && text.length > 0) {
|
|
@@ -11385,7 +11847,7 @@ var MessageList = ({
|
|
|
11385
11847
|
}
|
|
11386
11848
|
}
|
|
11387
11849
|
};
|
|
11388
|
-
return /* @__PURE__ */
|
|
11850
|
+
return /* @__PURE__ */ jsxs17(
|
|
11389
11851
|
"div",
|
|
11390
11852
|
{
|
|
11391
11853
|
ref: containerRef,
|
|
@@ -11400,7 +11862,7 @@ var MessageList = ({
|
|
|
11400
11862
|
onScroll: handleScroll,
|
|
11401
11863
|
onMouseUp: handleMouseUp,
|
|
11402
11864
|
children: [
|
|
11403
|
-
/* @__PURE__ */
|
|
11865
|
+
/* @__PURE__ */ jsxs17(
|
|
11404
11866
|
"div",
|
|
11405
11867
|
{
|
|
11406
11868
|
style: {
|
|
@@ -11415,7 +11877,7 @@ var MessageList = ({
|
|
|
11415
11877
|
const nextAssistant = message.role === "user" && index + 1 < messages.length ? messages[index + 1] : null;
|
|
11416
11878
|
const assistantForAlts = nextAssistant?.role === "assistant" ? nextAssistant : null;
|
|
11417
11879
|
const activeAltIndex = assistantForAlts ? activeAlternatives[assistantForAlts.id] ?? 0 : 0;
|
|
11418
|
-
const bubbleElement = /* @__PURE__ */
|
|
11880
|
+
const bubbleElement = /* @__PURE__ */ jsx18(
|
|
11419
11881
|
MessageBubble,
|
|
11420
11882
|
{
|
|
11421
11883
|
message,
|
|
@@ -11452,13 +11914,13 @@ var MessageList = ({
|
|
|
11452
11914
|
},
|
|
11453
11915
|
message.id
|
|
11454
11916
|
);
|
|
11455
|
-
return renderMessage ? /* @__PURE__ */
|
|
11917
|
+
return renderMessage ? /* @__PURE__ */ jsx18(React14.Fragment, { children: renderMessage(message, bubbleElement) }, message.id) : bubbleElement;
|
|
11456
11918
|
}),
|
|
11457
|
-
/* @__PURE__ */
|
|
11919
|
+
/* @__PURE__ */ jsx18("div", { ref: messagesEndRef })
|
|
11458
11920
|
]
|
|
11459
11921
|
}
|
|
11460
11922
|
),
|
|
11461
|
-
showScrollButton && /* @__PURE__ */
|
|
11923
|
+
showScrollButton && /* @__PURE__ */ jsx18(
|
|
11462
11924
|
"button",
|
|
11463
11925
|
{
|
|
11464
11926
|
onClick: scrollToBottom,
|
|
@@ -11481,10 +11943,10 @@ var MessageList = ({
|
|
|
11481
11943
|
zIndex: 10,
|
|
11482
11944
|
transition: "opacity 0.2s"
|
|
11483
11945
|
},
|
|
11484
|
-
children: /* @__PURE__ */
|
|
11946
|
+
children: /* @__PURE__ */ jsx18(IconSvg, { name: "arrow-down-s-line", size: 24, color: "var(--chatllm-text-secondary)" })
|
|
11485
11947
|
}
|
|
11486
11948
|
),
|
|
11487
|
-
selectionPosition && /* @__PURE__ */
|
|
11949
|
+
selectionPosition && /* @__PURE__ */ jsxs17(
|
|
11488
11950
|
"div",
|
|
11489
11951
|
{
|
|
11490
11952
|
style: {
|
|
@@ -11496,7 +11958,7 @@ var MessageList = ({
|
|
|
11496
11958
|
pointerEvents: "auto"
|
|
11497
11959
|
},
|
|
11498
11960
|
children: [
|
|
11499
|
-
/* @__PURE__ */
|
|
11961
|
+
/* @__PURE__ */ jsxs17(
|
|
11500
11962
|
"button",
|
|
11501
11963
|
{
|
|
11502
11964
|
onClick: handleQuote,
|
|
@@ -11516,12 +11978,12 @@ var MessageList = ({
|
|
|
11516
11978
|
whiteSpace: "nowrap"
|
|
11517
11979
|
},
|
|
11518
11980
|
children: [
|
|
11519
|
-
/* @__PURE__ */
|
|
11981
|
+
/* @__PURE__ */ jsx18(IconSvg, { name: "double-quotes-l", size: 16, color: "#ffffff" }),
|
|
11520
11982
|
"\uC778\uC6A9\uD558\uAE30"
|
|
11521
11983
|
]
|
|
11522
11984
|
}
|
|
11523
11985
|
),
|
|
11524
|
-
/* @__PURE__ */
|
|
11986
|
+
/* @__PURE__ */ jsx18(
|
|
11525
11987
|
"div",
|
|
11526
11988
|
{
|
|
11527
11989
|
style: {
|
|
@@ -11546,8 +12008,8 @@ var MessageList = ({
|
|
|
11546
12008
|
};
|
|
11547
12009
|
|
|
11548
12010
|
// src/react/components/SettingsModal.tsx
|
|
11549
|
-
import { useState as
|
|
11550
|
-
import { jsx as
|
|
12011
|
+
import { useState as useState19, useEffect as useEffect11 } from "react";
|
|
12012
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
11551
12013
|
var DEFAULT_IMPORT_MEMORY_PROMPT = `Export all of my stored memories and any context you've learned about me from past conversations. Preserve my words verbatim where possible, especially for instructions and preferences.
|
|
11552
12014
|
|
|
11553
12015
|
## Categories (output in this order):
|
|
@@ -11611,9 +12073,9 @@ var SettingsModal = ({
|
|
|
11611
12073
|
onImportMemory,
|
|
11612
12074
|
importMemoryPrompt
|
|
11613
12075
|
}) => {
|
|
11614
|
-
const [activeTab, setActiveTab] =
|
|
11615
|
-
const [localApiKey, setLocalApiKey] =
|
|
11616
|
-
|
|
12076
|
+
const [activeTab, setActiveTab] = useState19("general");
|
|
12077
|
+
const [localApiKey, setLocalApiKey] = useState19(apiKey);
|
|
12078
|
+
useEffect11(() => {
|
|
11617
12079
|
setLocalApiKey(apiKey);
|
|
11618
12080
|
}, [apiKey]);
|
|
11619
12081
|
if (!isOpen) return null;
|
|
@@ -11639,7 +12101,7 @@ var SettingsModal = ({
|
|
|
11639
12101
|
setLocalApiKey(value);
|
|
11640
12102
|
onApiKeyChange?.(value);
|
|
11641
12103
|
};
|
|
11642
|
-
return /* @__PURE__ */
|
|
12104
|
+
return /* @__PURE__ */ jsx19(
|
|
11643
12105
|
"div",
|
|
11644
12106
|
{
|
|
11645
12107
|
className: "chatllm-settings-overlay",
|
|
@@ -11653,7 +12115,7 @@ var SettingsModal = ({
|
|
|
11653
12115
|
zIndex: 1e3
|
|
11654
12116
|
},
|
|
11655
12117
|
onClick: onClose,
|
|
11656
|
-
children: /* @__PURE__ */
|
|
12118
|
+
children: /* @__PURE__ */ jsxs18(
|
|
11657
12119
|
"div",
|
|
11658
12120
|
{
|
|
11659
12121
|
className: "chatllm-settings-modal",
|
|
@@ -11671,7 +12133,7 @@ var SettingsModal = ({
|
|
|
11671
12133
|
},
|
|
11672
12134
|
onClick: (e) => e.stopPropagation(),
|
|
11673
12135
|
children: [
|
|
11674
|
-
/* @__PURE__ */
|
|
12136
|
+
/* @__PURE__ */ jsxs18(
|
|
11675
12137
|
"div",
|
|
11676
12138
|
{
|
|
11677
12139
|
style: {
|
|
@@ -11682,7 +12144,7 @@ var SettingsModal = ({
|
|
|
11682
12144
|
flexDirection: "column"
|
|
11683
12145
|
},
|
|
11684
12146
|
children: [
|
|
11685
|
-
/* @__PURE__ */
|
|
12147
|
+
/* @__PURE__ */ jsx19("div", { style: { padding: "16px", borderBottom: "1px solid var(--chatllm-border, #e5e7eb)" }, children: /* @__PURE__ */ jsx19(
|
|
11686
12148
|
"button",
|
|
11687
12149
|
{
|
|
11688
12150
|
onClick: onClose,
|
|
@@ -11696,11 +12158,11 @@ var SettingsModal = ({
|
|
|
11696
12158
|
alignItems: "center",
|
|
11697
12159
|
justifyContent: "center"
|
|
11698
12160
|
},
|
|
11699
|
-
children: /* @__PURE__ */
|
|
12161
|
+
children: /* @__PURE__ */ jsx19(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #6b7280)" })
|
|
11700
12162
|
}
|
|
11701
12163
|
) }),
|
|
11702
|
-
/* @__PURE__ */
|
|
11703
|
-
/* @__PURE__ */
|
|
12164
|
+
/* @__PURE__ */ jsxs18("nav", { style: { flex: 1, padding: "8px" }, children: [
|
|
12165
|
+
/* @__PURE__ */ jsx19(
|
|
11704
12166
|
TabButton,
|
|
11705
12167
|
{
|
|
11706
12168
|
active: activeTab === "general",
|
|
@@ -11709,7 +12171,7 @@ var SettingsModal = ({
|
|
|
11709
12171
|
label: "\uC77C\uBC18"
|
|
11710
12172
|
}
|
|
11711
12173
|
),
|
|
11712
|
-
/* @__PURE__ */
|
|
12174
|
+
/* @__PURE__ */ jsx19(
|
|
11713
12175
|
TabButton,
|
|
11714
12176
|
{
|
|
11715
12177
|
active: activeTab === "personalization",
|
|
@@ -11718,7 +12180,7 @@ var SettingsModal = ({
|
|
|
11718
12180
|
label: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815"
|
|
11719
12181
|
}
|
|
11720
12182
|
),
|
|
11721
|
-
showMemoryTab && /* @__PURE__ */
|
|
12183
|
+
showMemoryTab && /* @__PURE__ */ jsx19(
|
|
11722
12184
|
TabButton,
|
|
11723
12185
|
{
|
|
11724
12186
|
active: activeTab === "memory",
|
|
@@ -11727,7 +12189,7 @@ var SettingsModal = ({
|
|
|
11727
12189
|
label: "AI \uBA54\uBAA8\uB9AC"
|
|
11728
12190
|
}
|
|
11729
12191
|
),
|
|
11730
|
-
showMemoryTab && enableProjects && /* @__PURE__ */
|
|
12192
|
+
showMemoryTab && enableProjects && /* @__PURE__ */ jsx19(
|
|
11731
12193
|
TabButton,
|
|
11732
12194
|
{
|
|
11733
12195
|
active: activeTab === "project-memory",
|
|
@@ -11736,7 +12198,7 @@ var SettingsModal = ({
|
|
|
11736
12198
|
label: "\uD504\uB85C\uC81D\uD2B8 \uBA54\uBAA8\uB9AC"
|
|
11737
12199
|
}
|
|
11738
12200
|
),
|
|
11739
|
-
/* @__PURE__ */
|
|
12201
|
+
/* @__PURE__ */ jsx19(
|
|
11740
12202
|
TabButton,
|
|
11741
12203
|
{
|
|
11742
12204
|
active: activeTab === "data",
|
|
@@ -11749,24 +12211,24 @@ var SettingsModal = ({
|
|
|
11749
12211
|
]
|
|
11750
12212
|
}
|
|
11751
12213
|
),
|
|
11752
|
-
/* @__PURE__ */
|
|
11753
|
-
activeTab === "general" && /* @__PURE__ */
|
|
11754
|
-
/* @__PURE__ */
|
|
11755
|
-
/* @__PURE__ */
|
|
12214
|
+
/* @__PURE__ */ jsxs18("div", { style: { flex: 1, overflow: "auto", padding: "24px" }, children: [
|
|
12215
|
+
activeTab === "general" && /* @__PURE__ */ jsxs18("div", { children: [
|
|
12216
|
+
/* @__PURE__ */ jsx19("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uC77C\uBC18" }),
|
|
12217
|
+
/* @__PURE__ */ jsx19(SettingRow, { label: "\uC5B8\uC5B4", children: /* @__PURE__ */ jsxs18(
|
|
11756
12218
|
"select",
|
|
11757
12219
|
{
|
|
11758
12220
|
value: personalization.language,
|
|
11759
12221
|
onChange: (e) => onPersonalizationChange({ ...personalization, language: e.target.value }),
|
|
11760
12222
|
style: selectStyle,
|
|
11761
12223
|
children: [
|
|
11762
|
-
/* @__PURE__ */
|
|
11763
|
-
/* @__PURE__ */
|
|
11764
|
-
/* @__PURE__ */
|
|
11765
|
-
/* @__PURE__ */
|
|
12224
|
+
/* @__PURE__ */ jsx19("option", { value: "auto", children: "\uC790\uB3D9 \uD0D0\uC9C0" }),
|
|
12225
|
+
/* @__PURE__ */ jsx19("option", { value: "ko", children: "\uD55C\uAD6D\uC5B4" }),
|
|
12226
|
+
/* @__PURE__ */ jsx19("option", { value: "en", children: "English" }),
|
|
12227
|
+
/* @__PURE__ */ jsx19("option", { value: "ja", children: "\u65E5\u672C\u8A9E" })
|
|
11766
12228
|
]
|
|
11767
12229
|
}
|
|
11768
12230
|
) }),
|
|
11769
|
-
/* @__PURE__ */
|
|
12231
|
+
/* @__PURE__ */ jsx19(SettingRow, { label: "\uAE30\uBCF8\uAC12\uC73C\uB85C \uCD08\uAE30\uD654", description: "\uBAA8\uB4E0 \uC124\uC815\uC744 \uCD08\uAE30 \uC0C1\uD0DC\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4", children: /* @__PURE__ */ jsx19(
|
|
11770
12232
|
"button",
|
|
11771
12233
|
{
|
|
11772
12234
|
onClick: () => onPersonalizationChange(DEFAULT_PERSONALIZATION2),
|
|
@@ -11774,11 +12236,11 @@ var SettingsModal = ({
|
|
|
11774
12236
|
children: "\uCD08\uAE30\uD654"
|
|
11775
12237
|
}
|
|
11776
12238
|
) }),
|
|
11777
|
-
onApiKeyChange && /* @__PURE__ */
|
|
11778
|
-
/* @__PURE__ */
|
|
11779
|
-
/* @__PURE__ */
|
|
11780
|
-
/* @__PURE__ */
|
|
11781
|
-
/* @__PURE__ */
|
|
12239
|
+
onApiKeyChange && /* @__PURE__ */ jsxs18("div", { style: { marginTop: "32px", paddingTop: "24px", borderTop: "1px solid var(--chatllm-border, #e5e7eb)" }, children: [
|
|
12240
|
+
/* @__PURE__ */ jsx19("h3", { style: { fontSize: "16px", fontWeight: 500, marginBottom: "16px", color: "var(--chatllm-text, #1f2937)" }, children: "API \uC124\uC815" }),
|
|
12241
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
12242
|
+
/* @__PURE__ */ jsx19("label", { style: { display: "block", fontSize: "14px", marginBottom: "8px", color: "var(--chatllm-text, #374151)" }, children: apiKeyLabel }),
|
|
12243
|
+
/* @__PURE__ */ jsx19(
|
|
11782
12244
|
"input",
|
|
11783
12245
|
{
|
|
11784
12246
|
type: "password",
|
|
@@ -11788,18 +12250,18 @@ var SettingsModal = ({
|
|
|
11788
12250
|
style: inputStyle
|
|
11789
12251
|
}
|
|
11790
12252
|
),
|
|
11791
|
-
/* @__PURE__ */
|
|
12253
|
+
/* @__PURE__ */ jsx19("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "4px" }, children: apiKeyDescription })
|
|
11792
12254
|
] })
|
|
11793
12255
|
] })
|
|
11794
12256
|
] }),
|
|
11795
|
-
activeTab === "personalization" && /* @__PURE__ */
|
|
11796
|
-
/* @__PURE__ */
|
|
11797
|
-
/* @__PURE__ */
|
|
11798
|
-
/* @__PURE__ */
|
|
11799
|
-
/* @__PURE__ */
|
|
11800
|
-
/* @__PURE__ */
|
|
11801
|
-
/* @__PURE__ */
|
|
11802
|
-
/* @__PURE__ */
|
|
12257
|
+
activeTab === "personalization" && /* @__PURE__ */ jsxs18("div", { children: [
|
|
12258
|
+
/* @__PURE__ */ jsx19("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815" }),
|
|
12259
|
+
/* @__PURE__ */ jsxs18("section", { style: { marginBottom: "32px" }, children: [
|
|
12260
|
+
/* @__PURE__ */ jsx19("h3", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text-muted, #6b7280)", marginBottom: "16px" }, children: "\uC0AC\uC6A9\uC790 \uD504\uB85C\uD544" }),
|
|
12261
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
12262
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
12263
|
+
/* @__PURE__ */ jsx19("label", { style: labelStyle, children: "\uB2C9\uB124\uC784" }),
|
|
12264
|
+
/* @__PURE__ */ jsx19(
|
|
11803
12265
|
"input",
|
|
11804
12266
|
{
|
|
11805
12267
|
type: "text",
|
|
@@ -11810,9 +12272,9 @@ var SettingsModal = ({
|
|
|
11810
12272
|
}
|
|
11811
12273
|
)
|
|
11812
12274
|
] }),
|
|
11813
|
-
/* @__PURE__ */
|
|
11814
|
-
/* @__PURE__ */
|
|
11815
|
-
/* @__PURE__ */
|
|
12275
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
12276
|
+
/* @__PURE__ */ jsx19("label", { style: labelStyle, children: "\uC9C1\uC5C5" }),
|
|
12277
|
+
/* @__PURE__ */ jsx19(
|
|
11816
12278
|
"input",
|
|
11817
12279
|
{
|
|
11818
12280
|
type: "text",
|
|
@@ -11823,9 +12285,9 @@ var SettingsModal = ({
|
|
|
11823
12285
|
}
|
|
11824
12286
|
)
|
|
11825
12287
|
] }),
|
|
11826
|
-
/* @__PURE__ */
|
|
11827
|
-
/* @__PURE__ */
|
|
11828
|
-
/* @__PURE__ */
|
|
12288
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
12289
|
+
/* @__PURE__ */ jsx19("label", { style: labelStyle, children: "\uCD94\uAC00 \uC815\uBCF4" }),
|
|
12290
|
+
/* @__PURE__ */ jsx19(
|
|
11829
12291
|
"textarea",
|
|
11830
12292
|
{
|
|
11831
12293
|
value: personalization.userProfile.additionalInfo || "",
|
|
@@ -11838,62 +12300,62 @@ var SettingsModal = ({
|
|
|
11838
12300
|
] })
|
|
11839
12301
|
] })
|
|
11840
12302
|
] }),
|
|
11841
|
-
/* @__PURE__ */
|
|
11842
|
-
/* @__PURE__ */
|
|
11843
|
-
/* @__PURE__ */
|
|
12303
|
+
/* @__PURE__ */ jsxs18("section", { children: [
|
|
12304
|
+
/* @__PURE__ */ jsx19("h3", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text-muted, #6b7280)", marginBottom: "16px" }, children: "\uC751\uB2F5 \uC2A4\uD0C0\uC77C" }),
|
|
12305
|
+
/* @__PURE__ */ jsx19(SettingRow, { label: "\uB530\uB73B\uD568", children: /* @__PURE__ */ jsxs18(
|
|
11844
12306
|
"select",
|
|
11845
12307
|
{
|
|
11846
12308
|
value: personalization.responseStyle.warmth,
|
|
11847
12309
|
onChange: (e) => updateResponseStyle("warmth", e.target.value),
|
|
11848
12310
|
style: selectStyle,
|
|
11849
12311
|
children: [
|
|
11850
|
-
/* @__PURE__ */
|
|
11851
|
-
/* @__PURE__ */
|
|
11852
|
-
/* @__PURE__ */
|
|
12312
|
+
/* @__PURE__ */ jsx19("option", { value: "high", children: "\uB192\uC74C - \uCE5C\uADFC\uD558\uACE0 \uB530\uB73B\uD558\uAC8C" }),
|
|
12313
|
+
/* @__PURE__ */ jsx19("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
12314
|
+
/* @__PURE__ */ jsx19("option", { value: "low", children: "\uB0AE\uC74C - \uAC04\uACB0\uD558\uACE0 \uC0AC\uBB34\uC801\uC73C\uB85C" })
|
|
11853
12315
|
]
|
|
11854
12316
|
}
|
|
11855
12317
|
) }),
|
|
11856
|
-
/* @__PURE__ */
|
|
12318
|
+
/* @__PURE__ */ jsx19(SettingRow, { label: "\uC5F4\uC815\uC801", children: /* @__PURE__ */ jsxs18(
|
|
11857
12319
|
"select",
|
|
11858
12320
|
{
|
|
11859
12321
|
value: personalization.responseStyle.enthusiasm,
|
|
11860
12322
|
onChange: (e) => updateResponseStyle("enthusiasm", e.target.value),
|
|
11861
12323
|
style: selectStyle,
|
|
11862
12324
|
children: [
|
|
11863
|
-
/* @__PURE__ */
|
|
11864
|
-
/* @__PURE__ */
|
|
11865
|
-
/* @__PURE__ */
|
|
12325
|
+
/* @__PURE__ */ jsx19("option", { value: "high", children: "\uB192\uC74C - \uC801\uADF9\uC801\uC774\uACE0 \uD65C\uBC1C\uD558\uAC8C" }),
|
|
12326
|
+
/* @__PURE__ */ jsx19("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
12327
|
+
/* @__PURE__ */ jsx19("option", { value: "low", children: "\uB0AE\uC74C - \uCC28\uBD84\uD558\uACE0 \uC808\uC81C\uC788\uAC8C" })
|
|
11866
12328
|
]
|
|
11867
12329
|
}
|
|
11868
12330
|
) }),
|
|
11869
|
-
/* @__PURE__ */
|
|
12331
|
+
/* @__PURE__ */ jsx19(SettingRow, { label: "\uC774\uBAA8\uC9C0 \uC0AC\uC6A9", children: /* @__PURE__ */ jsxs18(
|
|
11870
12332
|
"select",
|
|
11871
12333
|
{
|
|
11872
12334
|
value: personalization.responseStyle.emojiUsage,
|
|
11873
12335
|
onChange: (e) => updateResponseStyle("emojiUsage", e.target.value),
|
|
11874
12336
|
style: selectStyle,
|
|
11875
12337
|
children: [
|
|
11876
|
-
/* @__PURE__ */
|
|
11877
|
-
/* @__PURE__ */
|
|
11878
|
-
/* @__PURE__ */
|
|
12338
|
+
/* @__PURE__ */ jsx19("option", { value: "high", children: "\uB192\uC74C - \uC790\uC8FC \uC0AC\uC6A9" }),
|
|
12339
|
+
/* @__PURE__ */ jsx19("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
12340
|
+
/* @__PURE__ */ jsx19("option", { value: "low", children: "\uB0AE\uC74C - \uAC70\uC758 \uC0AC\uC6A9 \uC548 \uD568" })
|
|
11879
12341
|
]
|
|
11880
12342
|
}
|
|
11881
12343
|
) }),
|
|
11882
|
-
/* @__PURE__ */
|
|
12344
|
+
/* @__PURE__ */ jsx19(SettingRow, { label: "\uC751\uB2F5 \uAE38\uC774", children: /* @__PURE__ */ jsxs18(
|
|
11883
12345
|
"select",
|
|
11884
12346
|
{
|
|
11885
12347
|
value: personalization.responseStyle.verbosity,
|
|
11886
12348
|
onChange: (e) => updateResponseStyle("verbosity", e.target.value),
|
|
11887
12349
|
style: selectStyle,
|
|
11888
12350
|
children: [
|
|
11889
|
-
/* @__PURE__ */
|
|
11890
|
-
/* @__PURE__ */
|
|
11891
|
-
/* @__PURE__ */
|
|
12351
|
+
/* @__PURE__ */ jsx19("option", { value: "detailed", children: "\uC0C1\uC138 - \uC790\uC138\uD558\uAC8C \uC124\uBA85" }),
|
|
12352
|
+
/* @__PURE__ */ jsx19("option", { value: "balanced", children: "\uAE30\uBCF8\uAC12" }),
|
|
12353
|
+
/* @__PURE__ */ jsx19("option", { value: "concise", children: "\uAC04\uACB0 - \uD575\uC2EC\uB9CC \uC694\uC57D" })
|
|
11892
12354
|
]
|
|
11893
12355
|
}
|
|
11894
12356
|
) })
|
|
11895
12357
|
] }),
|
|
11896
|
-
onSave && /* @__PURE__ */
|
|
12358
|
+
onSave && /* @__PURE__ */ jsx19("div", { style: { marginTop: "24px", display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx19(
|
|
11897
12359
|
"button",
|
|
11898
12360
|
{
|
|
11899
12361
|
onClick: onSave,
|
|
@@ -11914,7 +12376,7 @@ var SettingsModal = ({
|
|
|
11914
12376
|
}
|
|
11915
12377
|
) })
|
|
11916
12378
|
] }),
|
|
11917
|
-
activeTab === "memory" && showMemoryTab && /* @__PURE__ */
|
|
12379
|
+
activeTab === "memory" && showMemoryTab && /* @__PURE__ */ jsx19(
|
|
11918
12380
|
MemoryTabContent,
|
|
11919
12381
|
{
|
|
11920
12382
|
items: memoryItems,
|
|
@@ -11925,7 +12387,7 @@ var SettingsModal = ({
|
|
|
11925
12387
|
importMemoryPrompt
|
|
11926
12388
|
}
|
|
11927
12389
|
),
|
|
11928
|
-
activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */
|
|
12390
|
+
activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */ jsx19(
|
|
11929
12391
|
MemoryTabContent,
|
|
11930
12392
|
{
|
|
11931
12393
|
items: projectMemoryItems,
|
|
@@ -11936,9 +12398,9 @@ var SettingsModal = ({
|
|
|
11936
12398
|
emptyDescription: "\uB300\uD654\uAC00 \uC9C4\uD589\uB418\uBA74 AI\uAC00 \uD504\uB85C\uC81D\uD2B8 \uB9E5\uB77D\uC744 \uC790\uB3D9\uC73C\uB85C \uD559\uC2B5\uD569\uB2C8\uB2E4"
|
|
11937
12399
|
}
|
|
11938
12400
|
),
|
|
11939
|
-
activeTab === "data" && /* @__PURE__ */
|
|
11940
|
-
/* @__PURE__ */
|
|
11941
|
-
/* @__PURE__ */
|
|
12401
|
+
activeTab === "data" && /* @__PURE__ */ jsxs18("div", { children: [
|
|
12402
|
+
/* @__PURE__ */ jsx19("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uB370\uC774\uD130 \uC81C\uC5B4" }),
|
|
12403
|
+
/* @__PURE__ */ jsx19(SettingRow, { label: "\uBA54\uBAA8\uB9AC \uC0AC\uC6A9", description: "\uB300\uD654 \uCEE8\uD14D\uC2A4\uD2B8\uB97C \uAE30\uC5B5\uD569\uB2C8\uB2E4", children: /* @__PURE__ */ jsx19(
|
|
11942
12404
|
"button",
|
|
11943
12405
|
{
|
|
11944
12406
|
onClick: () => onPersonalizationChange({ ...personalization, useMemory: !personalization.useMemory }),
|
|
@@ -11952,7 +12414,7 @@ var SettingsModal = ({
|
|
|
11952
12414
|
position: "relative",
|
|
11953
12415
|
transition: "background-color 0.2s"
|
|
11954
12416
|
},
|
|
11955
|
-
children: /* @__PURE__ */
|
|
12417
|
+
children: /* @__PURE__ */ jsx19(
|
|
11956
12418
|
"div",
|
|
11957
12419
|
{
|
|
11958
12420
|
style: {
|
|
@@ -11970,7 +12432,7 @@ var SettingsModal = ({
|
|
|
11970
12432
|
)
|
|
11971
12433
|
}
|
|
11972
12434
|
) }),
|
|
11973
|
-
onClearAllData && /* @__PURE__ */
|
|
12435
|
+
onClearAllData && /* @__PURE__ */ jsx19(SettingRow, { label: "\uB300\uD654 \uAE30\uB85D \uC0AD\uC81C", description: "\uBAA8\uB4E0 \uB300\uD654 \uAE30\uB85D\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4", children: /* @__PURE__ */ jsx19(
|
|
11974
12436
|
"button",
|
|
11975
12437
|
{
|
|
11976
12438
|
onClick: () => {
|
|
@@ -11990,7 +12452,7 @@ var SettingsModal = ({
|
|
|
11990
12452
|
}
|
|
11991
12453
|
);
|
|
11992
12454
|
};
|
|
11993
|
-
var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */
|
|
12455
|
+
var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ jsxs18(
|
|
11994
12456
|
"button",
|
|
11995
12457
|
{
|
|
11996
12458
|
onClick,
|
|
@@ -12011,12 +12473,12 @@ var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ jsxs17(
|
|
|
12011
12473
|
marginBottom: "4px"
|
|
12012
12474
|
},
|
|
12013
12475
|
children: [
|
|
12014
|
-
/* @__PURE__ */
|
|
12476
|
+
/* @__PURE__ */ jsx19(IconSvg, { name: icon, size: 20 }),
|
|
12015
12477
|
label
|
|
12016
12478
|
]
|
|
12017
12479
|
}
|
|
12018
12480
|
);
|
|
12019
|
-
var SettingRow = ({ label, description, children }) => /* @__PURE__ */
|
|
12481
|
+
var SettingRow = ({ label, description, children }) => /* @__PURE__ */ jsxs18(
|
|
12020
12482
|
"div",
|
|
12021
12483
|
{
|
|
12022
12484
|
style: {
|
|
@@ -12027,9 +12489,9 @@ var SettingRow = ({ label, description, children }) => /* @__PURE__ */ jsxs17(
|
|
|
12027
12489
|
borderBottom: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
12028
12490
|
},
|
|
12029
12491
|
children: [
|
|
12030
|
-
/* @__PURE__ */
|
|
12031
|
-
/* @__PURE__ */
|
|
12032
|
-
description && /* @__PURE__ */
|
|
12492
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
12493
|
+
/* @__PURE__ */ jsx19("span", { style: { fontSize: "14px", color: "var(--chatllm-text, #374151)" }, children: label }),
|
|
12494
|
+
description && /* @__PURE__ */ jsx19("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "2px" }, children: description })
|
|
12033
12495
|
] }),
|
|
12034
12496
|
children
|
|
12035
12497
|
]
|
|
@@ -12089,11 +12551,11 @@ var memoryCategoryColors = {
|
|
|
12089
12551
|
preference: "#8b5cf6"
|
|
12090
12552
|
};
|
|
12091
12553
|
var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "AI \uBA54\uBAA8\uB9AC", emptyMessage = "\uC800\uC7A5\uB41C \uBA54\uBAA8\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", emptyDescription = "\uB300\uD654\uAC00 \uC9C4\uD589\uB418\uBA74 AI\uAC00 \uC790\uB3D9\uC73C\uB85C \uC815\uBCF4\uB97C \uD559\uC2B5\uD569\uB2C8\uB2E4", onImportMemory, importMemoryPrompt }) => {
|
|
12092
|
-
const [activeFilter, setActiveFilter] =
|
|
12093
|
-
const [expandedId, setExpandedId] =
|
|
12094
|
-
const [importModalOpen, setImportModalOpen] =
|
|
12095
|
-
const [importText, setImportText] =
|
|
12096
|
-
const [promptCopied, setPromptCopied] =
|
|
12554
|
+
const [activeFilter, setActiveFilter] = useState19("all");
|
|
12555
|
+
const [expandedId, setExpandedId] = useState19(null);
|
|
12556
|
+
const [importModalOpen, setImportModalOpen] = useState19(false);
|
|
12557
|
+
const [importText, setImportText] = useState19("");
|
|
12558
|
+
const [promptCopied, setPromptCopied] = useState19(false);
|
|
12097
12559
|
const filteredItems = activeFilter === "all" ? items : items.filter((item) => item.category === activeFilter);
|
|
12098
12560
|
const formatDate = (timestamp) => {
|
|
12099
12561
|
const date = new Date(timestamp);
|
|
@@ -12104,11 +12566,11 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12104
12566
|
minute: "2-digit"
|
|
12105
12567
|
});
|
|
12106
12568
|
};
|
|
12107
|
-
return /* @__PURE__ */
|
|
12108
|
-
/* @__PURE__ */
|
|
12109
|
-
/* @__PURE__ */
|
|
12110
|
-
/* @__PURE__ */
|
|
12111
|
-
onImportMemory && /* @__PURE__ */
|
|
12569
|
+
return /* @__PURE__ */ jsxs18("div", { children: [
|
|
12570
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "24px" }, children: [
|
|
12571
|
+
/* @__PURE__ */ jsx19("h2", { style: { fontSize: "20px", fontWeight: 600, color: "var(--chatllm-text, #1f2937)", margin: 0 }, children: title }),
|
|
12572
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
12573
|
+
onImportMemory && /* @__PURE__ */ jsxs18(
|
|
12112
12574
|
"button",
|
|
12113
12575
|
{
|
|
12114
12576
|
onClick: () => setImportModalOpen(true),
|
|
@@ -12129,18 +12591,18 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12129
12591
|
onMouseEnter: (e) => e.currentTarget.style.opacity = "0.85",
|
|
12130
12592
|
onMouseLeave: (e) => e.currentTarget.style.opacity = "1",
|
|
12131
12593
|
children: [
|
|
12132
|
-
/* @__PURE__ */
|
|
12594
|
+
/* @__PURE__ */ jsx19(IconSvg, { name: "download-line", size: 14, color: "var(--chatllm-primary, #3584FA)" }),
|
|
12133
12595
|
"\uAC00\uC838\uC624\uAE30"
|
|
12134
12596
|
]
|
|
12135
12597
|
}
|
|
12136
12598
|
),
|
|
12137
|
-
/* @__PURE__ */
|
|
12599
|
+
/* @__PURE__ */ jsxs18("span", { style: { fontSize: "13px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: [
|
|
12138
12600
|
items.length,
|
|
12139
12601
|
"\uAC1C \uD56D\uBAA9"
|
|
12140
12602
|
] })
|
|
12141
12603
|
] })
|
|
12142
12604
|
] }),
|
|
12143
|
-
/* @__PURE__ */
|
|
12605
|
+
/* @__PURE__ */ jsx19("div", { style: { display: "flex", gap: "6px", marginBottom: "20px", flexWrap: "wrap" }, children: ["all", "fact", "skill", "preference"].map((tab) => /* @__PURE__ */ jsx19(
|
|
12144
12606
|
"button",
|
|
12145
12607
|
{
|
|
12146
12608
|
onClick: () => setActiveFilter(tab),
|
|
@@ -12158,7 +12620,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12158
12620
|
},
|
|
12159
12621
|
tab
|
|
12160
12622
|
)) }),
|
|
12161
|
-
contextSummary && activeFilter === "all" && /* @__PURE__ */
|
|
12623
|
+
contextSummary && activeFilter === "all" && /* @__PURE__ */ jsxs18(
|
|
12162
12624
|
"div",
|
|
12163
12625
|
{
|
|
12164
12626
|
style: {
|
|
@@ -12169,19 +12631,19 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12169
12631
|
borderLeft: "3px solid var(--chatllm-primary, #3584FA)"
|
|
12170
12632
|
},
|
|
12171
12633
|
children: [
|
|
12172
|
-
/* @__PURE__ */
|
|
12173
|
-
/* @__PURE__ */
|
|
12174
|
-
/* @__PURE__ */
|
|
12634
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: "6px", marginBottom: "8px" }, children: [
|
|
12635
|
+
/* @__PURE__ */ jsx19(IconSvg, { name: "file-text-line", size: 14, color: "var(--chatllm-primary, #3584FA)" }),
|
|
12636
|
+
/* @__PURE__ */ jsx19("span", { style: { fontSize: "12px", fontWeight: 500, color: "var(--chatllm-primary, #3584FA)" }, children: "\uB300\uD654 \uC694\uC57D" })
|
|
12175
12637
|
] }),
|
|
12176
|
-
/* @__PURE__ */
|
|
12638
|
+
/* @__PURE__ */ jsx19("p", { style: { fontSize: "13px", lineHeight: "1.6", color: "var(--chatllm-text, #374151)", margin: 0 }, children: contextSummary })
|
|
12177
12639
|
]
|
|
12178
12640
|
}
|
|
12179
12641
|
),
|
|
12180
|
-
filteredItems.length === 0 ? /* @__PURE__ */
|
|
12181
|
-
/* @__PURE__ */
|
|
12182
|
-
/* @__PURE__ */
|
|
12183
|
-
/* @__PURE__ */
|
|
12184
|
-
] }) : /* @__PURE__ */
|
|
12642
|
+
filteredItems.length === 0 ? /* @__PURE__ */ jsxs18("div", { style: { padding: "40px 16px", textAlign: "center" }, children: [
|
|
12643
|
+
/* @__PURE__ */ jsx19(IconSvg, { name: "robot-line", size: 40, color: "var(--chatllm-text-muted, #d1d5db)" }),
|
|
12644
|
+
/* @__PURE__ */ jsx19("p", { style: { fontSize: "14px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "12px" }, children: emptyMessage }),
|
|
12645
|
+
/* @__PURE__ */ jsx19("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #d1d5db)", marginTop: "4px" }, children: emptyDescription })
|
|
12646
|
+
] }) : /* @__PURE__ */ jsx19("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: filteredItems.map((item) => /* @__PURE__ */ jsxs18(
|
|
12185
12647
|
"div",
|
|
12186
12648
|
{
|
|
12187
12649
|
style: {
|
|
@@ -12194,10 +12656,10 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12194
12656
|
},
|
|
12195
12657
|
onClick: () => setExpandedId(expandedId === item.id ? null : item.id),
|
|
12196
12658
|
children: [
|
|
12197
|
-
/* @__PURE__ */
|
|
12198
|
-
/* @__PURE__ */
|
|
12199
|
-
/* @__PURE__ */
|
|
12200
|
-
item.category && /* @__PURE__ */
|
|
12659
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: [
|
|
12660
|
+
/* @__PURE__ */ jsxs18("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
12661
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [
|
|
12662
|
+
item.category && /* @__PURE__ */ jsx19(
|
|
12201
12663
|
"span",
|
|
12202
12664
|
{
|
|
12203
12665
|
style: {
|
|
@@ -12211,12 +12673,12 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12211
12673
|
children: memoryCategoryLabels[item.category]
|
|
12212
12674
|
}
|
|
12213
12675
|
),
|
|
12214
|
-
/* @__PURE__ */
|
|
12676
|
+
/* @__PURE__ */ jsx19("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: formatDate(item.timestamp) })
|
|
12215
12677
|
] }),
|
|
12216
|
-
/* @__PURE__ */
|
|
12678
|
+
/* @__PURE__ */ jsx19("div", { style: { fontSize: "13px", fontWeight: 500, color: "var(--chatllm-text, #1f2937)" }, children: item.key })
|
|
12217
12679
|
] }),
|
|
12218
|
-
/* @__PURE__ */
|
|
12219
|
-
onDelete && /* @__PURE__ */
|
|
12680
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
12681
|
+
onDelete && /* @__PURE__ */ jsx19(
|
|
12220
12682
|
"button",
|
|
12221
12683
|
{
|
|
12222
12684
|
onClick: (e) => {
|
|
@@ -12232,10 +12694,10 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12232
12694
|
opacity: 0.5
|
|
12233
12695
|
},
|
|
12234
12696
|
"aria-label": "\uBA54\uBAA8\uB9AC \uC0AD\uC81C",
|
|
12235
|
-
children: /* @__PURE__ */
|
|
12697
|
+
children: /* @__PURE__ */ jsx19(IconSvg, { name: "delete-bin-line", size: 14, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
12236
12698
|
}
|
|
12237
12699
|
),
|
|
12238
|
-
/* @__PURE__ */
|
|
12700
|
+
/* @__PURE__ */ jsx19(
|
|
12239
12701
|
IconSvg,
|
|
12240
12702
|
{
|
|
12241
12703
|
name: expandedId === item.id ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
@@ -12245,7 +12707,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12245
12707
|
)
|
|
12246
12708
|
] })
|
|
12247
12709
|
] }),
|
|
12248
|
-
expandedId === item.id && /* @__PURE__ */
|
|
12710
|
+
expandedId === item.id && /* @__PURE__ */ jsx19(
|
|
12249
12711
|
"div",
|
|
12250
12712
|
{
|
|
12251
12713
|
style: {
|
|
@@ -12253,7 +12715,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12253
12715
|
paddingTop: "12px",
|
|
12254
12716
|
borderTop: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
12255
12717
|
},
|
|
12256
|
-
children: /* @__PURE__ */
|
|
12718
|
+
children: /* @__PURE__ */ jsx19(
|
|
12257
12719
|
"p",
|
|
12258
12720
|
{
|
|
12259
12721
|
style: {
|
|
@@ -12272,7 +12734,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12272
12734
|
},
|
|
12273
12735
|
item.id
|
|
12274
12736
|
)) }),
|
|
12275
|
-
onClearAll && items.length > 0 && /* @__PURE__ */
|
|
12737
|
+
onClearAll && items.length > 0 && /* @__PURE__ */ jsx19("div", { style: { marginTop: "24px", paddingTop: "16px", borderTop: "1px solid var(--chatllm-border, #e5e7eb)" }, children: /* @__PURE__ */ jsx19(
|
|
12276
12738
|
"button",
|
|
12277
12739
|
{
|
|
12278
12740
|
onClick: () => {
|
|
@@ -12284,7 +12746,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12284
12746
|
children: "\uC804\uCCB4 \uBA54\uBAA8\uB9AC \uC0AD\uC81C"
|
|
12285
12747
|
}
|
|
12286
12748
|
) }),
|
|
12287
|
-
importModalOpen && onImportMemory && /* @__PURE__ */
|
|
12749
|
+
importModalOpen && onImportMemory && /* @__PURE__ */ jsx19(
|
|
12288
12750
|
"div",
|
|
12289
12751
|
{
|
|
12290
12752
|
style: {
|
|
@@ -12300,7 +12762,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12300
12762
|
zIndex: 1100
|
|
12301
12763
|
},
|
|
12302
12764
|
onClick: () => setImportModalOpen(false),
|
|
12303
|
-
children: /* @__PURE__ */
|
|
12765
|
+
children: /* @__PURE__ */ jsxs18(
|
|
12304
12766
|
"div",
|
|
12305
12767
|
{
|
|
12306
12768
|
style: {
|
|
@@ -12313,7 +12775,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12313
12775
|
},
|
|
12314
12776
|
onClick: (e) => e.stopPropagation(),
|
|
12315
12777
|
children: [
|
|
12316
|
-
/* @__PURE__ */
|
|
12778
|
+
/* @__PURE__ */ jsxs18(
|
|
12317
12779
|
"div",
|
|
12318
12780
|
{
|
|
12319
12781
|
style: {
|
|
@@ -12323,8 +12785,8 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12323
12785
|
padding: "20px 24px 16px"
|
|
12324
12786
|
},
|
|
12325
12787
|
children: [
|
|
12326
|
-
/* @__PURE__ */
|
|
12327
|
-
/* @__PURE__ */
|
|
12788
|
+
/* @__PURE__ */ jsx19("h3", { style: { fontSize: "18px", fontWeight: 700, color: "var(--chatllm-text, #ffffff)", margin: 0 }, children: "Claude\uB85C \uBA54\uBAA8\uB9AC \uAC00\uC838\uC624\uAE30" }),
|
|
12789
|
+
/* @__PURE__ */ jsx19(
|
|
12328
12790
|
"button",
|
|
12329
12791
|
{
|
|
12330
12792
|
onClick: () => {
|
|
@@ -12339,16 +12801,16 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12339
12801
|
borderRadius: "6px",
|
|
12340
12802
|
cursor: "pointer"
|
|
12341
12803
|
},
|
|
12342
|
-
children: /* @__PURE__ */
|
|
12804
|
+
children: /* @__PURE__ */ jsx19(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
12343
12805
|
}
|
|
12344
12806
|
)
|
|
12345
12807
|
]
|
|
12346
12808
|
}
|
|
12347
12809
|
),
|
|
12348
|
-
/* @__PURE__ */
|
|
12349
|
-
/* @__PURE__ */
|
|
12350
|
-
/* @__PURE__ */
|
|
12351
|
-
/* @__PURE__ */
|
|
12810
|
+
/* @__PURE__ */ jsxs18("div", { style: { padding: "0 24px 24px" }, children: [
|
|
12811
|
+
/* @__PURE__ */ jsxs18("div", { style: { marginBottom: "24px" }, children: [
|
|
12812
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: "10px", marginBottom: "12px" }, children: [
|
|
12813
|
+
/* @__PURE__ */ jsx19(
|
|
12352
12814
|
"div",
|
|
12353
12815
|
{
|
|
12354
12816
|
style: {
|
|
@@ -12367,9 +12829,9 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12367
12829
|
children: "1"
|
|
12368
12830
|
}
|
|
12369
12831
|
),
|
|
12370
|
-
/* @__PURE__ */
|
|
12832
|
+
/* @__PURE__ */ jsx19("span", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text, #ffffff)" }, children: "\uB2E4\uB978 AI \uC81C\uACF5\uC5C5\uCCB4\uC758 \uCC44\uD305\uC5D0 \uC774 \uD504\uB86C\uD504\uD2B8\uB97C \uBCF5\uC0AC\uD558\uC138\uC694" })
|
|
12371
12833
|
] }),
|
|
12372
|
-
/* @__PURE__ */
|
|
12834
|
+
/* @__PURE__ */ jsxs18(
|
|
12373
12835
|
"div",
|
|
12374
12836
|
{
|
|
12375
12837
|
style: {
|
|
@@ -12382,7 +12844,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12382
12844
|
overflow: "auto"
|
|
12383
12845
|
},
|
|
12384
12846
|
children: [
|
|
12385
|
-
/* @__PURE__ */
|
|
12847
|
+
/* @__PURE__ */ jsx19(
|
|
12386
12848
|
"p",
|
|
12387
12849
|
{
|
|
12388
12850
|
style: {
|
|
@@ -12395,7 +12857,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12395
12857
|
children: importMemoryPrompt || DEFAULT_IMPORT_MEMORY_PROMPT
|
|
12396
12858
|
}
|
|
12397
12859
|
),
|
|
12398
|
-
/* @__PURE__ */
|
|
12860
|
+
/* @__PURE__ */ jsxs18(
|
|
12399
12861
|
"button",
|
|
12400
12862
|
{
|
|
12401
12863
|
onClick: () => {
|
|
@@ -12420,7 +12882,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12420
12882
|
color: "var(--chatllm-text, #ffffff)"
|
|
12421
12883
|
},
|
|
12422
12884
|
children: [
|
|
12423
|
-
/* @__PURE__ */
|
|
12885
|
+
/* @__PURE__ */ jsx19(IconSvg, { name: promptCopied ? "check-line" : "file-copy-line", size: 14, color: "var(--chatllm-text, #ffffff)" }),
|
|
12424
12886
|
promptCopied ? "\uBCF5\uC0AC\uB428" : "\uBCF5\uC0AC"
|
|
12425
12887
|
]
|
|
12426
12888
|
}
|
|
@@ -12429,9 +12891,9 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12429
12891
|
}
|
|
12430
12892
|
)
|
|
12431
12893
|
] }),
|
|
12432
|
-
/* @__PURE__ */
|
|
12433
|
-
/* @__PURE__ */
|
|
12434
|
-
/* @__PURE__ */
|
|
12894
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
12895
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: "10px", marginBottom: "12px" }, children: [
|
|
12896
|
+
/* @__PURE__ */ jsx19(
|
|
12435
12897
|
"div",
|
|
12436
12898
|
{
|
|
12437
12899
|
style: {
|
|
@@ -12450,9 +12912,9 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12450
12912
|
children: "2"
|
|
12451
12913
|
}
|
|
12452
12914
|
),
|
|
12453
|
-
/* @__PURE__ */
|
|
12915
|
+
/* @__PURE__ */ jsx19("span", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text, #ffffff)" }, children: "\uC544\uB798\uC5D0 \uACB0\uACFC\uB97C \uBD99\uC5EC\uB123\uC5B4 Claude\uC758 \uBA54\uBAA8\uB9AC\uC5D0 \uCD94\uAC00\uD558\uC138\uC694" })
|
|
12454
12916
|
] }),
|
|
12455
|
-
/* @__PURE__ */
|
|
12917
|
+
/* @__PURE__ */ jsx19(
|
|
12456
12918
|
"textarea",
|
|
12457
12919
|
{
|
|
12458
12920
|
value: importText,
|
|
@@ -12479,7 +12941,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12479
12941
|
)
|
|
12480
12942
|
] })
|
|
12481
12943
|
] }),
|
|
12482
|
-
/* @__PURE__ */
|
|
12944
|
+
/* @__PURE__ */ jsxs18(
|
|
12483
12945
|
"div",
|
|
12484
12946
|
{
|
|
12485
12947
|
style: {
|
|
@@ -12489,7 +12951,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12489
12951
|
padding: "0 24px 20px"
|
|
12490
12952
|
},
|
|
12491
12953
|
children: [
|
|
12492
|
-
/* @__PURE__ */
|
|
12954
|
+
/* @__PURE__ */ jsx19(
|
|
12493
12955
|
"button",
|
|
12494
12956
|
{
|
|
12495
12957
|
onClick: () => {
|
|
@@ -12510,7 +12972,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12510
12972
|
children: "\uCDE8\uC18C"
|
|
12511
12973
|
}
|
|
12512
12974
|
),
|
|
12513
|
-
/* @__PURE__ */
|
|
12975
|
+
/* @__PURE__ */ jsx19(
|
|
12514
12976
|
"button",
|
|
12515
12977
|
{
|
|
12516
12978
|
onClick: () => {
|
|
@@ -12550,8 +13012,8 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
12550
13012
|
};
|
|
12551
13013
|
|
|
12552
13014
|
// src/react/components/ProjectSettingsModal.tsx
|
|
12553
|
-
import { useState as
|
|
12554
|
-
import { jsx as
|
|
13015
|
+
import { useState as useState20, useEffect as useEffect12 } from "react";
|
|
13016
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
12555
13017
|
var COLOR_PRESETS = [
|
|
12556
13018
|
"#3584FA",
|
|
12557
13019
|
"#7c3aed",
|
|
@@ -12571,12 +13033,12 @@ var ProjectSettingsModal = ({
|
|
|
12571
13033
|
onDeleteFile,
|
|
12572
13034
|
onDeleteProject
|
|
12573
13035
|
}) => {
|
|
12574
|
-
const [activeTab, setActiveTab] =
|
|
12575
|
-
const [title, setTitle] =
|
|
12576
|
-
const [description, setDescription] =
|
|
12577
|
-
const [instructions, setInstructions] =
|
|
12578
|
-
const [color, setColor] =
|
|
12579
|
-
|
|
13036
|
+
const [activeTab, setActiveTab] = useState20("general");
|
|
13037
|
+
const [title, setTitle] = useState20("");
|
|
13038
|
+
const [description, setDescription] = useState20("");
|
|
13039
|
+
const [instructions, setInstructions] = useState20("");
|
|
13040
|
+
const [color, setColor] = useState20("#3584FA");
|
|
13041
|
+
useEffect12(() => {
|
|
12580
13042
|
if (project) {
|
|
12581
13043
|
setTitle(project.title);
|
|
12582
13044
|
setDescription(project.description || "");
|
|
@@ -12632,7 +13094,7 @@ var ProjectSettingsModal = ({
|
|
|
12632
13094
|
cursor: "pointer",
|
|
12633
13095
|
fontFamily: "inherit"
|
|
12634
13096
|
});
|
|
12635
|
-
return /* @__PURE__ */
|
|
13097
|
+
return /* @__PURE__ */ jsx20(
|
|
12636
13098
|
"div",
|
|
12637
13099
|
{
|
|
12638
13100
|
style: {
|
|
@@ -12647,7 +13109,7 @@ var ProjectSettingsModal = ({
|
|
|
12647
13109
|
onClick: (e) => {
|
|
12648
13110
|
if (e.target === e.currentTarget) onClose();
|
|
12649
13111
|
},
|
|
12650
|
-
children: /* @__PURE__ */
|
|
13112
|
+
children: /* @__PURE__ */ jsxs19(
|
|
12651
13113
|
"div",
|
|
12652
13114
|
{
|
|
12653
13115
|
style: {
|
|
@@ -12661,7 +13123,7 @@ var ProjectSettingsModal = ({
|
|
|
12661
13123
|
overflow: "hidden"
|
|
12662
13124
|
},
|
|
12663
13125
|
children: [
|
|
12664
|
-
/* @__PURE__ */
|
|
13126
|
+
/* @__PURE__ */ jsxs19(
|
|
12665
13127
|
"div",
|
|
12666
13128
|
{
|
|
12667
13129
|
style: {
|
|
@@ -12671,8 +13133,8 @@ var ProjectSettingsModal = ({
|
|
|
12671
13133
|
padding: "20px 24px 0"
|
|
12672
13134
|
},
|
|
12673
13135
|
children: [
|
|
12674
|
-
/* @__PURE__ */
|
|
12675
|
-
/* @__PURE__ */
|
|
13136
|
+
/* @__PURE__ */ jsx20("h2", { style: { fontSize: "16px", fontWeight: 600, margin: 0, color: "var(--chatllm-text, #1a1a1a)" }, children: "\uD504\uB85C\uC81D\uD2B8 \uC124\uC815" }),
|
|
13137
|
+
/* @__PURE__ */ jsx20(
|
|
12676
13138
|
"button",
|
|
12677
13139
|
{
|
|
12678
13140
|
onClick: onClose,
|
|
@@ -12685,13 +13147,13 @@ var ProjectSettingsModal = ({
|
|
|
12685
13147
|
alignItems: "center"
|
|
12686
13148
|
},
|
|
12687
13149
|
"aria-label": "\uB2EB\uAE30",
|
|
12688
|
-
children: /* @__PURE__ */
|
|
13150
|
+
children: /* @__PURE__ */ jsx20(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #999)" })
|
|
12689
13151
|
}
|
|
12690
13152
|
)
|
|
12691
13153
|
]
|
|
12692
13154
|
}
|
|
12693
13155
|
),
|
|
12694
|
-
/* @__PURE__ */
|
|
13156
|
+
/* @__PURE__ */ jsxs19(
|
|
12695
13157
|
"div",
|
|
12696
13158
|
{
|
|
12697
13159
|
style: {
|
|
@@ -12701,9 +13163,9 @@ var ProjectSettingsModal = ({
|
|
|
12701
13163
|
borderBottom: "1px solid var(--chatllm-border, #e0e0e0)"
|
|
12702
13164
|
},
|
|
12703
13165
|
children: [
|
|
12704
|
-
/* @__PURE__ */
|
|
12705
|
-
/* @__PURE__ */
|
|
12706
|
-
/* @__PURE__ */
|
|
13166
|
+
/* @__PURE__ */ jsx20("button", { onClick: () => setActiveTab("general"), style: tabStyle("general"), children: "\uC77C\uBC18" }),
|
|
13167
|
+
/* @__PURE__ */ jsx20("button", { onClick: () => setActiveTab("instructions"), style: tabStyle("instructions"), children: "\uC9C0\uCE68" }),
|
|
13168
|
+
/* @__PURE__ */ jsxs19("button", { onClick: () => setActiveTab("files"), style: tabStyle("files"), children: [
|
|
12707
13169
|
"\uD30C\uC77C (",
|
|
12708
13170
|
project.files.length,
|
|
12709
13171
|
")"
|
|
@@ -12711,11 +13173,11 @@ var ProjectSettingsModal = ({
|
|
|
12711
13173
|
]
|
|
12712
13174
|
}
|
|
12713
13175
|
),
|
|
12714
|
-
/* @__PURE__ */
|
|
12715
|
-
activeTab === "general" && /* @__PURE__ */
|
|
12716
|
-
/* @__PURE__ */
|
|
12717
|
-
/* @__PURE__ */
|
|
12718
|
-
/* @__PURE__ */
|
|
13176
|
+
/* @__PURE__ */ jsxs19("div", { style: { padding: "24px", overflowY: "auto", flex: 1 }, children: [
|
|
13177
|
+
activeTab === "general" && /* @__PURE__ */ jsxs19("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
13178
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
13179
|
+
/* @__PURE__ */ jsx20("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uD504\uB85C\uC81D\uD2B8 \uC774\uB984" }),
|
|
13180
|
+
/* @__PURE__ */ jsx20(
|
|
12719
13181
|
"input",
|
|
12720
13182
|
{
|
|
12721
13183
|
type: "text",
|
|
@@ -12737,9 +13199,9 @@ var ProjectSettingsModal = ({
|
|
|
12737
13199
|
}
|
|
12738
13200
|
)
|
|
12739
13201
|
] }),
|
|
12740
|
-
/* @__PURE__ */
|
|
12741
|
-
/* @__PURE__ */
|
|
12742
|
-
/* @__PURE__ */
|
|
13202
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
13203
|
+
/* @__PURE__ */ jsx20("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uC124\uBA85" }),
|
|
13204
|
+
/* @__PURE__ */ jsx20(
|
|
12743
13205
|
"textarea",
|
|
12744
13206
|
{
|
|
12745
13207
|
value: description,
|
|
@@ -12760,9 +13222,9 @@ var ProjectSettingsModal = ({
|
|
|
12760
13222
|
}
|
|
12761
13223
|
)
|
|
12762
13224
|
] }),
|
|
12763
|
-
/* @__PURE__ */
|
|
12764
|
-
/* @__PURE__ */
|
|
12765
|
-
/* @__PURE__ */
|
|
13225
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
13226
|
+
/* @__PURE__ */ jsx20("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uC0C9\uC0C1" }),
|
|
13227
|
+
/* @__PURE__ */ jsx20("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" }, children: COLOR_PRESETS.map((c) => /* @__PURE__ */ jsx20(
|
|
12766
13228
|
"button",
|
|
12767
13229
|
{
|
|
12768
13230
|
onClick: () => setColor(c),
|
|
@@ -12780,8 +13242,8 @@ var ProjectSettingsModal = ({
|
|
|
12780
13242
|
c
|
|
12781
13243
|
)) })
|
|
12782
13244
|
] }),
|
|
12783
|
-
/* @__PURE__ */
|
|
12784
|
-
!isDefaultProject && onDeleteProject && /* @__PURE__ */
|
|
13245
|
+
/* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end", marginTop: "8px" }, children: [
|
|
13246
|
+
!isDefaultProject && onDeleteProject && /* @__PURE__ */ jsx20(
|
|
12785
13247
|
"button",
|
|
12786
13248
|
{
|
|
12787
13249
|
onClick: () => {
|
|
@@ -12804,7 +13266,7 @@ var ProjectSettingsModal = ({
|
|
|
12804
13266
|
children: "\uD504\uB85C\uC81D\uD2B8 \uC0AD\uC81C"
|
|
12805
13267
|
}
|
|
12806
13268
|
),
|
|
12807
|
-
/* @__PURE__ */
|
|
13269
|
+
/* @__PURE__ */ jsx20(
|
|
12808
13270
|
"button",
|
|
12809
13271
|
{
|
|
12810
13272
|
onClick: handleSaveGeneral,
|
|
@@ -12824,9 +13286,9 @@ var ProjectSettingsModal = ({
|
|
|
12824
13286
|
)
|
|
12825
13287
|
] })
|
|
12826
13288
|
] }),
|
|
12827
|
-
activeTab === "instructions" && /* @__PURE__ */
|
|
12828
|
-
/* @__PURE__ */
|
|
12829
|
-
/* @__PURE__ */
|
|
13289
|
+
activeTab === "instructions" && /* @__PURE__ */ jsxs19("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
13290
|
+
/* @__PURE__ */ jsx20("p", { style: { fontSize: "13px", color: "var(--chatllm-text-muted, #999)", margin: 0 }, children: "\uC774 \uD504\uB85C\uC81D\uD2B8\uC758 \uBAA8\uB4E0 \uB300\uD654\uC5D0\uC11C AI\uAC00 \uB530\uB77C\uC57C \uD560 \uC9C0\uCE68\uC744 \uC785\uB825\uD558\uC138\uC694." }),
|
|
13291
|
+
/* @__PURE__ */ jsx20(
|
|
12830
13292
|
"textarea",
|
|
12831
13293
|
{
|
|
12832
13294
|
value: instructions,
|
|
@@ -12847,7 +13309,7 @@ var ProjectSettingsModal = ({
|
|
|
12847
13309
|
}
|
|
12848
13310
|
}
|
|
12849
13311
|
),
|
|
12850
|
-
/* @__PURE__ */
|
|
13312
|
+
/* @__PURE__ */ jsx20("div", { style: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx20(
|
|
12851
13313
|
"button",
|
|
12852
13314
|
{
|
|
12853
13315
|
onClick: handleSaveInstructions,
|
|
@@ -12866,10 +13328,10 @@ var ProjectSettingsModal = ({
|
|
|
12866
13328
|
}
|
|
12867
13329
|
) })
|
|
12868
13330
|
] }),
|
|
12869
|
-
activeTab === "files" && /* @__PURE__ */
|
|
12870
|
-
/* @__PURE__ */
|
|
12871
|
-
/* @__PURE__ */
|
|
12872
|
-
/* @__PURE__ */
|
|
13331
|
+
activeTab === "files" && /* @__PURE__ */ jsxs19("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
13332
|
+
/* @__PURE__ */ jsxs19("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
13333
|
+
/* @__PURE__ */ jsx20("p", { style: { fontSize: "13px", color: "var(--chatllm-text-muted, #999)", margin: 0 }, children: "\uD504\uB85C\uC81D\uD2B8 \uCEE8\uD14D\uC2A4\uD2B8\uB85C \uC0AC\uC6A9\uD560 \uD30C\uC77C\uC744 \uAD00\uB9AC\uD569\uB2C8\uB2E4." }),
|
|
13334
|
+
/* @__PURE__ */ jsxs19(
|
|
12873
13335
|
"button",
|
|
12874
13336
|
{
|
|
12875
13337
|
onClick: handleFileUpload,
|
|
@@ -12887,13 +13349,13 @@ var ProjectSettingsModal = ({
|
|
|
12887
13349
|
color: "var(--chatllm-text, #1a1a1a)"
|
|
12888
13350
|
},
|
|
12889
13351
|
children: [
|
|
12890
|
-
/* @__PURE__ */
|
|
13352
|
+
/* @__PURE__ */ jsx20(IconSvg, { name: "upload-line", size: 14 }),
|
|
12891
13353
|
"\uC5C5\uB85C\uB4DC"
|
|
12892
13354
|
]
|
|
12893
13355
|
}
|
|
12894
13356
|
)
|
|
12895
13357
|
] }),
|
|
12896
|
-
project.files.length === 0 ? /* @__PURE__ */
|
|
13358
|
+
project.files.length === 0 ? /* @__PURE__ */ jsx20(
|
|
12897
13359
|
"div",
|
|
12898
13360
|
{
|
|
12899
13361
|
style: {
|
|
@@ -12906,7 +13368,7 @@ var ProjectSettingsModal = ({
|
|
|
12906
13368
|
},
|
|
12907
13369
|
children: "\uC544\uC9C1 \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"
|
|
12908
13370
|
}
|
|
12909
|
-
) : /* @__PURE__ */
|
|
13371
|
+
) : /* @__PURE__ */ jsx20("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: project.files.map((file) => /* @__PURE__ */ jsxs19(
|
|
12910
13372
|
"div",
|
|
12911
13373
|
{
|
|
12912
13374
|
style: {
|
|
@@ -12918,10 +13380,10 @@ var ProjectSettingsModal = ({
|
|
|
12918
13380
|
borderRadius: "6px"
|
|
12919
13381
|
},
|
|
12920
13382
|
children: [
|
|
12921
|
-
/* @__PURE__ */
|
|
12922
|
-
/* @__PURE__ */
|
|
12923
|
-
/* @__PURE__ */
|
|
12924
|
-
/* @__PURE__ */
|
|
13383
|
+
/* @__PURE__ */ jsxs19("div", { style: { display: "flex", alignItems: "center", gap: "10px", overflow: "hidden" }, children: [
|
|
13384
|
+
/* @__PURE__ */ jsx20(IconSvg, { name: getFileIcon2(file.type), size: 18, color: "var(--chatllm-text-muted, #999)" }),
|
|
13385
|
+
/* @__PURE__ */ jsxs19("div", { style: { overflow: "hidden" }, children: [
|
|
13386
|
+
/* @__PURE__ */ jsx20(
|
|
12925
13387
|
"div",
|
|
12926
13388
|
{
|
|
12927
13389
|
style: {
|
|
@@ -12935,13 +13397,13 @@ var ProjectSettingsModal = ({
|
|
|
12935
13397
|
children: file.name
|
|
12936
13398
|
}
|
|
12937
13399
|
),
|
|
12938
|
-
/* @__PURE__ */
|
|
13400
|
+
/* @__PURE__ */ jsxs19("div", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #999)" }, children: [
|
|
12939
13401
|
file.type,
|
|
12940
13402
|
formatSize(file.size) ? ` \xB7 ${formatSize(file.size)}` : ""
|
|
12941
13403
|
] })
|
|
12942
13404
|
] })
|
|
12943
13405
|
] }),
|
|
12944
|
-
/* @__PURE__ */
|
|
13406
|
+
/* @__PURE__ */ jsx20(
|
|
12945
13407
|
"button",
|
|
12946
13408
|
{
|
|
12947
13409
|
onClick: () => onDeleteFile(project.id, file.id),
|
|
@@ -12962,7 +13424,7 @@ var ProjectSettingsModal = ({
|
|
|
12962
13424
|
e.currentTarget.style.opacity = "0.5";
|
|
12963
13425
|
},
|
|
12964
13426
|
"aria-label": `${file.name} \uC0AD\uC81C`,
|
|
12965
|
-
children: /* @__PURE__ */
|
|
13427
|
+
children: /* @__PURE__ */ jsx20(IconSvg, { name: "delete-bin-line", size: 16, color: "#dc2626" })
|
|
12966
13428
|
}
|
|
12967
13429
|
)
|
|
12968
13430
|
]
|
|
@@ -12979,14 +13441,14 @@ var ProjectSettingsModal = ({
|
|
|
12979
13441
|
};
|
|
12980
13442
|
|
|
12981
13443
|
// src/react/components/DisclaimerModal.tsx
|
|
12982
|
-
import { jsx as
|
|
13444
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
12983
13445
|
var highlightStyle = {
|
|
12984
13446
|
color: "var(--chatllm-text, #1e293b)",
|
|
12985
13447
|
fontWeight: 600
|
|
12986
13448
|
};
|
|
12987
13449
|
var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
12988
13450
|
if (!isOpen) return null;
|
|
12989
|
-
return /* @__PURE__ */
|
|
13451
|
+
return /* @__PURE__ */ jsx21(
|
|
12990
13452
|
"div",
|
|
12991
13453
|
{
|
|
12992
13454
|
className: "chatllm-disclaimer-overlay",
|
|
@@ -13000,7 +13462,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13000
13462
|
zIndex: 1e3
|
|
13001
13463
|
},
|
|
13002
13464
|
onClick: onClose,
|
|
13003
|
-
children: /* @__PURE__ */
|
|
13465
|
+
children: /* @__PURE__ */ jsxs20(
|
|
13004
13466
|
"div",
|
|
13005
13467
|
{
|
|
13006
13468
|
className: "chatllm-disclaimer-modal",
|
|
@@ -13018,7 +13480,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13018
13480
|
},
|
|
13019
13481
|
onClick: (e) => e.stopPropagation(),
|
|
13020
13482
|
children: [
|
|
13021
|
-
/* @__PURE__ */
|
|
13483
|
+
/* @__PURE__ */ jsxs20(
|
|
13022
13484
|
"div",
|
|
13023
13485
|
{
|
|
13024
13486
|
style: {
|
|
@@ -13029,9 +13491,9 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13029
13491
|
borderBottom: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
13030
13492
|
},
|
|
13031
13493
|
children: [
|
|
13032
|
-
/* @__PURE__ */
|
|
13033
|
-
/* @__PURE__ */
|
|
13034
|
-
/* @__PURE__ */
|
|
13494
|
+
/* @__PURE__ */ jsxs20("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
13495
|
+
/* @__PURE__ */ jsx21(IconSvg, { name: "error-warning-line", size: 20, color: "var(--chatllm-primary, #3584FA)" }),
|
|
13496
|
+
/* @__PURE__ */ jsx21(
|
|
13035
13497
|
"h2",
|
|
13036
13498
|
{
|
|
13037
13499
|
style: {
|
|
@@ -13044,7 +13506,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13044
13506
|
}
|
|
13045
13507
|
)
|
|
13046
13508
|
] }),
|
|
13047
|
-
/* @__PURE__ */
|
|
13509
|
+
/* @__PURE__ */ jsx21(
|
|
13048
13510
|
"button",
|
|
13049
13511
|
{
|
|
13050
13512
|
onClick: onClose,
|
|
@@ -13059,13 +13521,13 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13059
13521
|
alignItems: "center",
|
|
13060
13522
|
justifyContent: "center"
|
|
13061
13523
|
},
|
|
13062
|
-
children: /* @__PURE__ */
|
|
13524
|
+
children: /* @__PURE__ */ jsx21(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #64748b)" })
|
|
13063
13525
|
}
|
|
13064
13526
|
)
|
|
13065
13527
|
]
|
|
13066
13528
|
}
|
|
13067
13529
|
),
|
|
13068
|
-
/* @__PURE__ */
|
|
13530
|
+
/* @__PURE__ */ jsxs20(
|
|
13069
13531
|
"div",
|
|
13070
13532
|
{
|
|
13071
13533
|
className: "chatllm-scrollbar",
|
|
@@ -13077,12 +13539,12 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13077
13539
|
color: "var(--chatllm-text-secondary, #475569)"
|
|
13078
13540
|
},
|
|
13079
13541
|
children: [
|
|
13080
|
-
/* @__PURE__ */
|
|
13542
|
+
/* @__PURE__ */ jsxs20("p", { style: { margin: "0 0 16px" }, children: [
|
|
13081
13543
|
"\uC800\uB294 \uC5EC\uB7EC\uBD84\uC758 \uC9C8\uBB38\uC5D0 ",
|
|
13082
|
-
/* @__PURE__ */
|
|
13544
|
+
/* @__PURE__ */ jsx21("span", { style: highlightStyle, children: "\uCD5C\uC120\uC758 \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uAE30 \uC704\uD574 \uD56D\uC0C1 \uB178\uB825" }),
|
|
13083
13545
|
"\uD558\uACE0 \uC788\uC5B4\uC694. \uD558\uC9C0\uB9CC \uC194\uC9C1\uD558\uAC8C \uB9D0\uC500\uB4DC\uB9AC\uBA74, \uC800\uB3C4 \uB54C\uB54C\uB85C \uC2E4\uC218\uB97C \uD558\uAC70\uB098 \uC815\uD655\uD558\uC9C0 \uC54A\uC740 \uB2F5\uBCC0\uC744 \uB4DC\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."
|
|
13084
13546
|
] }),
|
|
13085
|
-
/* @__PURE__ */
|
|
13547
|
+
/* @__PURE__ */ jsxs20(
|
|
13086
13548
|
"div",
|
|
13087
13549
|
{
|
|
13088
13550
|
style: {
|
|
@@ -13095,33 +13557,33 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13095
13557
|
lineHeight: 1.7
|
|
13096
13558
|
},
|
|
13097
13559
|
children: [
|
|
13098
|
-
/* @__PURE__ */
|
|
13099
|
-
/* @__PURE__ */
|
|
13100
|
-
/* @__PURE__ */
|
|
13101
|
-
/* @__PURE__ */
|
|
13102
|
-
/* @__PURE__ */
|
|
13560
|
+
/* @__PURE__ */ jsx21("p", { style: { margin: "0 0 8px", fontWeight: 600, color: "var(--chatllm-text, #1e293b)" }, children: "\uC81C\uAC00 \uC774\uB7F0 \uC2E4\uC218\uB97C \uD560 \uC218 \uC788\uC5B4\uC694" }),
|
|
13561
|
+
/* @__PURE__ */ jsxs20("ul", { style: { margin: 0, paddingLeft: "18px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
13562
|
+
/* @__PURE__ */ jsx21("li", { children: "\uCD5C\uC2E0 \uC815\uBCF4\uB97C \uBC18\uC601\uD558\uC9C0 \uBABB\uD55C \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uB294 \uACBD\uC6B0" }),
|
|
13563
|
+
/* @__PURE__ */ jsx21("li", { children: "\uADF8\uB7F4\uB4EF\uD558\uAC8C \uB4E4\uB9AC\uC9C0\uB9CC \uC2E4\uC81C\uB85C\uB294 \uC815\uD655\uD558\uC9C0 \uC54A\uC740 \uB0B4\uC6A9" }),
|
|
13564
|
+
/* @__PURE__ */ jsx21("li", { children: "\uC2E4\uC81C\uB85C \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uCD9C\uCC98\uB098 \uC778\uC6A9\uC744 \uB9CC\uB4E4\uC5B4\uB0B4\uB294 \uACBD\uC6B0" })
|
|
13103
13565
|
] })
|
|
13104
13566
|
]
|
|
13105
13567
|
}
|
|
13106
13568
|
),
|
|
13107
|
-
/* @__PURE__ */
|
|
13569
|
+
/* @__PURE__ */ jsxs20("p", { style: { margin: "0 0 16px" }, children: [
|
|
13108
13570
|
"\uC774\uB7F0 \uD604\uC0C1\uC744 ",
|
|
13109
|
-
/* @__PURE__ */
|
|
13571
|
+
/* @__PURE__ */ jsx21("span", { style: highlightStyle, children: "'\uD658\uAC01(Hallucination)'" }),
|
|
13110
13572
|
"\uC774\uB77C\uACE0 \uBD80\uB974\uB294\uB370\uC694, \uC544\uC9C1\uC740 \uC800\uC640 \uAC19\uC740 AI\uAC00 \uAC00\uC9C4 \uADFC\uBCF8\uC801\uC778 \uD55C\uACC4\uC608\uC694. \uC81C \uB2F5\uBCC0\uC774 \uC544\uBB34\uB9AC \uC790\uC5F0\uC2A4\uB7EC\uC6CC \uBCF4\uC5EC\uB3C4, ",
|
|
13111
|
-
/* @__PURE__ */
|
|
13573
|
+
/* @__PURE__ */ jsx21("span", { style: highlightStyle, children: "\uD55C \uBC88 \uB354 \uD655\uC778" }),
|
|
13112
13574
|
"\uD574 \uC8FC\uC2DC\uBA74 \uAC10\uC0AC\uD558\uACA0\uC2B5\uB2C8\uB2E4."
|
|
13113
13575
|
] }),
|
|
13114
|
-
/* @__PURE__ */
|
|
13115
|
-
/* @__PURE__ */
|
|
13576
|
+
/* @__PURE__ */ jsxs20("p", { style: { margin: "0 0 16px" }, children: [
|
|
13577
|
+
/* @__PURE__ */ jsx21("span", { style: highlightStyle, children: "\uC81C \uB2F5\uBCC0\uC740 \uCC38\uACE0 \uC790\uB8CC" }),
|
|
13116
13578
|
"\uB85C \uD65C\uC6A9\uD574 \uC8FC\uC2DC\uACE0, \uC911\uC694\uD55C \uD310\uB2E8\uC744 \uB0B4\uB9AC\uC2E4 \uB54C\uB294 \uAF2D \uCD94\uAC00\uB85C \uD655\uC778\uD574 \uC8FC\uC138\uC694. \uC800\uB3C4 \uB354 \uC815\uD655\uD55C \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uAE30 \uC704\uD574 \uACC4\uC18D \uBC1C\uC804\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4."
|
|
13117
13579
|
] }),
|
|
13118
|
-
/* @__PURE__ */
|
|
13580
|
+
/* @__PURE__ */ jsxs20("p", { style: { margin: "0 0 16px" }, children: [
|
|
13119
13581
|
"\uC81C\uAC00 \uC6F9 \uAC80\uC0C9 \uACB0\uACFC\uB97C \uC54C\uB824\uB4DC\uB9B4 \uB54C\uB3C4,",
|
|
13120
13582
|
" ",
|
|
13121
|
-
/* @__PURE__ */
|
|
13583
|
+
/* @__PURE__ */ jsx21("span", { style: highlightStyle, children: "\uC6D0\uBCF8 \uCD9C\uCC98\uB97C \uC9C1\uC811 \uD655\uC778" }),
|
|
13122
13584
|
"\uD574 \uBCF4\uC2DC\uB294 \uAC78 \uCD94\uCC9C\uB4DC\uB824\uC694. \uC694\uC57D \uACFC\uC815\uC5D0\uC11C \uB193\uCE60 \uC218 \uC788\uB294 \uC911\uC694\uD55C \uB9E5\uB77D\uC774 \uC6D0\uBCF8\uC5D0 \uB2F4\uACA8 \uC788\uC744 \uC218 \uC788\uAC70\uB4E0\uC694."
|
|
13123
13585
|
] }),
|
|
13124
|
-
/* @__PURE__ */
|
|
13586
|
+
/* @__PURE__ */ jsx21(
|
|
13125
13587
|
"div",
|
|
13126
13588
|
{
|
|
13127
13589
|
style: {
|
|
@@ -13132,10 +13594,10 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13132
13594
|
lineHeight: 1.7,
|
|
13133
13595
|
textAlign: "center"
|
|
13134
13596
|
},
|
|
13135
|
-
children: /* @__PURE__ */
|
|
13597
|
+
children: /* @__PURE__ */ jsxs20("p", { style: { margin: 0 }, children: [
|
|
13136
13598
|
"\uC800\uC5D0 \uB300\uD55C \uC758\uACAC\uC774\uB098 \uAC1C\uC120 \uC81C\uC548\uC774 \uC788\uC73C\uC2DC\uB2E4\uBA74",
|
|
13137
13599
|
" ",
|
|
13138
|
-
/* @__PURE__ */
|
|
13600
|
+
/* @__PURE__ */ jsx21(
|
|
13139
13601
|
"a",
|
|
13140
13602
|
{
|
|
13141
13603
|
href: "mailto:info@gendive.ai",
|
|
@@ -13148,7 +13610,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13148
13610
|
}
|
|
13149
13611
|
),
|
|
13150
13612
|
"\uB85C \uC54C\uB824\uC8FC\uC138\uC694.",
|
|
13151
|
-
/* @__PURE__ */
|
|
13613
|
+
/* @__PURE__ */ jsx21("br", {}),
|
|
13152
13614
|
"\uC5EC\uB7EC\uBD84\uC758 \uD53C\uB4DC\uBC31 \uD558\uB098\uD558\uB098\uAC00 \uC81C\uAC00 \uC131\uC7A5\uD558\uB294 \uB370 \uD070 \uD798\uC774 \uB429\uB2C8\uB2E4."
|
|
13153
13615
|
] })
|
|
13154
13616
|
}
|
|
@@ -13164,7 +13626,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
13164
13626
|
};
|
|
13165
13627
|
|
|
13166
13628
|
// src/react/components/ChecklistPanel.tsx
|
|
13167
|
-
import { Fragment as Fragment8, jsx as
|
|
13629
|
+
import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
13168
13630
|
var ChecklistPanel = ({
|
|
13169
13631
|
message,
|
|
13170
13632
|
isOpen,
|
|
@@ -13178,8 +13640,8 @@ var ChecklistPanel = ({
|
|
|
13178
13640
|
}) => {
|
|
13179
13641
|
const block = message?.checklistBlock;
|
|
13180
13642
|
if (isMobileOverlay) {
|
|
13181
|
-
return /* @__PURE__ */
|
|
13182
|
-
/* @__PURE__ */
|
|
13643
|
+
return /* @__PURE__ */ jsxs21(Fragment8, { children: [
|
|
13644
|
+
/* @__PURE__ */ jsx22(
|
|
13183
13645
|
"div",
|
|
13184
13646
|
{
|
|
13185
13647
|
onClick: onClose,
|
|
@@ -13194,7 +13656,7 @@ var ChecklistPanel = ({
|
|
|
13194
13656
|
}
|
|
13195
13657
|
}
|
|
13196
13658
|
),
|
|
13197
|
-
/* @__PURE__ */
|
|
13659
|
+
/* @__PURE__ */ jsx22(
|
|
13198
13660
|
"aside",
|
|
13199
13661
|
{
|
|
13200
13662
|
style: {
|
|
@@ -13217,7 +13679,7 @@ var ChecklistPanel = ({
|
|
|
13217
13679
|
)
|
|
13218
13680
|
] });
|
|
13219
13681
|
}
|
|
13220
|
-
return /* @__PURE__ */
|
|
13682
|
+
return /* @__PURE__ */ jsx22(
|
|
13221
13683
|
"aside",
|
|
13222
13684
|
{
|
|
13223
13685
|
style: {
|
|
@@ -13235,8 +13697,8 @@ var ChecklistPanel = ({
|
|
|
13235
13697
|
}
|
|
13236
13698
|
);
|
|
13237
13699
|
function renderPanelContent() {
|
|
13238
|
-
return /* @__PURE__ */
|
|
13239
|
-
/* @__PURE__ */
|
|
13700
|
+
return /* @__PURE__ */ jsxs21(Fragment8, { children: [
|
|
13701
|
+
/* @__PURE__ */ jsxs21(
|
|
13240
13702
|
"div",
|
|
13241
13703
|
{
|
|
13242
13704
|
style: {
|
|
@@ -13248,9 +13710,9 @@ var ChecklistPanel = ({
|
|
|
13248
13710
|
flexShrink: 0
|
|
13249
13711
|
},
|
|
13250
13712
|
children: [
|
|
13251
|
-
/* @__PURE__ */
|
|
13252
|
-
/* @__PURE__ */
|
|
13253
|
-
/* @__PURE__ */
|
|
13713
|
+
/* @__PURE__ */ jsxs21("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
13714
|
+
/* @__PURE__ */ jsx22(IconSvg, { name: "list-check", size: 18, color: "var(--chatllm-primary, #3584FA)" }),
|
|
13715
|
+
/* @__PURE__ */ jsx22(
|
|
13254
13716
|
"span",
|
|
13255
13717
|
{
|
|
13256
13718
|
style: {
|
|
@@ -13262,7 +13724,7 @@ var ChecklistPanel = ({
|
|
|
13262
13724
|
}
|
|
13263
13725
|
)
|
|
13264
13726
|
] }),
|
|
13265
|
-
/* @__PURE__ */
|
|
13727
|
+
/* @__PURE__ */ jsx22(
|
|
13266
13728
|
"button",
|
|
13267
13729
|
{
|
|
13268
13730
|
onClick: onClose,
|
|
@@ -13280,13 +13742,13 @@ var ChecklistPanel = ({
|
|
|
13280
13742
|
color: "var(--chatllm-text-muted, #94a3b8)",
|
|
13281
13743
|
transition: "background-color 0.15s ease"
|
|
13282
13744
|
},
|
|
13283
|
-
children: /* @__PURE__ */
|
|
13745
|
+
children: /* @__PURE__ */ jsx22(IconSvg, { name: "close-line", size: 18, color: "currentColor" })
|
|
13284
13746
|
}
|
|
13285
13747
|
)
|
|
13286
13748
|
]
|
|
13287
13749
|
}
|
|
13288
13750
|
),
|
|
13289
|
-
/* @__PURE__ */
|
|
13751
|
+
/* @__PURE__ */ jsx22(
|
|
13290
13752
|
"div",
|
|
13291
13753
|
{
|
|
13292
13754
|
className: "chatllm-scrollbar",
|
|
@@ -13295,7 +13757,7 @@ var ChecklistPanel = ({
|
|
|
13295
13757
|
overflowY: "auto",
|
|
13296
13758
|
padding: "16px"
|
|
13297
13759
|
},
|
|
13298
|
-
children: block && block.items.length > 0 ? /* @__PURE__ */
|
|
13760
|
+
children: block && block.items.length > 0 ? /* @__PURE__ */ jsx22(
|
|
13299
13761
|
ChecklistCard,
|
|
13300
13762
|
{
|
|
13301
13763
|
items: block.items,
|
|
@@ -13306,7 +13768,7 @@ var ChecklistPanel = ({
|
|
|
13306
13768
|
onSkipStep: onSkip,
|
|
13307
13769
|
onStart
|
|
13308
13770
|
}
|
|
13309
|
-
) : /* @__PURE__ */
|
|
13771
|
+
) : /* @__PURE__ */ jsx22(
|
|
13310
13772
|
"div",
|
|
13311
13773
|
{
|
|
13312
13774
|
style: {
|
|
@@ -13383,6 +13845,57 @@ var injectBaseStyles = () => {
|
|
|
13383
13845
|
to { opacity: 1; }
|
|
13384
13846
|
}
|
|
13385
13847
|
|
|
13848
|
+
@keyframes chatllm-stream-fadein {
|
|
13849
|
+
from { opacity: 0; transform: translateY(4px); }
|
|
13850
|
+
to { opacity: 1; transform: translateY(0); }
|
|
13851
|
+
}
|
|
13852
|
+
|
|
13853
|
+
.chatllm-message--assistant .chatllm-sheet {
|
|
13854
|
+
animation: chatllm-stream-fadein 0.3s ease-out;
|
|
13855
|
+
}
|
|
13856
|
+
|
|
13857
|
+
/* \uC2A4\uD2B8\uB9AC\uBC0D \uD14D\uC2A4\uD2B8 \uBD80\uB4DC\uB7EC\uC6B4 \uB192\uC774 \uC804\uD658 */
|
|
13858
|
+
.chatllm-message--assistant .chatllm-sheet > div {
|
|
13859
|
+
transition: height 0.15s ease-out;
|
|
13860
|
+
}
|
|
13861
|
+
|
|
13862
|
+
/* \uC2A4\uD2B8\uB9AC\uBC0D \uC911 \uB9C8\uC9C0\uB9C9 \uB2E8\uC5B4 \uD398\uC774\uB4DC\uC778 \uD6A8\uACFC */
|
|
13863
|
+
@keyframes chatllm-word-fadein {
|
|
13864
|
+
from { opacity: 0.3; }
|
|
13865
|
+
to { opacity: 1; }
|
|
13866
|
+
}
|
|
13867
|
+
|
|
13868
|
+
.chatllm-streaming-content p:last-child,
|
|
13869
|
+
.chatllm-streaming-content li:last-child,
|
|
13870
|
+
.chatllm-streaming-content h1:last-child,
|
|
13871
|
+
.chatllm-streaming-content h2:last-child,
|
|
13872
|
+
.chatllm-streaming-content h3:last-child {
|
|
13873
|
+
animation: chatllm-word-fadein 0.2s ease-out;
|
|
13874
|
+
}
|
|
13875
|
+
|
|
13876
|
+
@keyframes chatllm-artifact-enter {
|
|
13877
|
+
from {
|
|
13878
|
+
opacity: 0;
|
|
13879
|
+
transform: translateY(12px) scale(0.97);
|
|
13880
|
+
}
|
|
13881
|
+
to {
|
|
13882
|
+
opacity: 1;
|
|
13883
|
+
transform: translateY(0) scale(1);
|
|
13884
|
+
}
|
|
13885
|
+
}
|
|
13886
|
+
|
|
13887
|
+
.chatllm-artifact-card {
|
|
13888
|
+
animation: chatllm-artifact-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
13889
|
+
}
|
|
13890
|
+
|
|
13891
|
+
/** @Todo vibecode - artifact \uC0DD\uC131 \uC911 \uB85C\uB529 \uC778\uB514\uCF00\uC774\uD130 \uC2A4\uD540 + \uD398\uC774\uB4DC\uC778 */
|
|
13892
|
+
.chatllm-artifact-loading {
|
|
13893
|
+
animation: chatllm-stream-fadein 0.3s ease both;
|
|
13894
|
+
}
|
|
13895
|
+
.chatllm-artifact-loading svg {
|
|
13896
|
+
animation: chatllm-spin 1s linear infinite;
|
|
13897
|
+
}
|
|
13898
|
+
|
|
13386
13899
|
.chatllm-root {
|
|
13387
13900
|
--chatllm-primary: #3584FA;
|
|
13388
13901
|
--chatllm-primary-hover: #2D70D5;
|
|
@@ -13884,7 +14397,7 @@ var injectFloatingStyles = () => {
|
|
|
13884
14397
|
};
|
|
13885
14398
|
|
|
13886
14399
|
// src/react/ChatUI.tsx
|
|
13887
|
-
import { Fragment as Fragment9, jsx as
|
|
14400
|
+
import { Fragment as Fragment9, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
13888
14401
|
var DEFAULT_ACTIONS = [];
|
|
13889
14402
|
var DEFAULT_TEMPLATES = [];
|
|
13890
14403
|
var DEFAULT_MODELS = [
|
|
@@ -13990,28 +14503,28 @@ var ChatUIView = ({
|
|
|
13990
14503
|
handleChecklistSkip,
|
|
13991
14504
|
activeChecklistMessage
|
|
13992
14505
|
} = state;
|
|
13993
|
-
const [disclaimerOpen, setDisclaimerOpen] =
|
|
13994
|
-
const [isMobile, setIsMobile] =
|
|
13995
|
-
|
|
14506
|
+
const [disclaimerOpen, setDisclaimerOpen] = React17.useState(false);
|
|
14507
|
+
const [isMobile, setIsMobile] = React17.useState(false);
|
|
14508
|
+
React17.useEffect(() => {
|
|
13996
14509
|
if (typeof window === "undefined") return;
|
|
13997
14510
|
const check = () => setIsMobile(window.innerWidth < 768);
|
|
13998
14511
|
check();
|
|
13999
14512
|
window.addEventListener("resize", check);
|
|
14000
14513
|
return () => window.removeEventListener("resize", check);
|
|
14001
14514
|
}, []);
|
|
14002
|
-
const [checklistPanelDismissed, setChecklistPanelDismissed] =
|
|
14515
|
+
const [checklistPanelDismissed, setChecklistPanelDismissed] = React17.useState(false);
|
|
14003
14516
|
const isChecklistPanelOpen = !!activeChecklistMessage && !checklistPanelDismissed;
|
|
14004
|
-
const prevChecklistIdRef =
|
|
14005
|
-
|
|
14517
|
+
const prevChecklistIdRef = React17.useRef(void 0);
|
|
14518
|
+
React17.useEffect(() => {
|
|
14006
14519
|
const currentId = activeChecklistMessage?.checklistBlock?.id;
|
|
14007
14520
|
if (currentId && currentId !== prevChecklistIdRef.current && !activeChecklistMessage?.checklistBlock?.completed) {
|
|
14008
14521
|
setChecklistPanelDismissed(false);
|
|
14009
14522
|
}
|
|
14010
14523
|
prevChecklistIdRef.current = currentId;
|
|
14011
14524
|
}, [activeChecklistMessage?.checklistBlock?.id, activeChecklistMessage?.checklistBlock?.completed]);
|
|
14012
|
-
const [welcomeExiting, setWelcomeExiting] =
|
|
14013
|
-
const prevMessageCountRef =
|
|
14014
|
-
|
|
14525
|
+
const [welcomeExiting, setWelcomeExiting] = React17.useState(false);
|
|
14526
|
+
const prevMessageCountRef = React17.useRef(messages.length);
|
|
14527
|
+
React17.useEffect(() => {
|
|
14015
14528
|
let timer;
|
|
14016
14529
|
if (prevMessageCountRef.current === 0 && messages.length > 0) {
|
|
14017
14530
|
setWelcomeExiting(true);
|
|
@@ -14035,7 +14548,7 @@ var ChatUIView = ({
|
|
|
14035
14548
|
const handleChoiceClick = (choice) => {
|
|
14036
14549
|
setInput(choice.text);
|
|
14037
14550
|
};
|
|
14038
|
-
const memoryItems =
|
|
14551
|
+
const memoryItems = React17.useMemo(() => {
|
|
14039
14552
|
if (!globalMemory?.state.entries) return [];
|
|
14040
14553
|
const items = [];
|
|
14041
14554
|
for (const [key, entry] of globalMemory.state.entries) {
|
|
@@ -14049,7 +14562,7 @@ var ChatUIView = ({
|
|
|
14049
14562
|
}
|
|
14050
14563
|
return items;
|
|
14051
14564
|
}, [globalMemory?.state.entries]);
|
|
14052
|
-
const projectMemoryItems =
|
|
14565
|
+
const projectMemoryItems = React17.useMemo(() => {
|
|
14053
14566
|
if (!projectMemory?.state.entries) return [];
|
|
14054
14567
|
const items = [];
|
|
14055
14568
|
for (const [key, entry] of projectMemory.state.entries) {
|
|
@@ -14064,7 +14577,7 @@ var ChatUIView = ({
|
|
|
14064
14577
|
return items;
|
|
14065
14578
|
}, [projectMemory?.state.entries]);
|
|
14066
14579
|
const themeClass = theme?.mode === "dark" ? "chatllm-dark" : "";
|
|
14067
|
-
return /* @__PURE__ */
|
|
14580
|
+
return /* @__PURE__ */ jsxs22(
|
|
14068
14581
|
"div",
|
|
14069
14582
|
{
|
|
14070
14583
|
className: `chatllm-root ${themeClass} ${className}`,
|
|
@@ -14077,7 +14590,7 @@ var ChatUIView = ({
|
|
|
14077
14590
|
position: "relative"
|
|
14078
14591
|
},
|
|
14079
14592
|
children: [
|
|
14080
|
-
showSidebar && /* @__PURE__ */
|
|
14593
|
+
showSidebar && /* @__PURE__ */ jsx23(
|
|
14081
14594
|
ChatSidebar,
|
|
14082
14595
|
{
|
|
14083
14596
|
sessions,
|
|
@@ -14109,7 +14622,7 @@ var ChatUIView = ({
|
|
|
14109
14622
|
isLoading: isSessionsLoading
|
|
14110
14623
|
}
|
|
14111
14624
|
),
|
|
14112
|
-
/* @__PURE__ */
|
|
14625
|
+
/* @__PURE__ */ jsxs22(
|
|
14113
14626
|
"main",
|
|
14114
14627
|
{
|
|
14115
14628
|
style: {
|
|
@@ -14121,7 +14634,7 @@ var ChatUIView = ({
|
|
|
14121
14634
|
minWidth: 0
|
|
14122
14635
|
},
|
|
14123
14636
|
children: [
|
|
14124
|
-
/* @__PURE__ */
|
|
14637
|
+
/* @__PURE__ */ jsx23(
|
|
14125
14638
|
ChatHeader,
|
|
14126
14639
|
{
|
|
14127
14640
|
title: currentSession?.title || "\uC0C8 \uB300\uD654",
|
|
@@ -14136,7 +14649,7 @@ var ChatUIView = ({
|
|
|
14136
14649
|
renderHeaderExtra
|
|
14137
14650
|
}
|
|
14138
14651
|
),
|
|
14139
|
-
(messages.length === 0 || welcomeExiting) && /* @__PURE__ */
|
|
14652
|
+
(messages.length === 0 || welcomeExiting) && /* @__PURE__ */ jsxs22(
|
|
14140
14653
|
"div",
|
|
14141
14654
|
{
|
|
14142
14655
|
style: {
|
|
@@ -14151,7 +14664,7 @@ var ChatUIView = ({
|
|
|
14151
14664
|
pointerEvents: welcomeExiting ? "none" : "auto"
|
|
14152
14665
|
},
|
|
14153
14666
|
children: [
|
|
14154
|
-
/* @__PURE__ */
|
|
14667
|
+
/* @__PURE__ */ jsx23(
|
|
14155
14668
|
"h1",
|
|
14156
14669
|
{
|
|
14157
14670
|
style: {
|
|
@@ -14165,7 +14678,7 @@ var ChatUIView = ({
|
|
|
14165
14678
|
children: greeting ? `${greeting} \u273A` : "\u273A \uBB34\uC5C7\uC744 \uC0DD\uAC01\uD574 \uBCFC\uAE4C\uC694?"
|
|
14166
14679
|
}
|
|
14167
14680
|
),
|
|
14168
|
-
/* @__PURE__ */
|
|
14681
|
+
/* @__PURE__ */ jsx23("div", { style: { width: "100%", maxWidth: "680px" }, children: /* @__PURE__ */ jsx23(
|
|
14169
14682
|
ChatInput,
|
|
14170
14683
|
{
|
|
14171
14684
|
value: input,
|
|
@@ -14193,7 +14706,7 @@ var ChatUIView = ({
|
|
|
14193
14706
|
inline: true
|
|
14194
14707
|
}
|
|
14195
14708
|
) }),
|
|
14196
|
-
suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */
|
|
14709
|
+
suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */ jsx23(
|
|
14197
14710
|
"div",
|
|
14198
14711
|
{
|
|
14199
14712
|
style: {
|
|
@@ -14203,7 +14716,7 @@ var ChatUIView = ({
|
|
|
14203
14716
|
justifyContent: "center",
|
|
14204
14717
|
maxWidth: "680px"
|
|
14205
14718
|
},
|
|
14206
|
-
children: suggestedPrompts.map((sp) => /* @__PURE__ */
|
|
14719
|
+
children: suggestedPrompts.map((sp) => /* @__PURE__ */ jsxs22(
|
|
14207
14720
|
"button",
|
|
14208
14721
|
{
|
|
14209
14722
|
onClick: () => setInput(sp.prompt),
|
|
@@ -14222,7 +14735,7 @@ var ChatUIView = ({
|
|
|
14222
14735
|
transition: "all 0.2s"
|
|
14223
14736
|
},
|
|
14224
14737
|
children: [
|
|
14225
|
-
sp.icon && /* @__PURE__ */
|
|
14738
|
+
sp.icon && /* @__PURE__ */ jsx23(IconSvg, { name: sp.icon, size: 16, color: "var(--chatllm-text-muted)" }),
|
|
14226
14739
|
sp.label
|
|
14227
14740
|
]
|
|
14228
14741
|
},
|
|
@@ -14233,8 +14746,8 @@ var ChatUIView = ({
|
|
|
14233
14746
|
]
|
|
14234
14747
|
}
|
|
14235
14748
|
),
|
|
14236
|
-
messages.length > 0 && /* @__PURE__ */
|
|
14237
|
-
/* @__PURE__ */
|
|
14749
|
+
messages.length > 0 && /* @__PURE__ */ jsxs22(Fragment9, { children: [
|
|
14750
|
+
/* @__PURE__ */ jsx23(
|
|
14238
14751
|
MessageList,
|
|
14239
14752
|
{
|
|
14240
14753
|
messages,
|
|
@@ -14264,7 +14777,7 @@ var ChatUIView = ({
|
|
|
14264
14777
|
onToggleChecklistPanel: () => setChecklistPanelDismissed(false)
|
|
14265
14778
|
}
|
|
14266
14779
|
),
|
|
14267
|
-
/* @__PURE__ */
|
|
14780
|
+
/* @__PURE__ */ jsx23(
|
|
14268
14781
|
ChatInput,
|
|
14269
14782
|
{
|
|
14270
14783
|
value: input,
|
|
@@ -14295,7 +14808,7 @@ var ChatUIView = ({
|
|
|
14295
14808
|
]
|
|
14296
14809
|
}
|
|
14297
14810
|
),
|
|
14298
|
-
/* @__PURE__ */
|
|
14811
|
+
/* @__PURE__ */ jsx23(
|
|
14299
14812
|
ChecklistPanel,
|
|
14300
14813
|
{
|
|
14301
14814
|
message: activeChecklistMessage,
|
|
@@ -14308,7 +14821,7 @@ var ChatUIView = ({
|
|
|
14308
14821
|
isMobileOverlay: isMobile
|
|
14309
14822
|
}
|
|
14310
14823
|
),
|
|
14311
|
-
showSettings && /* @__PURE__ */
|
|
14824
|
+
showSettings && /* @__PURE__ */ jsx23(
|
|
14312
14825
|
SettingsModal,
|
|
14313
14826
|
{
|
|
14314
14827
|
isOpen: settingsOpen,
|
|
@@ -14337,7 +14850,7 @@ var ChatUIView = ({
|
|
|
14337
14850
|
importMemoryPrompt
|
|
14338
14851
|
}
|
|
14339
14852
|
),
|
|
14340
|
-
/* @__PURE__ */
|
|
14853
|
+
/* @__PURE__ */ jsx23(
|
|
14341
14854
|
ProjectSettingsModal,
|
|
14342
14855
|
{
|
|
14343
14856
|
isOpen: projectSettingsOpen,
|
|
@@ -14349,7 +14862,7 @@ var ChatUIView = ({
|
|
|
14349
14862
|
onDeleteProject: deleteProject
|
|
14350
14863
|
}
|
|
14351
14864
|
),
|
|
14352
|
-
/* @__PURE__ */
|
|
14865
|
+
/* @__PURE__ */ jsx23(DisclaimerModal, { isOpen: disclaimerOpen, onClose: () => setDisclaimerOpen(false) })
|
|
14353
14866
|
]
|
|
14354
14867
|
}
|
|
14355
14868
|
);
|
|
@@ -14474,7 +14987,7 @@ var ChatUIWithHook = ({
|
|
|
14474
14987
|
onUploadImage
|
|
14475
14988
|
};
|
|
14476
14989
|
const state = useChatUI(hookOptions);
|
|
14477
|
-
return /* @__PURE__ */
|
|
14990
|
+
return /* @__PURE__ */ jsx23(
|
|
14478
14991
|
ChatUIView,
|
|
14479
14992
|
{
|
|
14480
14993
|
state,
|
|
@@ -14531,7 +15044,7 @@ var ChatUI = (props) => {
|
|
|
14531
15044
|
onImportMemory,
|
|
14532
15045
|
importMemoryPrompt
|
|
14533
15046
|
} = props;
|
|
14534
|
-
return /* @__PURE__ */
|
|
15047
|
+
return /* @__PURE__ */ jsx23(
|
|
14535
15048
|
ChatUIView,
|
|
14536
15049
|
{
|
|
14537
15050
|
state: props.chatState,
|
|
@@ -14561,17 +15074,17 @@ var ChatUI = (props) => {
|
|
|
14561
15074
|
}
|
|
14562
15075
|
);
|
|
14563
15076
|
}
|
|
14564
|
-
return /* @__PURE__ */
|
|
15077
|
+
return /* @__PURE__ */ jsx23(ChatUIWithHook, { ...props });
|
|
14565
15078
|
};
|
|
14566
15079
|
|
|
14567
15080
|
// src/react/ChatFloatingWidget.tsx
|
|
14568
|
-
import { useState as
|
|
15081
|
+
import { useState as useState28, useRef as useRef17, useEffect as useEffect19, useMemo as useMemo7, useCallback as useCallback15 } from "react";
|
|
14569
15082
|
|
|
14570
15083
|
// src/react/hooks/useFloatingWidget.ts
|
|
14571
|
-
import { useState as
|
|
15084
|
+
import { useState as useState22, useCallback as useCallback12, useEffect as useEffect14, useRef as useRef12 } from "react";
|
|
14572
15085
|
|
|
14573
15086
|
// src/react/hooks/useDragResize.ts
|
|
14574
|
-
import { useState as
|
|
15087
|
+
import { useState as useState21, useRef as useRef11, useCallback as useCallback11, useEffect as useEffect13, useMemo as useMemo6 } from "react";
|
|
14575
15088
|
var DRAG_THRESHOLD = 5;
|
|
14576
15089
|
var FAB_SIZE = 56;
|
|
14577
15090
|
var EDGE_MARGIN = 24;
|
|
@@ -14639,8 +15152,8 @@ var useDragResize = (options) => {
|
|
|
14639
15152
|
maxWidth = DEFAULT_MAX_WIDTH,
|
|
14640
15153
|
minHeight = DEFAULT_MIN_HEIGHT
|
|
14641
15154
|
} = options;
|
|
14642
|
-
const [isMobile, setIsMobile] =
|
|
14643
|
-
|
|
15155
|
+
const [isMobile, setIsMobile] = useState21(false);
|
|
15156
|
+
useEffect13(() => {
|
|
14644
15157
|
if (typeof window === "undefined") return;
|
|
14645
15158
|
const mql = window.matchMedia("(max-width: 767px)");
|
|
14646
15159
|
setIsMobile(mql.matches);
|
|
@@ -14655,19 +15168,19 @@ var useDragResize = (options) => {
|
|
|
14655
15168
|
panelWidth: initialWidth,
|
|
14656
15169
|
panelHeight: initialHeight
|
|
14657
15170
|
});
|
|
14658
|
-
const [fabPos, setFabPos] =
|
|
14659
|
-
const [panelSize, setPanelSize] =
|
|
14660
|
-
const [isDragging, setIsDragging] =
|
|
14661
|
-
const [isResizing, setIsResizing] =
|
|
14662
|
-
const [isDizzy, setIsDizzy] =
|
|
14663
|
-
const [viewport, setViewport] =
|
|
15171
|
+
const [fabPos, setFabPos] = useState21({ x: persisted.fabX, y: persisted.fabY });
|
|
15172
|
+
const [panelSize, setPanelSize] = useState21({ width: persisted.panelWidth, height: persisted.panelHeight });
|
|
15173
|
+
const [isDragging, setIsDragging] = useState21(false);
|
|
15174
|
+
const [isResizing, setIsResizing] = useState21(false);
|
|
15175
|
+
const [isDizzy, setIsDizzy] = useState21(false);
|
|
15176
|
+
const [viewport, setViewport] = useState21(() => ({
|
|
14664
15177
|
width: typeof window !== "undefined" ? window.innerWidth : 1024,
|
|
14665
15178
|
height: typeof window !== "undefined" ? window.innerHeight : 768
|
|
14666
15179
|
}));
|
|
14667
15180
|
const vw = viewport.width;
|
|
14668
15181
|
const vh = viewport.height;
|
|
14669
|
-
const initializedRef =
|
|
14670
|
-
|
|
15182
|
+
const initializedRef = useRef11(false);
|
|
15183
|
+
useEffect13(() => {
|
|
14671
15184
|
if (initializedRef.current || typeof window === "undefined") return;
|
|
14672
15185
|
initializedRef.current = true;
|
|
14673
15186
|
const correctFab = getInitialFabPosition(initialPosition);
|
|
@@ -14680,39 +15193,39 @@ var useDragResize = (options) => {
|
|
|
14680
15193
|
setFabPos({ x: loaded.fabX, y: loaded.fabY });
|
|
14681
15194
|
setPanelSize({ width: loaded.panelWidth, height: loaded.panelHeight });
|
|
14682
15195
|
}, [initialPosition, storageKey, initialWidth, initialHeight]);
|
|
14683
|
-
const dragStartRef =
|
|
14684
|
-
const isDraggingRef =
|
|
14685
|
-
const wasDragRef =
|
|
14686
|
-
const dragDeltaRef =
|
|
14687
|
-
const fabElRef =
|
|
14688
|
-
const dragCleanupRef =
|
|
14689
|
-
const snapTimerRef =
|
|
14690
|
-
const prevDragRef =
|
|
14691
|
-
const shakeScoreRef =
|
|
14692
|
-
const prevVelocityRef =
|
|
14693
|
-
const isDizzyRef =
|
|
14694
|
-
const dizzyTimerRef =
|
|
14695
|
-
const lastVelocityRef =
|
|
14696
|
-
const dragRafRef =
|
|
14697
|
-
const animCleanupRef =
|
|
14698
|
-
const snapEnabledRef =
|
|
14699
|
-
const storageKeyRef =
|
|
14700
|
-
const panelSizeRef =
|
|
14701
|
-
const fabPosRef =
|
|
14702
|
-
|
|
15196
|
+
const dragStartRef = useRef11(null);
|
|
15197
|
+
const isDraggingRef = useRef11(false);
|
|
15198
|
+
const wasDragRef = useRef11(false);
|
|
15199
|
+
const dragDeltaRef = useRef11({ dx: 0, dy: 0 });
|
|
15200
|
+
const fabElRef = useRef11(null);
|
|
15201
|
+
const dragCleanupRef = useRef11(null);
|
|
15202
|
+
const snapTimerRef = useRef11(null);
|
|
15203
|
+
const prevDragRef = useRef11(null);
|
|
15204
|
+
const shakeScoreRef = useRef11(0);
|
|
15205
|
+
const prevVelocityRef = useRef11(null);
|
|
15206
|
+
const isDizzyRef = useRef11(false);
|
|
15207
|
+
const dizzyTimerRef = useRef11(null);
|
|
15208
|
+
const lastVelocityRef = useRef11({ vx: 0, vy: 0, speed: 0 });
|
|
15209
|
+
const dragRafRef = useRef11(null);
|
|
15210
|
+
const animCleanupRef = useRef11(null);
|
|
15211
|
+
const snapEnabledRef = useRef11(snapEnabled);
|
|
15212
|
+
const storageKeyRef = useRef11(storageKey);
|
|
15213
|
+
const panelSizeRef = useRef11(panelSize);
|
|
15214
|
+
const fabPosRef = useRef11(fabPos);
|
|
15215
|
+
useEffect13(() => {
|
|
14703
15216
|
snapEnabledRef.current = snapEnabled;
|
|
14704
15217
|
}, [snapEnabled]);
|
|
14705
|
-
|
|
15218
|
+
useEffect13(() => {
|
|
14706
15219
|
storageKeyRef.current = storageKey;
|
|
14707
15220
|
}, [storageKey]);
|
|
14708
|
-
|
|
15221
|
+
useEffect13(() => {
|
|
14709
15222
|
panelSizeRef.current = panelSize;
|
|
14710
15223
|
}, [panelSize]);
|
|
14711
|
-
|
|
15224
|
+
useEffect13(() => {
|
|
14712
15225
|
fabPosRef.current = fabPos;
|
|
14713
15226
|
}, [fabPos]);
|
|
14714
|
-
const resizeStartRef =
|
|
14715
|
-
|
|
15227
|
+
const resizeStartRef = useRef11(null);
|
|
15228
|
+
useEffect13(() => {
|
|
14716
15229
|
return () => {
|
|
14717
15230
|
dragCleanupRef.current?.();
|
|
14718
15231
|
if (snapTimerRef.current) clearTimeout(snapTimerRef.current);
|
|
@@ -14720,7 +15233,7 @@ var useDragResize = (options) => {
|
|
|
14720
15233
|
if (dragRafRef.current) cancelAnimationFrame(dragRafRef.current);
|
|
14721
15234
|
};
|
|
14722
15235
|
}, []);
|
|
14723
|
-
const handleFabPointerDown =
|
|
15236
|
+
const handleFabPointerDown = useCallback11((e) => {
|
|
14724
15237
|
if (disabled || isMobile) return;
|
|
14725
15238
|
dragCleanupRef.current?.();
|
|
14726
15239
|
const el = e.currentTarget;
|
|
@@ -14933,7 +15446,7 @@ var useDragResize = (options) => {
|
|
|
14933
15446
|
borderRadius: "var(--floating-panel-radius, 16px)"
|
|
14934
15447
|
};
|
|
14935
15448
|
}, [isMobile, disabled, fabPos.x, fabPos.y, panelSize.width, panelSize.height, vw, vh, panelDirection, minHeight]);
|
|
14936
|
-
const handleResizePointerDown =
|
|
15449
|
+
const handleResizePointerDown = useCallback11((edge, e) => {
|
|
14937
15450
|
if (disabled || isMobile) return;
|
|
14938
15451
|
e.preventDefault();
|
|
14939
15452
|
e.stopPropagation();
|
|
@@ -14949,7 +15462,7 @@ var useDragResize = (options) => {
|
|
|
14949
15462
|
};
|
|
14950
15463
|
setIsResizing(true);
|
|
14951
15464
|
}, [disabled, isMobile]);
|
|
14952
|
-
const handleResizePointerMove =
|
|
15465
|
+
const handleResizePointerMove = useCallback11((e) => {
|
|
14953
15466
|
if (!resizeStartRef.current) return;
|
|
14954
15467
|
const { startX, startY, width, height, edge, fabY } = resizeStartRef.current;
|
|
14955
15468
|
const dx = e.clientX - startX;
|
|
@@ -14973,7 +15486,7 @@ var useDragResize = (options) => {
|
|
|
14973
15486
|
newHeight = Math.max(minHeight, Math.min(maxH, newHeight));
|
|
14974
15487
|
setPanelSize({ width: newWidth, height: newHeight });
|
|
14975
15488
|
}, [minWidth, maxWidth, minHeight]);
|
|
14976
|
-
const handleResizePointerUp =
|
|
15489
|
+
const handleResizePointerUp = useCallback11((e) => {
|
|
14977
15490
|
if (!resizeStartRef.current) return;
|
|
14978
15491
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
14979
15492
|
resizeStartRef.current = null;
|
|
@@ -14982,7 +15495,7 @@ var useDragResize = (options) => {
|
|
|
14982
15495
|
const fp = fabPosRef.current;
|
|
14983
15496
|
persistState(storageKeyRef.current, { fabX: fp.x, fabY: fp.y, panelWidth: ps.width, panelHeight: ps.height });
|
|
14984
15497
|
}, []);
|
|
14985
|
-
|
|
15498
|
+
useEffect13(() => {
|
|
14986
15499
|
if (typeof window === "undefined") return;
|
|
14987
15500
|
const handleResize = () => {
|
|
14988
15501
|
const newVw = window.innerWidth;
|
|
@@ -15040,9 +15553,9 @@ var useFloatingWidget = (options) => {
|
|
|
15040
15553
|
maxWidth,
|
|
15041
15554
|
minHeight
|
|
15042
15555
|
} = options || {};
|
|
15043
|
-
const [isOpen, setIsOpen] =
|
|
15044
|
-
const [activeTab, setActiveTab] =
|
|
15045
|
-
const panelRef =
|
|
15556
|
+
const [isOpen, setIsOpen] = useState22(defaultOpen);
|
|
15557
|
+
const [activeTab, setActiveTab] = useState22(defaultTab);
|
|
15558
|
+
const panelRef = useRef12(null);
|
|
15046
15559
|
const dragResize = useDragResize({
|
|
15047
15560
|
initialPosition: position,
|
|
15048
15561
|
initialWidth: width,
|
|
@@ -15054,27 +15567,27 @@ var useFloatingWidget = (options) => {
|
|
|
15054
15567
|
maxWidth,
|
|
15055
15568
|
minHeight
|
|
15056
15569
|
});
|
|
15057
|
-
const onOpenRef =
|
|
15058
|
-
const onCloseRef =
|
|
15059
|
-
const onTabChangeRef =
|
|
15060
|
-
|
|
15570
|
+
const onOpenRef = useRef12(onOpen);
|
|
15571
|
+
const onCloseRef = useRef12(onClose);
|
|
15572
|
+
const onTabChangeRef = useRef12(onTabChange);
|
|
15573
|
+
useEffect14(() => {
|
|
15061
15574
|
onOpenRef.current = onOpen;
|
|
15062
15575
|
}, [onOpen]);
|
|
15063
|
-
|
|
15576
|
+
useEffect14(() => {
|
|
15064
15577
|
onCloseRef.current = onClose;
|
|
15065
15578
|
}, [onClose]);
|
|
15066
|
-
|
|
15579
|
+
useEffect14(() => {
|
|
15067
15580
|
onTabChangeRef.current = onTabChange;
|
|
15068
15581
|
}, [onTabChange]);
|
|
15069
|
-
const open =
|
|
15582
|
+
const open = useCallback12(() => {
|
|
15070
15583
|
setIsOpen(true);
|
|
15071
15584
|
onOpenRef.current?.();
|
|
15072
15585
|
}, []);
|
|
15073
|
-
const close =
|
|
15586
|
+
const close = useCallback12(() => {
|
|
15074
15587
|
setIsOpen(false);
|
|
15075
15588
|
onCloseRef.current?.();
|
|
15076
15589
|
}, []);
|
|
15077
|
-
const toggle =
|
|
15590
|
+
const toggle = useCallback12(() => {
|
|
15078
15591
|
setIsOpen((prev) => {
|
|
15079
15592
|
const next = !prev;
|
|
15080
15593
|
if (next) onOpenRef.current?.();
|
|
@@ -15082,15 +15595,15 @@ var useFloatingWidget = (options) => {
|
|
|
15082
15595
|
return next;
|
|
15083
15596
|
});
|
|
15084
15597
|
}, []);
|
|
15085
|
-
const setTab =
|
|
15598
|
+
const setTab = useCallback12((tabKey) => {
|
|
15086
15599
|
setActiveTab(tabKey);
|
|
15087
15600
|
onTabChangeRef.current?.(tabKey);
|
|
15088
15601
|
}, []);
|
|
15089
|
-
const handleFabInteraction =
|
|
15602
|
+
const handleFabInteraction = useCallback12(() => {
|
|
15090
15603
|
if (dragResize.isDragging) return;
|
|
15091
15604
|
toggle();
|
|
15092
15605
|
}, [dragResize.isDragging, toggle]);
|
|
15093
|
-
|
|
15606
|
+
useEffect14(() => {
|
|
15094
15607
|
if (!isOpen) return;
|
|
15095
15608
|
const handleKeyDown = (e) => {
|
|
15096
15609
|
if (e.key === "Escape") {
|
|
@@ -15100,7 +15613,7 @@ var useFloatingWidget = (options) => {
|
|
|
15100
15613
|
document.addEventListener("keydown", handleKeyDown);
|
|
15101
15614
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
15102
15615
|
}, [isOpen, close]);
|
|
15103
|
-
|
|
15616
|
+
useEffect14(() => {
|
|
15104
15617
|
if (!isOpen) return;
|
|
15105
15618
|
const handleClickOutside = (e) => {
|
|
15106
15619
|
if (dragResize.isDragging || dragResize.isResizing) return;
|
|
@@ -15116,11 +15629,11 @@ var useFloatingWidget = (options) => {
|
|
|
15116
15629
|
};
|
|
15117
15630
|
|
|
15118
15631
|
// src/react/components/floating/FloatingFab.tsx
|
|
15119
|
-
import { useRef as
|
|
15632
|
+
import { useRef as useRef14, useState as useState24, useEffect as useEffect16 } from "react";
|
|
15120
15633
|
|
|
15121
15634
|
// src/react/components/floating/DevDiveCharacter.tsx
|
|
15122
|
-
import { useState as
|
|
15123
|
-
import { Fragment as Fragment10, jsx as
|
|
15635
|
+
import { useState as useState23, useEffect as useEffect15, useRef as useRef13, useCallback as useCallback13 } from "react";
|
|
15636
|
+
import { Fragment as Fragment10, jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
15124
15637
|
var THEMES = {
|
|
15125
15638
|
dark: { body: "#2ecc71", stroke: "#27ae60", highlight: "#3ddc84", face: "#1a1a2e", eyeLight: "#fff" },
|
|
15126
15639
|
light: { body: "#1a1a2e", stroke: "#12122a", highlight: "#2a2a3e", face: "#2ecc71", eyeLight: "#fff" }
|
|
@@ -15140,32 +15653,32 @@ var DevDiveFabCharacter = ({
|
|
|
15140
15653
|
isComplete = false
|
|
15141
15654
|
}) => {
|
|
15142
15655
|
const c = THEMES[theme];
|
|
15143
|
-
const [eyeOffset, setEyeOffset] =
|
|
15144
|
-
const [isBlinking, setIsBlinking] =
|
|
15145
|
-
const [isHappy, setIsHappy] =
|
|
15146
|
-
const [isPressed, setIsPressed] =
|
|
15147
|
-
const [mouthOpen, setMouthOpen] =
|
|
15148
|
-
const [isSleepy, setIsSleepy] =
|
|
15149
|
-
const [isSurprised, setIsSurprised] =
|
|
15150
|
-
const [isWinking, setIsWinking] =
|
|
15151
|
-
const [isCatMouth, setIsCatMouth] =
|
|
15152
|
-
const [isEntering, setIsEntering] =
|
|
15153
|
-
const svgRef =
|
|
15154
|
-
const cleanupRef =
|
|
15155
|
-
const lastActivityRef =
|
|
15156
|
-
const isSleepyRef =
|
|
15157
|
-
const markActivity =
|
|
15656
|
+
const [eyeOffset, setEyeOffset] = useState23({ x: 0, y: 0 });
|
|
15657
|
+
const [isBlinking, setIsBlinking] = useState23(false);
|
|
15658
|
+
const [isHappy, setIsHappy] = useState23(false);
|
|
15659
|
+
const [isPressed, setIsPressed] = useState23(false);
|
|
15660
|
+
const [mouthOpen, setMouthOpen] = useState23(false);
|
|
15661
|
+
const [isSleepy, setIsSleepy] = useState23(false);
|
|
15662
|
+
const [isSurprised, setIsSurprised] = useState23(false);
|
|
15663
|
+
const [isWinking, setIsWinking] = useState23(false);
|
|
15664
|
+
const [isCatMouth, setIsCatMouth] = useState23(false);
|
|
15665
|
+
const [isEntering, setIsEntering] = useState23(true);
|
|
15666
|
+
const svgRef = useRef13(null);
|
|
15667
|
+
const cleanupRef = useRef13(null);
|
|
15668
|
+
const lastActivityRef = useRef13(Date.now());
|
|
15669
|
+
const isSleepyRef = useRef13(false);
|
|
15670
|
+
const markActivity = useCallback13(() => {
|
|
15158
15671
|
lastActivityRef.current = Date.now();
|
|
15159
15672
|
if (isSleepyRef.current) {
|
|
15160
15673
|
isSleepyRef.current = false;
|
|
15161
15674
|
setIsSleepy(false);
|
|
15162
15675
|
}
|
|
15163
15676
|
}, []);
|
|
15164
|
-
|
|
15677
|
+
useEffect15(() => {
|
|
15165
15678
|
const t = setTimeout(() => setIsEntering(false), 600);
|
|
15166
15679
|
return () => clearTimeout(t);
|
|
15167
15680
|
}, []);
|
|
15168
|
-
|
|
15681
|
+
useEffect15(() => {
|
|
15169
15682
|
let timer;
|
|
15170
15683
|
let blinkTimer;
|
|
15171
15684
|
const scheduleBlink = () => {
|
|
@@ -15181,7 +15694,7 @@ var DevDiveFabCharacter = ({
|
|
|
15181
15694
|
clearTimeout(blinkTimer);
|
|
15182
15695
|
};
|
|
15183
15696
|
}, []);
|
|
15184
|
-
|
|
15697
|
+
useEffect15(() => {
|
|
15185
15698
|
if (!isTalking) {
|
|
15186
15699
|
setMouthOpen(false);
|
|
15187
15700
|
return;
|
|
@@ -15194,7 +15707,7 @@ var DevDiveFabCharacter = ({
|
|
|
15194
15707
|
toggle();
|
|
15195
15708
|
return () => clearTimeout(timer);
|
|
15196
15709
|
}, [isTalking]);
|
|
15197
|
-
|
|
15710
|
+
useEffect15(() => {
|
|
15198
15711
|
if (typeof window === "undefined") return;
|
|
15199
15712
|
let rafId = 0;
|
|
15200
15713
|
const onMouseMove = (e) => {
|
|
@@ -15218,7 +15731,7 @@ var DevDiveFabCharacter = ({
|
|
|
15218
15731
|
cancelAnimationFrame(rafId);
|
|
15219
15732
|
};
|
|
15220
15733
|
}, []);
|
|
15221
|
-
|
|
15734
|
+
useEffect15(() => {
|
|
15222
15735
|
let upTimer;
|
|
15223
15736
|
let surpriseTimer;
|
|
15224
15737
|
const rafId = requestAnimationFrame(() => {
|
|
@@ -15261,10 +15774,10 @@ var DevDiveFabCharacter = ({
|
|
|
15261
15774
|
cleanupRef.current?.();
|
|
15262
15775
|
};
|
|
15263
15776
|
}, [markActivity]);
|
|
15264
|
-
|
|
15777
|
+
useEffect15(() => {
|
|
15265
15778
|
markActivity();
|
|
15266
15779
|
}, [isOpen, isTalking, markActivity]);
|
|
15267
|
-
|
|
15780
|
+
useEffect15(() => {
|
|
15268
15781
|
if (isOpen || isTalking || isDizzy) return;
|
|
15269
15782
|
const check = setInterval(() => {
|
|
15270
15783
|
if (Date.now() - lastActivityRef.current > IDLE_TIMEOUT_MS && !isSleepyRef.current) {
|
|
@@ -15274,8 +15787,8 @@ var DevDiveFabCharacter = ({
|
|
|
15274
15787
|
}, 5e3);
|
|
15275
15788
|
return () => clearInterval(check);
|
|
15276
15789
|
}, [isOpen, isTalking, isDizzy]);
|
|
15277
|
-
const prevCompleteRef =
|
|
15278
|
-
|
|
15790
|
+
const prevCompleteRef = useRef13(false);
|
|
15791
|
+
useEffect15(() => {
|
|
15279
15792
|
const wasComplete = prevCompleteRef.current;
|
|
15280
15793
|
prevCompleteRef.current = isComplete;
|
|
15281
15794
|
if (wasComplete || !isComplete) return;
|
|
@@ -15283,7 +15796,7 @@ var DevDiveFabCharacter = ({
|
|
|
15283
15796
|
const t = setTimeout(() => setIsWinking(false), WINK_DURATION_MS);
|
|
15284
15797
|
return () => clearTimeout(t);
|
|
15285
15798
|
}, [isComplete]);
|
|
15286
|
-
|
|
15799
|
+
useEffect15(() => {
|
|
15287
15800
|
if (isOpen || isTalking || isDizzy || isError || isSleepy) {
|
|
15288
15801
|
setIsCatMouth(false);
|
|
15289
15802
|
return;
|
|
@@ -15308,62 +15821,62 @@ var DevDiveFabCharacter = ({
|
|
|
15308
15821
|
clearTimeout(hideT);
|
|
15309
15822
|
};
|
|
15310
15823
|
}, [isOpen, isTalking, isDizzy, isError, isSleepy]);
|
|
15311
|
-
const renderNormalEyes = (r) => /* @__PURE__ */
|
|
15312
|
-
/* @__PURE__ */
|
|
15313
|
-
/* @__PURE__ */
|
|
15314
|
-
/* @__PURE__ */
|
|
15315
|
-
/* @__PURE__ */
|
|
15824
|
+
const renderNormalEyes = (r) => /* @__PURE__ */ jsxs23(Fragment10, { children: [
|
|
15825
|
+
/* @__PURE__ */ jsx24("circle", { cx: "87", cy: "106", r, fill: c.face, style: { transition: "fill 0.4s ease" } }),
|
|
15826
|
+
/* @__PURE__ */ jsx24("circle", { cx: "133", cy: "106", r, fill: c.face, style: { transition: "fill 0.4s ease" } }),
|
|
15827
|
+
/* @__PURE__ */ jsx24("circle", { cx: "90", cy: "102", r: "2.5", fill: c.eyeLight, opacity: "0.9" }),
|
|
15828
|
+
/* @__PURE__ */ jsx24("circle", { cx: "136", cy: "102", r: "2.5", fill: c.eyeLight, opacity: "0.9" })
|
|
15316
15829
|
] });
|
|
15317
15830
|
const renderEyes = () => {
|
|
15318
|
-
if (isDizzy) return /* @__PURE__ */
|
|
15319
|
-
/* @__PURE__ */
|
|
15320
|
-
/* @__PURE__ */
|
|
15321
|
-
/* @__PURE__ */
|
|
15831
|
+
if (isDizzy) return /* @__PURE__ */ jsxs23(Fragment10, { children: [
|
|
15832
|
+
/* @__PURE__ */ jsxs23("g", { children: [
|
|
15833
|
+
/* @__PURE__ */ jsx24("line", { x1: "81", y1: "100", x2: "93", y2: "112", stroke: c.face, strokeWidth: "3", strokeLinecap: "round" }),
|
|
15834
|
+
/* @__PURE__ */ jsx24("line", { x1: "93", y1: "100", x2: "81", y2: "112", stroke: c.face, strokeWidth: "3", strokeLinecap: "round" })
|
|
15322
15835
|
] }),
|
|
15323
|
-
/* @__PURE__ */
|
|
15324
|
-
/* @__PURE__ */
|
|
15325
|
-
/* @__PURE__ */
|
|
15836
|
+
/* @__PURE__ */ jsxs23("g", { children: [
|
|
15837
|
+
/* @__PURE__ */ jsx24("line", { x1: "127", y1: "100", x2: "139", y2: "112", stroke: c.face, strokeWidth: "3", strokeLinecap: "round" }),
|
|
15838
|
+
/* @__PURE__ */ jsx24("line", { x1: "139", y1: "100", x2: "127", y2: "112", stroke: c.face, strokeWidth: "3", strokeLinecap: "round" })
|
|
15326
15839
|
] })
|
|
15327
15840
|
] });
|
|
15328
|
-
if (isSleepy) return /* @__PURE__ */
|
|
15329
|
-
/* @__PURE__ */
|
|
15330
|
-
/* @__PURE__ */
|
|
15841
|
+
if (isSleepy) return /* @__PURE__ */ jsxs23(Fragment10, { children: [
|
|
15842
|
+
/* @__PURE__ */ jsx24("path", { d: "M80 108 Q87 102 94 108", fill: "none", stroke: c.face, strokeWidth: "3.5", strokeLinecap: "round" }),
|
|
15843
|
+
/* @__PURE__ */ jsx24("path", { d: "M126 108 Q133 102 140 108", fill: "none", stroke: c.face, strokeWidth: "3.5", strokeLinecap: "round" })
|
|
15331
15844
|
] });
|
|
15332
|
-
if (isSurprised) return /* @__PURE__ */
|
|
15333
|
-
/* @__PURE__ */
|
|
15334
|
-
/* @__PURE__ */
|
|
15335
|
-
/* @__PURE__ */
|
|
15336
|
-
/* @__PURE__ */
|
|
15845
|
+
if (isSurprised) return /* @__PURE__ */ jsxs23(Fragment10, { children: [
|
|
15846
|
+
/* @__PURE__ */ jsx24("circle", { cx: "87", cy: "106", r: "12", fill: c.face }),
|
|
15847
|
+
/* @__PURE__ */ jsx24("circle", { cx: "133", cy: "106", r: "12", fill: c.face }),
|
|
15848
|
+
/* @__PURE__ */ jsx24("circle", { cx: "91", cy: "100", r: "3.5", fill: c.eyeLight }),
|
|
15849
|
+
/* @__PURE__ */ jsx24("circle", { cx: "137", cy: "100", r: "3.5", fill: c.eyeLight })
|
|
15337
15850
|
] });
|
|
15338
|
-
if (isWinking) return /* @__PURE__ */
|
|
15339
|
-
/* @__PURE__ */
|
|
15340
|
-
/* @__PURE__ */
|
|
15341
|
-
/* @__PURE__ */
|
|
15851
|
+
if (isWinking) return /* @__PURE__ */ jsxs23(Fragment10, { children: [
|
|
15852
|
+
/* @__PURE__ */ jsx24("circle", { cx: "87", cy: "106", r: "8", fill: c.face }),
|
|
15853
|
+
/* @__PURE__ */ jsx24("circle", { cx: "90", cy: "102", r: "2.5", fill: c.eyeLight, opacity: "0.9" }),
|
|
15854
|
+
/* @__PURE__ */ jsx24("line", { x1: "126", y1: "108", x2: "140", y2: "108", stroke: c.face, strokeWidth: "3.5", strokeLinecap: "round" })
|
|
15342
15855
|
] });
|
|
15343
|
-
if (isError) return /* @__PURE__ */
|
|
15856
|
+
if (isError) return /* @__PURE__ */ jsxs23(Fragment10, { children: [
|
|
15344
15857
|
renderNormalEyes(8),
|
|
15345
|
-
/* @__PURE__ */
|
|
15346
|
-
/* @__PURE__ */
|
|
15858
|
+
/* @__PURE__ */ jsx24("line", { x1: "79", y1: "90", x2: "95", y2: "95", stroke: c.face, strokeWidth: "2.5", strokeLinecap: "round" }),
|
|
15859
|
+
/* @__PURE__ */ jsx24("line", { x1: "141", y1: "90", x2: "125", y2: "95", stroke: c.face, strokeWidth: "2.5", strokeLinecap: "round" })
|
|
15347
15860
|
] });
|
|
15348
|
-
if (isBlinking) return /* @__PURE__ */
|
|
15349
|
-
/* @__PURE__ */
|
|
15350
|
-
/* @__PURE__ */
|
|
15861
|
+
if (isBlinking) return /* @__PURE__ */ jsxs23(Fragment10, { children: [
|
|
15862
|
+
/* @__PURE__ */ jsx24("line", { x1: "80", y1: "108", x2: "94", y2: "108", stroke: c.face, strokeWidth: "3.5", strokeLinecap: "round" }),
|
|
15863
|
+
/* @__PURE__ */ jsx24("line", { x1: "126", y1: "108", x2: "140", y2: "108", stroke: c.face, strokeWidth: "3.5", strokeLinecap: "round" })
|
|
15351
15864
|
] });
|
|
15352
15865
|
return renderNormalEyes(isHappy ? 10 : 8);
|
|
15353
15866
|
};
|
|
15354
15867
|
const renderMouth = () => {
|
|
15355
|
-
if (isDizzy) return /* @__PURE__ */
|
|
15356
|
-
if (isSurprised) return /* @__PURE__ */
|
|
15357
|
-
if (isSleepy) return /* @__PURE__ */
|
|
15358
|
-
if (isError) return /* @__PURE__ */
|
|
15359
|
-
if (mouthOpen) return /* @__PURE__ */
|
|
15360
|
-
if (isCatMouth) return /* @__PURE__ */
|
|
15361
|
-
if (isPressed) return /* @__PURE__ */
|
|
15362
|
-
if (isHappy) return /* @__PURE__ */
|
|
15363
|
-
return /* @__PURE__ */
|
|
15868
|
+
if (isDizzy) return /* @__PURE__ */ jsx24("path", { d: "M98 130 Q102 125 106 130 Q110 135 114 130 Q118 125 122 130", fill: "none", stroke: c.face, strokeWidth: "3", strokeLinecap: "round" });
|
|
15869
|
+
if (isSurprised) return /* @__PURE__ */ jsx24("circle", { cx: "110", cy: "133", r: "7", fill: c.face });
|
|
15870
|
+
if (isSleepy) return /* @__PURE__ */ jsx24("ellipse", { cx: "110", cy: "131", rx: "4", ry: "3", fill: c.face });
|
|
15871
|
+
if (isError) return /* @__PURE__ */ jsx24("path", { d: "M103 130 Q110 135 117 130", fill: "none", stroke: c.face, strokeWidth: "2.5", strokeLinecap: "round" });
|
|
15872
|
+
if (mouthOpen) return /* @__PURE__ */ jsx24("ellipse", { cx: "110", cy: "131", rx: "6", ry: "5", fill: c.face });
|
|
15873
|
+
if (isCatMouth) return /* @__PURE__ */ jsx24("path", { d: "M100 130 Q105 137 110 128 Q115 137 120 130", fill: "none", stroke: c.face, strokeWidth: "3", strokeLinecap: "round" });
|
|
15874
|
+
if (isPressed) return /* @__PURE__ */ jsx24("ellipse", { cx: "110", cy: "132", rx: "6", ry: "6", fill: c.face, style: { transition: "fill 0.4s ease" } });
|
|
15875
|
+
if (isHappy) return /* @__PURE__ */ jsx24("path", { d: "M101 128 Q110 138 119 128", fill: "none", stroke: c.face, strokeWidth: "4", strokeLinecap: "round", style: { transition: "stroke 0.4s ease" } });
|
|
15876
|
+
return /* @__PURE__ */ jsx24("path", { d: "M103 128 Q110 134 117 128", fill: "none", stroke: c.face, strokeWidth: "3.5", strokeLinecap: "round", style: { transition: "stroke 0.4s ease" } });
|
|
15364
15877
|
};
|
|
15365
15878
|
const shouldFloat = !isEntering && !isOpen && !isSurprised && !isDizzy;
|
|
15366
|
-
return /* @__PURE__ */
|
|
15879
|
+
return /* @__PURE__ */ jsxs23(
|
|
15367
15880
|
"svg",
|
|
15368
15881
|
{
|
|
15369
15882
|
ref: svgRef,
|
|
@@ -15373,7 +15886,7 @@ var DevDiveFabCharacter = ({
|
|
|
15373
15886
|
className: `${isEntering ? "chatllm-character-entrance" : ""} ${shouldFloat ? "chatllm-character-float" : ""}`,
|
|
15374
15887
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
15375
15888
|
children: [
|
|
15376
|
-
/* @__PURE__ */
|
|
15889
|
+
/* @__PURE__ */ jsx24(
|
|
15377
15890
|
"path",
|
|
15378
15891
|
{
|
|
15379
15892
|
d: BODY_PATH,
|
|
@@ -15385,21 +15898,21 @@ var DevDiveFabCharacter = ({
|
|
|
15385
15898
|
),
|
|
15386
15899
|
isOpen && isHappy ? (
|
|
15387
15900
|
/* @Todo vibecode - 열림+호버 시에만 X 표시 (평소엔 얼굴 유지) */
|
|
15388
|
-
/* @__PURE__ */
|
|
15389
|
-
/* @__PURE__ */
|
|
15390
|
-
/* @__PURE__ */
|
|
15901
|
+
/* @__PURE__ */ jsxs23("g", { style: { transition: "transform 0.3s ease", transform: "rotate(90deg)", transformOrigin: "110px 115px" }, children: [
|
|
15902
|
+
/* @__PURE__ */ jsx24("line", { x1: "95", y1: "100", x2: "125", y2: "130", stroke: c.face, strokeWidth: "5", strokeLinecap: "round" }),
|
|
15903
|
+
/* @__PURE__ */ jsx24("line", { x1: "125", y1: "100", x2: "95", y2: "130", stroke: c.face, strokeWidth: "5", strokeLinecap: "round" })
|
|
15391
15904
|
] })
|
|
15392
15905
|
) : (
|
|
15393
15906
|
/* 눈 + 입 — 마우스 추적 (isDizzy/isSleepy 시 추적 비활성) */
|
|
15394
|
-
/* @__PURE__ */
|
|
15907
|
+
/* @__PURE__ */ jsxs23("g", { transform: isDizzy || isSleepy ? "" : `translate(${eyeOffset.x}, ${eyeOffset.y})`, children: [
|
|
15395
15908
|
renderEyes(),
|
|
15396
15909
|
renderMouth(),
|
|
15397
|
-
isSleepy && /* @__PURE__ */
|
|
15398
|
-
/* @__PURE__ */
|
|
15399
|
-
/* @__PURE__ */
|
|
15400
|
-
/* @__PURE__ */
|
|
15910
|
+
isSleepy && /* @__PURE__ */ jsxs23("g", { children: [
|
|
15911
|
+
/* @__PURE__ */ jsx24("text", { x: "152", y: "88", fontSize: "14", fill: c.face, opacity: "0.7", className: "chatllm-zzz chatllm-zzz-1", fontFamily: "sans-serif", fontWeight: "bold", children: "z" }),
|
|
15912
|
+
/* @__PURE__ */ jsx24("text", { x: "160", y: "76", fontSize: "11", fill: c.face, opacity: "0.5", className: "chatllm-zzz chatllm-zzz-2", fontFamily: "sans-serif", fontWeight: "bold", children: "z" }),
|
|
15913
|
+
/* @__PURE__ */ jsx24("text", { x: "166", y: "66", fontSize: "9", fill: c.face, opacity: "0.3", className: "chatllm-zzz chatllm-zzz-3", fontFamily: "sans-serif", fontWeight: "bold", children: "z" })
|
|
15401
15914
|
] }),
|
|
15402
|
-
isError && /* @__PURE__ */
|
|
15915
|
+
isError && /* @__PURE__ */ jsx24(
|
|
15403
15916
|
"path",
|
|
15404
15917
|
{
|
|
15405
15918
|
d: "M158 80 Q161 88 158 94 Q155 88 158 80Z",
|
|
@@ -15415,7 +15928,7 @@ var DevDiveFabCharacter = ({
|
|
|
15415
15928
|
};
|
|
15416
15929
|
var DevDiveAvatar = ({ size = 32, theme = "light" }) => {
|
|
15417
15930
|
const c = THEMES[theme];
|
|
15418
|
-
return /* @__PURE__ */
|
|
15931
|
+
return /* @__PURE__ */ jsxs23(
|
|
15419
15932
|
"svg",
|
|
15420
15933
|
{
|
|
15421
15934
|
width: size,
|
|
@@ -15423,7 +15936,7 @@ var DevDiveAvatar = ({ size = 32, theme = "light" }) => {
|
|
|
15423
15936
|
viewBox: "30 45 160 140",
|
|
15424
15937
|
style: { display: "block" },
|
|
15425
15938
|
children: [
|
|
15426
|
-
/* @__PURE__ */
|
|
15939
|
+
/* @__PURE__ */ jsx24(
|
|
15427
15940
|
"path",
|
|
15428
15941
|
{
|
|
15429
15942
|
d: BODY_PATH,
|
|
@@ -15432,7 +15945,7 @@ var DevDiveAvatar = ({ size = 32, theme = "light" }) => {
|
|
|
15432
15945
|
strokeWidth: "5"
|
|
15433
15946
|
}
|
|
15434
15947
|
),
|
|
15435
|
-
/* @__PURE__ */
|
|
15948
|
+
/* @__PURE__ */ jsx24(
|
|
15436
15949
|
"path",
|
|
15437
15950
|
{
|
|
15438
15951
|
d: "M170 72 C176 86, 178 102, 175 120",
|
|
@@ -15442,18 +15955,18 @@ var DevDiveAvatar = ({ size = 32, theme = "light" }) => {
|
|
|
15442
15955
|
strokeLinecap: "round"
|
|
15443
15956
|
}
|
|
15444
15957
|
),
|
|
15445
|
-
/* @__PURE__ */
|
|
15446
|
-
/* @__PURE__ */
|
|
15447
|
-
/* @__PURE__ */
|
|
15448
|
-
/* @__PURE__ */
|
|
15449
|
-
/* @__PURE__ */
|
|
15958
|
+
/* @__PURE__ */ jsx24("circle", { cx: "87", cy: "106", r: "7.5", fill: c.face }),
|
|
15959
|
+
/* @__PURE__ */ jsx24("circle", { cx: "133", cy: "106", r: "7.5", fill: c.face }),
|
|
15960
|
+
/* @__PURE__ */ jsx24("circle", { cx: "90", cy: "102", r: "2", fill: c.eyeLight, opacity: "0.85" }),
|
|
15961
|
+
/* @__PURE__ */ jsx24("circle", { cx: "136", cy: "102", r: "2", fill: c.eyeLight, opacity: "0.85" }),
|
|
15962
|
+
/* @__PURE__ */ jsx24("path", { d: "M104 127 Q110 132 116 127", fill: "none", stroke: c.face, strokeWidth: "3", strokeLinecap: "round" })
|
|
15450
15963
|
]
|
|
15451
15964
|
}
|
|
15452
15965
|
);
|
|
15453
15966
|
};
|
|
15454
15967
|
|
|
15455
15968
|
// src/react/components/floating/FloatingFab.tsx
|
|
15456
|
-
import { jsx as
|
|
15969
|
+
import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
15457
15970
|
var FloatingFab = ({
|
|
15458
15971
|
onClick,
|
|
15459
15972
|
isOpen,
|
|
@@ -15475,12 +15988,12 @@ var FloatingFab = ({
|
|
|
15475
15988
|
}) => {
|
|
15476
15989
|
const isRight = position.includes("right");
|
|
15477
15990
|
const isBottom = position.includes("bottom");
|
|
15478
|
-
const fabRef =
|
|
15991
|
+
const fabRef = useRef14(null);
|
|
15479
15992
|
const isCharacterMode = !icon;
|
|
15480
|
-
const [bubbleOnRight, setBubbleOnRight] =
|
|
15993
|
+
const [bubbleOnRight, setBubbleOnRight] = useState24(!isRight);
|
|
15481
15994
|
const posLeft = positionStyle?.left;
|
|
15482
15995
|
const posTop = positionStyle?.top;
|
|
15483
|
-
|
|
15996
|
+
useEffect16(() => {
|
|
15484
15997
|
if (!fabRef.current || typeof window === "undefined") {
|
|
15485
15998
|
setBubbleOnRight(!isRight);
|
|
15486
15999
|
return;
|
|
@@ -15488,14 +16001,14 @@ var FloatingFab = ({
|
|
|
15488
16001
|
const rect = fabRef.current.getBoundingClientRect();
|
|
15489
16002
|
setBubbleOnRight(rect.left + rect.width / 2 < window.innerWidth / 2);
|
|
15490
16003
|
}, [isRight, posLeft, posTop]);
|
|
15491
|
-
const [bubbleText, setBubbleText] =
|
|
15492
|
-
const [bubbleExiting, setBubbleExiting] =
|
|
15493
|
-
const bubbleTextRef =
|
|
16004
|
+
const [bubbleText, setBubbleText] = useState24(null);
|
|
16005
|
+
const [bubbleExiting, setBubbleExiting] = useState24(false);
|
|
16006
|
+
const bubbleTextRef = useRef14(bubbleText);
|
|
15494
16007
|
bubbleTextRef.current = bubbleText;
|
|
15495
|
-
const [displayText, setDisplayText] =
|
|
15496
|
-
const [isTyping, setIsTyping] =
|
|
15497
|
-
const typingTimerRef =
|
|
15498
|
-
|
|
16008
|
+
const [displayText, setDisplayText] = useState24(null);
|
|
16009
|
+
const [isTyping, setIsTyping] = useState24(false);
|
|
16010
|
+
const typingTimerRef = useRef14(null);
|
|
16011
|
+
useEffect16(() => {
|
|
15499
16012
|
if (notification) {
|
|
15500
16013
|
setBubbleText(notification);
|
|
15501
16014
|
setBubbleExiting(false);
|
|
@@ -15531,9 +16044,9 @@ var FloatingFab = ({
|
|
|
15531
16044
|
}, 300);
|
|
15532
16045
|
return () => clearTimeout(timer);
|
|
15533
16046
|
}, [notification]);
|
|
15534
|
-
const notifContentRef =
|
|
15535
|
-
const [needsMarquee, setNeedsMarquee] =
|
|
15536
|
-
|
|
16047
|
+
const notifContentRef = useRef14(null);
|
|
16048
|
+
const [needsMarquee, setNeedsMarquee] = useState24(false);
|
|
16049
|
+
useEffect16(() => {
|
|
15537
16050
|
if (isTyping || !notification) {
|
|
15538
16051
|
setNeedsMarquee(false);
|
|
15539
16052
|
return;
|
|
@@ -15555,7 +16068,7 @@ var FloatingFab = ({
|
|
|
15555
16068
|
...isBottom ? { bottom: 28 } : { top: 28 },
|
|
15556
16069
|
...isRight ? { right: 28 } : { left: 28 }
|
|
15557
16070
|
};
|
|
15558
|
-
return /* @__PURE__ */
|
|
16071
|
+
return /* @__PURE__ */ jsxs24(
|
|
15559
16072
|
"button",
|
|
15560
16073
|
{
|
|
15561
16074
|
ref: fabRef,
|
|
@@ -15590,7 +16103,7 @@ var FloatingFab = ({
|
|
|
15590
16103
|
...fabStyle
|
|
15591
16104
|
},
|
|
15592
16105
|
children: [
|
|
15593
|
-
/* @__PURE__ */
|
|
16106
|
+
/* @__PURE__ */ jsx25(
|
|
15594
16107
|
"span",
|
|
15595
16108
|
{
|
|
15596
16109
|
style: {
|
|
@@ -15604,10 +16117,10 @@ var FloatingFab = ({
|
|
|
15604
16117
|
transition: "transform 0.3s ease",
|
|
15605
16118
|
transform: !isCharacterMode && isOpen ? "rotate(90deg)" : "rotate(0deg)"
|
|
15606
16119
|
},
|
|
15607
|
-
children: isCharacterMode ? /* @__PURE__ */
|
|
16120
|
+
children: isCharacterMode ? /* @__PURE__ */ jsx25(DevDiveFabCharacter, { theme: theme?.mode === "dark" ? "dark" : "light", isTalking, isOpen, isDizzy, isError, isComplete }) : isOpen ? /* @__PURE__ */ jsx25(IconSvg, { name: "close-line", size: 24, color: "#fff" }) : icon || /* @__PURE__ */ jsx25(IconSvg, { name: "chat-1-line", size: 24, color: "#fff" })
|
|
15608
16121
|
}
|
|
15609
16122
|
),
|
|
15610
|
-
!!badge && badge > 0 && !isOpen && /* @__PURE__ */
|
|
16123
|
+
!!badge && badge > 0 && !isOpen && /* @__PURE__ */ jsx25(
|
|
15611
16124
|
"span",
|
|
15612
16125
|
{
|
|
15613
16126
|
style: {
|
|
@@ -15631,7 +16144,7 @@ var FloatingFab = ({
|
|
|
15631
16144
|
children: badge > 99 ? "99+" : badge
|
|
15632
16145
|
}
|
|
15633
16146
|
),
|
|
15634
|
-
bubbleText && /* @__PURE__ */
|
|
16147
|
+
bubbleText && /* @__PURE__ */ jsx25(
|
|
15635
16148
|
"div",
|
|
15636
16149
|
{
|
|
15637
16150
|
className: [
|
|
@@ -15649,19 +16162,19 @@ var FloatingFab = ({
|
|
|
15649
16162
|
opacity: !isOpen && !isDragging && !bubbleExiting ? 1 : 0,
|
|
15650
16163
|
transition: "opacity 0.2s ease"
|
|
15651
16164
|
},
|
|
15652
|
-
children: /* @__PURE__ */
|
|
16165
|
+
children: /* @__PURE__ */ jsx25(
|
|
15653
16166
|
"div",
|
|
15654
16167
|
{
|
|
15655
16168
|
ref: notifContentRef,
|
|
15656
16169
|
className: `chatllm-fab-notification__content${needsMarquee ? " chatllm-fab-notification__content--scrolling" : ""}`,
|
|
15657
|
-
children: /* @__PURE__ */
|
|
16170
|
+
children: /* @__PURE__ */ jsxs24(
|
|
15658
16171
|
"div",
|
|
15659
16172
|
{
|
|
15660
16173
|
className: "chatllm-fab-notification__track",
|
|
15661
16174
|
style: needsMarquee ? { animationDuration: `${Math.max(6, bubbleText.length * 0.3)}s` } : void 0,
|
|
15662
16175
|
children: [
|
|
15663
|
-
/* @__PURE__ */
|
|
15664
|
-
needsMarquee && /* @__PURE__ */
|
|
16176
|
+
/* @__PURE__ */ jsx25("span", { children: displayText ?? bubbleText }),
|
|
16177
|
+
needsMarquee && /* @__PURE__ */ jsx25("span", { "aria-hidden": "true", children: bubbleText })
|
|
15665
16178
|
]
|
|
15666
16179
|
}
|
|
15667
16180
|
)
|
|
@@ -15675,8 +16188,8 @@ var FloatingFab = ({
|
|
|
15675
16188
|
};
|
|
15676
16189
|
|
|
15677
16190
|
// src/react/components/floating/FloatingPanel.tsx
|
|
15678
|
-
import { useState as
|
|
15679
|
-
import { jsxs as
|
|
16191
|
+
import { useState as useState25, useEffect as useEffect17, useRef as useRef15 } from "react";
|
|
16192
|
+
import { jsxs as jsxs25 } from "react/jsx-runtime";
|
|
15680
16193
|
var FloatingPanel = ({
|
|
15681
16194
|
isOpen,
|
|
15682
16195
|
width,
|
|
@@ -15693,8 +16206,8 @@ var FloatingPanel = ({
|
|
|
15693
16206
|
}) => {
|
|
15694
16207
|
const isRight = position.includes("right");
|
|
15695
16208
|
const themeClass = theme?.mode === "dark" ? "chatllm-dark" : "";
|
|
15696
|
-
const [isMobile, setIsMobile] =
|
|
15697
|
-
|
|
16209
|
+
const [isMobile, setIsMobile] = useState25(false);
|
|
16210
|
+
useEffect17(() => {
|
|
15698
16211
|
if (typeof window === "undefined") return;
|
|
15699
16212
|
const mql = window.matchMedia("(max-width: 767px)");
|
|
15700
16213
|
setIsMobile(mql.matches);
|
|
@@ -15702,10 +16215,10 @@ var FloatingPanel = ({
|
|
|
15702
16215
|
mql.addEventListener("change", handler);
|
|
15703
16216
|
return () => mql.removeEventListener("change", handler);
|
|
15704
16217
|
}, []);
|
|
15705
|
-
const [shouldRender, setShouldRender] =
|
|
15706
|
-
const [isVisible, setIsVisible] =
|
|
15707
|
-
const rafRef =
|
|
15708
|
-
|
|
16218
|
+
const [shouldRender, setShouldRender] = useState25(isOpen);
|
|
16219
|
+
const [isVisible, setIsVisible] = useState25(isOpen);
|
|
16220
|
+
const rafRef = useRef15(0);
|
|
16221
|
+
useEffect17(() => {
|
|
15709
16222
|
if (isOpen) {
|
|
15710
16223
|
setShouldRender(true);
|
|
15711
16224
|
rafRef.current = requestAnimationFrame(() => {
|
|
@@ -15720,7 +16233,7 @@ var FloatingPanel = ({
|
|
|
15720
16233
|
}
|
|
15721
16234
|
return () => cancelAnimationFrame(rafRef.current);
|
|
15722
16235
|
}, [isOpen]);
|
|
15723
|
-
|
|
16236
|
+
useEffect17(() => {
|
|
15724
16237
|
if (!isOpen || !isMobile) return;
|
|
15725
16238
|
const prev = document.body.style.overflow;
|
|
15726
16239
|
document.body.style.overflow = "hidden";
|
|
@@ -15745,7 +16258,7 @@ var FloatingPanel = ({
|
|
|
15745
16258
|
};
|
|
15746
16259
|
const computedPosition = isMobile ? mobilePosition : positionStyle || defaultDesktopPosition;
|
|
15747
16260
|
const transition = "opacity 0.25s ease, transform 0.25s ease";
|
|
15748
|
-
return /* @__PURE__ */
|
|
16261
|
+
return /* @__PURE__ */ jsxs25(
|
|
15749
16262
|
"div",
|
|
15750
16263
|
{
|
|
15751
16264
|
ref: panelRef,
|
|
@@ -15775,14 +16288,14 @@ var FloatingPanel = ({
|
|
|
15775
16288
|
};
|
|
15776
16289
|
|
|
15777
16290
|
// src/react/components/floating/FloatingTabBar.tsx
|
|
15778
|
-
import { jsx as
|
|
16291
|
+
import { jsx as jsx26, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
15779
16292
|
var FloatingTabBar = ({
|
|
15780
16293
|
tabs,
|
|
15781
16294
|
activeTab,
|
|
15782
16295
|
onTabChange
|
|
15783
16296
|
}) => {
|
|
15784
16297
|
if (tabs.length <= 1) return null;
|
|
15785
|
-
return /* @__PURE__ */
|
|
16298
|
+
return /* @__PURE__ */ jsx26(
|
|
15786
16299
|
"div",
|
|
15787
16300
|
{
|
|
15788
16301
|
role: "tablist",
|
|
@@ -15795,7 +16308,7 @@ var FloatingTabBar = ({
|
|
|
15795
16308
|
},
|
|
15796
16309
|
children: tabs.map((tab) => {
|
|
15797
16310
|
const isActive = tab.key === activeTab;
|
|
15798
|
-
return /* @__PURE__ */
|
|
16311
|
+
return /* @__PURE__ */ jsxs26(
|
|
15799
16312
|
"button",
|
|
15800
16313
|
{
|
|
15801
16314
|
onClick: () => onTabChange(tab.key),
|
|
@@ -15820,7 +16333,7 @@ var FloatingTabBar = ({
|
|
|
15820
16333
|
transition: "color 0.15s ease"
|
|
15821
16334
|
},
|
|
15822
16335
|
children: [
|
|
15823
|
-
tab.icon && /* @__PURE__ */
|
|
16336
|
+
tab.icon && /* @__PURE__ */ jsxs26(
|
|
15824
16337
|
"span",
|
|
15825
16338
|
{
|
|
15826
16339
|
style: {
|
|
@@ -15830,7 +16343,7 @@ var FloatingTabBar = ({
|
|
|
15830
16343
|
},
|
|
15831
16344
|
children: [
|
|
15832
16345
|
tab.icon,
|
|
15833
|
-
!!tab.badge && tab.badge > 0 && /* @__PURE__ */
|
|
16346
|
+
!!tab.badge && tab.badge > 0 && /* @__PURE__ */ jsx26(
|
|
15834
16347
|
"span",
|
|
15835
16348
|
{
|
|
15836
16349
|
style: {
|
|
@@ -15856,8 +16369,8 @@ var FloatingTabBar = ({
|
|
|
15856
16369
|
]
|
|
15857
16370
|
}
|
|
15858
16371
|
),
|
|
15859
|
-
/* @__PURE__ */
|
|
15860
|
-
isActive && /* @__PURE__ */
|
|
16372
|
+
/* @__PURE__ */ jsx26("span", { children: tab.label }),
|
|
16373
|
+
isActive && /* @__PURE__ */ jsx26(
|
|
15861
16374
|
"span",
|
|
15862
16375
|
{
|
|
15863
16376
|
style: {
|
|
@@ -15881,11 +16394,11 @@ var FloatingTabBar = ({
|
|
|
15881
16394
|
};
|
|
15882
16395
|
|
|
15883
16396
|
// src/react/components/floating/CompactChatView.tsx
|
|
15884
|
-
import { useState as
|
|
16397
|
+
import { useState as useState27, useCallback as useCallback14 } from "react";
|
|
15885
16398
|
|
|
15886
16399
|
// src/react/components/floating/CompactSessionMenu.tsx
|
|
15887
|
-
import { useState as
|
|
15888
|
-
import { jsx as
|
|
16400
|
+
import { useState as useState26, useRef as useRef16, useEffect as useEffect18 } from "react";
|
|
16401
|
+
import { jsx as jsx27, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
15889
16402
|
var CompactSessionMenu = ({
|
|
15890
16403
|
sessions,
|
|
15891
16404
|
currentSessionId,
|
|
@@ -15896,13 +16409,13 @@ var CompactSessionMenu = ({
|
|
|
15896
16409
|
onClose,
|
|
15897
16410
|
isLoading = false
|
|
15898
16411
|
}) => {
|
|
15899
|
-
const menuRef =
|
|
15900
|
-
const inputRef =
|
|
15901
|
-
const onCloseRef =
|
|
16412
|
+
const menuRef = useRef16(null);
|
|
16413
|
+
const inputRef = useRef16(null);
|
|
16414
|
+
const onCloseRef = useRef16(onClose);
|
|
15902
16415
|
onCloseRef.current = onClose;
|
|
15903
|
-
const [editingId, setEditingId] =
|
|
15904
|
-
const [editingTitle, setEditingTitle] =
|
|
15905
|
-
|
|
16416
|
+
const [editingId, setEditingId] = useState26(null);
|
|
16417
|
+
const [editingTitle, setEditingTitle] = useState26("");
|
|
16418
|
+
useEffect18(() => {
|
|
15906
16419
|
const handleMouseDown = (e) => {
|
|
15907
16420
|
if (menuRef.current && !menuRef.current.contains(e.target)) {
|
|
15908
16421
|
onCloseRef.current();
|
|
@@ -15911,7 +16424,7 @@ var CompactSessionMenu = ({
|
|
|
15911
16424
|
document.addEventListener("mousedown", handleMouseDown);
|
|
15912
16425
|
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
15913
16426
|
}, []);
|
|
15914
|
-
|
|
16427
|
+
useEffect18(() => {
|
|
15915
16428
|
if (editingId && inputRef.current) {
|
|
15916
16429
|
inputRef.current.focus();
|
|
15917
16430
|
inputRef.current.select();
|
|
@@ -15945,7 +16458,7 @@ var CompactSessionMenu = ({
|
|
|
15945
16458
|
const handleNew = () => {
|
|
15946
16459
|
onNew();
|
|
15947
16460
|
};
|
|
15948
|
-
return /* @__PURE__ */
|
|
16461
|
+
return /* @__PURE__ */ jsxs27(
|
|
15949
16462
|
"div",
|
|
15950
16463
|
{
|
|
15951
16464
|
ref: menuRef,
|
|
@@ -15963,7 +16476,7 @@ var CompactSessionMenu = ({
|
|
|
15963
16476
|
flexDirection: "column"
|
|
15964
16477
|
},
|
|
15965
16478
|
children: [
|
|
15966
|
-
/* @__PURE__ */
|
|
16479
|
+
/* @__PURE__ */ jsxs27(
|
|
15967
16480
|
"button",
|
|
15968
16481
|
{
|
|
15969
16482
|
onClick: handleNew,
|
|
@@ -15983,12 +16496,12 @@ var CompactSessionMenu = ({
|
|
|
15983
16496
|
flexShrink: 0
|
|
15984
16497
|
},
|
|
15985
16498
|
children: [
|
|
15986
|
-
/* @__PURE__ */
|
|
16499
|
+
/* @__PURE__ */ jsx27(IconSvg, { name: "add-line", size: 16, color: "var(--chatllm-primary, #3584FA)" }),
|
|
15987
16500
|
"\uC0C8 \uB300\uD654"
|
|
15988
16501
|
]
|
|
15989
16502
|
}
|
|
15990
16503
|
),
|
|
15991
|
-
/* @__PURE__ */
|
|
16504
|
+
/* @__PURE__ */ jsx27(
|
|
15992
16505
|
"div",
|
|
15993
16506
|
{
|
|
15994
16507
|
className: "chatllm-scrollbar",
|
|
@@ -15999,7 +16512,7 @@ var CompactSessionMenu = ({
|
|
|
15999
16512
|
},
|
|
16000
16513
|
children: isLoading ? (
|
|
16001
16514
|
/** @Todo vibecode - 로딩 스켈레톤 (2개) */
|
|
16002
|
-
/* @__PURE__ */
|
|
16515
|
+
/* @__PURE__ */ jsx27("div", { style: { padding: "8px" }, children: [1, 2].map((i) => /* @__PURE__ */ jsx27(
|
|
16003
16516
|
"div",
|
|
16004
16517
|
{
|
|
16005
16518
|
className: "chatllm-skeleton-pulse",
|
|
@@ -16015,7 +16528,7 @@ var CompactSessionMenu = ({
|
|
|
16015
16528
|
)) })
|
|
16016
16529
|
) : sessions.length === 0 ? (
|
|
16017
16530
|
/** @Todo vibecode - 빈 상태 */
|
|
16018
|
-
/* @__PURE__ */
|
|
16531
|
+
/* @__PURE__ */ jsx27(
|
|
16019
16532
|
"div",
|
|
16020
16533
|
{
|
|
16021
16534
|
style: {
|
|
@@ -16027,9 +16540,9 @@ var CompactSessionMenu = ({
|
|
|
16027
16540
|
children: "\uB300\uD654 \uB0B4\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"
|
|
16028
16541
|
}
|
|
16029
16542
|
)
|
|
16030
|
-
) : /* @__PURE__ */
|
|
16543
|
+
) : /* @__PURE__ */ jsx27("div", { style: { padding: "4px" }, children: sessions.map((session) => {
|
|
16031
16544
|
const isSelected = session.id === currentSessionId;
|
|
16032
|
-
return /* @__PURE__ */
|
|
16545
|
+
return /* @__PURE__ */ jsxs27(
|
|
16033
16546
|
"div",
|
|
16034
16547
|
{
|
|
16035
16548
|
onClick: () => handleSelect(session.id),
|
|
@@ -16054,7 +16567,7 @@ var CompactSessionMenu = ({
|
|
|
16054
16567
|
}
|
|
16055
16568
|
},
|
|
16056
16569
|
children: [
|
|
16057
|
-
/* @__PURE__ */
|
|
16570
|
+
/* @__PURE__ */ jsx27(
|
|
16058
16571
|
IconSvg,
|
|
16059
16572
|
{
|
|
16060
16573
|
name: "chat-1-line",
|
|
@@ -16062,7 +16575,7 @@ var CompactSessionMenu = ({
|
|
|
16062
16575
|
color: "var(--chatllm-text-muted, #94a3b8)"
|
|
16063
16576
|
}
|
|
16064
16577
|
),
|
|
16065
|
-
/* @__PURE__ */
|
|
16578
|
+
/* @__PURE__ */ jsx27("div", { style: { flex: 1, minWidth: 0 }, children: editingId === session.id ? /* @__PURE__ */ jsx27(
|
|
16066
16579
|
"input",
|
|
16067
16580
|
{
|
|
16068
16581
|
ref: inputRef,
|
|
@@ -16086,7 +16599,7 @@ var CompactSessionMenu = ({
|
|
|
16086
16599
|
fontFamily: "inherit"
|
|
16087
16600
|
}
|
|
16088
16601
|
}
|
|
16089
|
-
) : /* @__PURE__ */
|
|
16602
|
+
) : /* @__PURE__ */ jsx27(
|
|
16090
16603
|
"p",
|
|
16091
16604
|
{
|
|
16092
16605
|
style: {
|
|
@@ -16098,10 +16611,10 @@ var CompactSessionMenu = ({
|
|
|
16098
16611
|
whiteSpace: "nowrap",
|
|
16099
16612
|
margin: 0
|
|
16100
16613
|
},
|
|
16101
|
-
children: /* @__PURE__ */
|
|
16614
|
+
children: /* @__PURE__ */ jsx27(MarkdownRenderer, { content: session.title, inline: true })
|
|
16102
16615
|
}
|
|
16103
16616
|
) }),
|
|
16104
|
-
isSelected && editingId !== session.id && /* @__PURE__ */
|
|
16617
|
+
isSelected && editingId !== session.id && /* @__PURE__ */ jsxs27(
|
|
16105
16618
|
"div",
|
|
16106
16619
|
{
|
|
16107
16620
|
style: {
|
|
@@ -16110,7 +16623,7 @@ var CompactSessionMenu = ({
|
|
|
16110
16623
|
flexShrink: 0
|
|
16111
16624
|
},
|
|
16112
16625
|
children: [
|
|
16113
|
-
onRename && /* @__PURE__ */
|
|
16626
|
+
onRename && /* @__PURE__ */ jsx27(
|
|
16114
16627
|
"button",
|
|
16115
16628
|
{
|
|
16116
16629
|
onClick: (e) => handleStartEdit(session, e),
|
|
@@ -16125,10 +16638,10 @@ var CompactSessionMenu = ({
|
|
|
16125
16638
|
display: "flex",
|
|
16126
16639
|
alignItems: "center"
|
|
16127
16640
|
},
|
|
16128
|
-
children: /* @__PURE__ */
|
|
16641
|
+
children: /* @__PURE__ */ jsx27(IconSvg, { name: "pencil-line", size: 12 })
|
|
16129
16642
|
}
|
|
16130
16643
|
),
|
|
16131
|
-
/* @__PURE__ */
|
|
16644
|
+
/* @__PURE__ */ jsx27(
|
|
16132
16645
|
"button",
|
|
16133
16646
|
{
|
|
16134
16647
|
onClick: (e) => {
|
|
@@ -16146,7 +16659,7 @@ var CompactSessionMenu = ({
|
|
|
16146
16659
|
display: "flex",
|
|
16147
16660
|
alignItems: "center"
|
|
16148
16661
|
},
|
|
16149
|
-
children: /* @__PURE__ */
|
|
16662
|
+
children: /* @__PURE__ */ jsx27(IconSvg, { name: "delete-bin-line", size: 12 })
|
|
16150
16663
|
}
|
|
16151
16664
|
)
|
|
16152
16665
|
]
|
|
@@ -16165,7 +16678,7 @@ var CompactSessionMenu = ({
|
|
|
16165
16678
|
};
|
|
16166
16679
|
|
|
16167
16680
|
// src/react/components/floating/CompactChatView.tsx
|
|
16168
|
-
import { jsx as
|
|
16681
|
+
import { jsx as jsx28, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
16169
16682
|
var CompactChatView = ({
|
|
16170
16683
|
chatState,
|
|
16171
16684
|
actions = [],
|
|
@@ -16226,20 +16739,20 @@ var CompactChatView = ({
|
|
|
16226
16739
|
const handleChoiceClick = (choice) => {
|
|
16227
16740
|
setInput(choice.text);
|
|
16228
16741
|
};
|
|
16229
|
-
const [showSessionMenu, setShowSessionMenu] =
|
|
16230
|
-
const handleSessionSelect =
|
|
16742
|
+
const [showSessionMenu, setShowSessionMenu] = useState27(false);
|
|
16743
|
+
const handleSessionSelect = useCallback14((id) => {
|
|
16231
16744
|
selectSession(id);
|
|
16232
16745
|
setShowSessionMenu(false);
|
|
16233
16746
|
}, [selectSession]);
|
|
16234
|
-
const handleNewSession =
|
|
16747
|
+
const handleNewSession = useCallback14(() => {
|
|
16235
16748
|
newSession();
|
|
16236
16749
|
setShowSessionMenu(false);
|
|
16237
16750
|
}, [newSession]);
|
|
16238
|
-
const handleCloseMenu =
|
|
16751
|
+
const handleCloseMenu = useCallback14(() => {
|
|
16239
16752
|
setShowSessionMenu(false);
|
|
16240
16753
|
}, []);
|
|
16241
16754
|
const greeting = personalization?.userProfile?.nickname ? `${personalization.userProfile.nickname}\uB2D8, \uBB34\uC5C7\uC774\uB4E0 \uBB3C\uC5B4\uBCF4\uC138\uC694` : "\uBB34\uC5C7\uC774\uB4E0 \uBB3C\uC5B4\uBCF4\uC138\uC694";
|
|
16242
|
-
return /* @__PURE__ */
|
|
16755
|
+
return /* @__PURE__ */ jsxs28(
|
|
16243
16756
|
"div",
|
|
16244
16757
|
{
|
|
16245
16758
|
style: {
|
|
@@ -16250,7 +16763,7 @@ var CompactChatView = ({
|
|
|
16250
16763
|
overflow: "hidden"
|
|
16251
16764
|
},
|
|
16252
16765
|
children: [
|
|
16253
|
-
/* @__PURE__ */
|
|
16766
|
+
/* @__PURE__ */ jsxs28(
|
|
16254
16767
|
"div",
|
|
16255
16768
|
{
|
|
16256
16769
|
style: {
|
|
@@ -16265,7 +16778,7 @@ var CompactChatView = ({
|
|
|
16265
16778
|
height: 44
|
|
16266
16779
|
},
|
|
16267
16780
|
children: [
|
|
16268
|
-
/* @__PURE__ */
|
|
16781
|
+
/* @__PURE__ */ jsxs28(
|
|
16269
16782
|
"button",
|
|
16270
16783
|
{
|
|
16271
16784
|
onClick: () => setShowSessionMenu((prev) => !prev),
|
|
@@ -16282,7 +16795,7 @@ var CompactChatView = ({
|
|
|
16282
16795
|
fontFamily: "inherit"
|
|
16283
16796
|
},
|
|
16284
16797
|
children: [
|
|
16285
|
-
/* @__PURE__ */
|
|
16798
|
+
/* @__PURE__ */ jsx28(
|
|
16286
16799
|
"span",
|
|
16287
16800
|
{
|
|
16288
16801
|
style: {
|
|
@@ -16293,10 +16806,10 @@ var CompactChatView = ({
|
|
|
16293
16806
|
textOverflow: "ellipsis",
|
|
16294
16807
|
whiteSpace: "nowrap"
|
|
16295
16808
|
},
|
|
16296
|
-
children: /* @__PURE__ */
|
|
16809
|
+
children: /* @__PURE__ */ jsx28(MarkdownRenderer, { content: currentSession?.title || "AI \uCC44\uD305", inline: true })
|
|
16297
16810
|
}
|
|
16298
16811
|
),
|
|
16299
|
-
/* @__PURE__ */
|
|
16812
|
+
/* @__PURE__ */ jsx28(
|
|
16300
16813
|
IconSvg,
|
|
16301
16814
|
{
|
|
16302
16815
|
name: "arrow-down-s-line",
|
|
@@ -16308,7 +16821,7 @@ var CompactChatView = ({
|
|
|
16308
16821
|
}
|
|
16309
16822
|
),
|
|
16310
16823
|
renderHeaderExtra?.(),
|
|
16311
|
-
fullScreenPath && /* @__PURE__ */
|
|
16824
|
+
fullScreenPath && /* @__PURE__ */ jsxs28(
|
|
16312
16825
|
"a",
|
|
16313
16826
|
{
|
|
16314
16827
|
href: fullScreenPath,
|
|
@@ -16323,12 +16836,12 @@ var CompactChatView = ({
|
|
|
16323
16836
|
marginLeft: 8
|
|
16324
16837
|
},
|
|
16325
16838
|
children: [
|
|
16326
|
-
/* @__PURE__ */
|
|
16839
|
+
/* @__PURE__ */ jsx28(IconSvg, { name: "arrow-right-line", size: 14, color: "var(--chatllm-text-muted, #94a3b8)" }),
|
|
16327
16840
|
"\uC804\uCCB4 \uD654\uBA74"
|
|
16328
16841
|
]
|
|
16329
16842
|
}
|
|
16330
16843
|
),
|
|
16331
|
-
showSessionMenu && /* @__PURE__ */
|
|
16844
|
+
showSessionMenu && /* @__PURE__ */ jsx28(
|
|
16332
16845
|
CompactSessionMenu,
|
|
16333
16846
|
{
|
|
16334
16847
|
sessions,
|
|
@@ -16344,7 +16857,7 @@ var CompactChatView = ({
|
|
|
16344
16857
|
]
|
|
16345
16858
|
}
|
|
16346
16859
|
),
|
|
16347
|
-
/* @__PURE__ */
|
|
16860
|
+
/* @__PURE__ */ jsx28("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column", overflow: "hidden" }, children: messages.length === 0 ? /* @__PURE__ */ jsxs28(
|
|
16348
16861
|
"div",
|
|
16349
16862
|
{
|
|
16350
16863
|
style: {
|
|
@@ -16357,7 +16870,7 @@ var CompactChatView = ({
|
|
|
16357
16870
|
gap: "12px"
|
|
16358
16871
|
},
|
|
16359
16872
|
children: [
|
|
16360
|
-
/* @__PURE__ */
|
|
16873
|
+
/* @__PURE__ */ jsx28(
|
|
16361
16874
|
"p",
|
|
16362
16875
|
{
|
|
16363
16876
|
style: {
|
|
@@ -16370,7 +16883,7 @@ var CompactChatView = ({
|
|
|
16370
16883
|
children: greeting
|
|
16371
16884
|
}
|
|
16372
16885
|
),
|
|
16373
|
-
suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */
|
|
16886
|
+
suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */ jsx28(
|
|
16374
16887
|
"div",
|
|
16375
16888
|
{
|
|
16376
16889
|
style: {
|
|
@@ -16380,7 +16893,7 @@ var CompactChatView = ({
|
|
|
16380
16893
|
justifyContent: "center",
|
|
16381
16894
|
maxWidth: "100%"
|
|
16382
16895
|
},
|
|
16383
|
-
children: suggestedPrompts.slice(0, 4).map((sp) => /* @__PURE__ */
|
|
16896
|
+
children: suggestedPrompts.slice(0, 4).map((sp) => /* @__PURE__ */ jsxs28(
|
|
16384
16897
|
"button",
|
|
16385
16898
|
{
|
|
16386
16899
|
onClick: () => setInput(sp.prompt),
|
|
@@ -16400,7 +16913,7 @@ var CompactChatView = ({
|
|
|
16400
16913
|
whiteSpace: "nowrap"
|
|
16401
16914
|
},
|
|
16402
16915
|
children: [
|
|
16403
|
-
sp.icon && /* @__PURE__ */
|
|
16916
|
+
sp.icon && /* @__PURE__ */ jsx28(IconSvg, { name: sp.icon, size: 14, color: "var(--chatllm-text-muted)" }),
|
|
16404
16917
|
sp.label
|
|
16405
16918
|
]
|
|
16406
16919
|
},
|
|
@@ -16410,7 +16923,7 @@ var CompactChatView = ({
|
|
|
16410
16923
|
)
|
|
16411
16924
|
]
|
|
16412
16925
|
}
|
|
16413
|
-
) : /* @__PURE__ */
|
|
16926
|
+
) : /* @__PURE__ */ jsx28(
|
|
16414
16927
|
MessageList,
|
|
16415
16928
|
{
|
|
16416
16929
|
messages,
|
|
@@ -16435,11 +16948,11 @@ var CompactChatView = ({
|
|
|
16435
16948
|
onChecklistSkip: handleChecklistSkip,
|
|
16436
16949
|
activeSkillExecution,
|
|
16437
16950
|
compact: true,
|
|
16438
|
-
assistantIcon: /* @__PURE__ */
|
|
16951
|
+
assistantIcon: /* @__PURE__ */ jsx28(DevDiveAvatar, { size: 32 }),
|
|
16439
16952
|
renderMessage
|
|
16440
16953
|
}
|
|
16441
16954
|
) }),
|
|
16442
|
-
/* @__PURE__ */
|
|
16955
|
+
/* @__PURE__ */ jsx28("div", { style: { flex: "none", padding: "0 8px 8px 8px" }, children: /* @__PURE__ */ jsx28(
|
|
16443
16956
|
ChatInput,
|
|
16444
16957
|
{
|
|
16445
16958
|
value: input,
|
|
@@ -16472,7 +16985,7 @@ var CompactChatView = ({
|
|
|
16472
16985
|
};
|
|
16473
16986
|
|
|
16474
16987
|
// src/react/components/floating/ResizeHandles.tsx
|
|
16475
|
-
import { Fragment as Fragment11, jsx as
|
|
16988
|
+
import { Fragment as Fragment11, jsx as jsx29 } from "react/jsx-runtime";
|
|
16476
16989
|
var HANDLES = [
|
|
16477
16990
|
{ edge: "top", className: "chatllm-resize-handle chatllm-resize-handle--top" },
|
|
16478
16991
|
{ edge: "left", className: "chatllm-resize-handle chatllm-resize-handle--left" },
|
|
@@ -16485,7 +16998,7 @@ var ResizeHandles = ({
|
|
|
16485
16998
|
onPointerMove,
|
|
16486
16999
|
onPointerUp
|
|
16487
17000
|
}) => {
|
|
16488
|
-
return /* @__PURE__ */
|
|
17001
|
+
return /* @__PURE__ */ jsx29(Fragment11, { children: HANDLES.map(({ edge, className }) => /* @__PURE__ */ jsx29(
|
|
16489
17002
|
"div",
|
|
16490
17003
|
{
|
|
16491
17004
|
className,
|
|
@@ -16498,7 +17011,7 @@ var ResizeHandles = ({
|
|
|
16498
17011
|
};
|
|
16499
17012
|
|
|
16500
17013
|
// src/react/ChatFloatingWidget.tsx
|
|
16501
|
-
import { jsx as
|
|
17014
|
+
import { jsx as jsx30, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
16502
17015
|
injectBaseStyles();
|
|
16503
17016
|
injectFloatingStyles();
|
|
16504
17017
|
var ChatFloatingWidget = ({
|
|
@@ -16559,7 +17072,7 @@ var ChatFloatingWidget = ({
|
|
|
16559
17072
|
if (!notification) return null;
|
|
16560
17073
|
return typeof notification === "string" ? { text: notification } : notification;
|
|
16561
17074
|
}, [notification]);
|
|
16562
|
-
const handleFabClick =
|
|
17075
|
+
const handleFabClick = useCallback15(() => {
|
|
16563
17076
|
if (notifObj?.onClick) {
|
|
16564
17077
|
notifObj.onClick();
|
|
16565
17078
|
if (!isOpen) handleFabInteraction();
|
|
@@ -16577,7 +17090,7 @@ var ChatFloatingWidget = ({
|
|
|
16577
17090
|
const chatTab = {
|
|
16578
17091
|
key: "chat",
|
|
16579
17092
|
label: "\uCC44\uD305",
|
|
16580
|
-
icon: /* @__PURE__ */
|
|
17093
|
+
icon: /* @__PURE__ */ jsx30(IconSvg, { name: "chat-1-line", size: 16 })
|
|
16581
17094
|
};
|
|
16582
17095
|
const customTabs = tabs.map((t) => ({
|
|
16583
17096
|
key: t.key,
|
|
@@ -16587,9 +17100,9 @@ var ChatFloatingWidget = ({
|
|
|
16587
17100
|
}));
|
|
16588
17101
|
return [chatTab, ...customTabs];
|
|
16589
17102
|
}, [tabs]);
|
|
16590
|
-
const [unreadBadge, setUnreadBadge] =
|
|
16591
|
-
const seenMessageIdsRef =
|
|
16592
|
-
|
|
17103
|
+
const [unreadBadge, setUnreadBadge] = useState28(0);
|
|
17104
|
+
const seenMessageIdsRef = useRef17(new Set(chatState.messages.map((m) => m.id)));
|
|
17105
|
+
useEffect19(() => {
|
|
16593
17106
|
if (!isOpen) {
|
|
16594
17107
|
const newAssistant = chatState.messages.filter(
|
|
16595
17108
|
(m) => m.role === "assistant" && !seenMessageIdsRef.current.has(m.id)
|
|
@@ -16602,16 +17115,16 @@ var ChatFloatingWidget = ({
|
|
|
16602
17115
|
seenMessageIdsRef.current.add(m.id);
|
|
16603
17116
|
}
|
|
16604
17117
|
}, [chatState.messages, isOpen]);
|
|
16605
|
-
|
|
17118
|
+
useEffect19(() => {
|
|
16606
17119
|
if (isOpen) setUnreadBadge(0);
|
|
16607
17120
|
}, [isOpen]);
|
|
16608
17121
|
const totalBadge = useMemo7(() => {
|
|
16609
17122
|
return tabs.reduce((sum, t) => sum + (t.badge || 0), 0) + unreadBadge;
|
|
16610
17123
|
}, [tabs, unreadBadge]);
|
|
16611
17124
|
const isTalking = useMemo7(() => !!notification || chatState.isLoading, [notification, chatState.isLoading]);
|
|
16612
|
-
const prevLoadingRef =
|
|
16613
|
-
const [isComplete, setIsComplete] =
|
|
16614
|
-
|
|
17125
|
+
const prevLoadingRef = useRef17(chatState.isLoading);
|
|
17126
|
+
const [isComplete, setIsComplete] = useState28(false);
|
|
17127
|
+
useEffect19(() => {
|
|
16615
17128
|
const wasLoading = prevLoadingRef.current;
|
|
16616
17129
|
prevLoadingRef.current = chatState.isLoading;
|
|
16617
17130
|
if (!wasLoading || chatState.isLoading || chatState.messages.length === 0) return;
|
|
@@ -16619,8 +17132,8 @@ var ChatFloatingWidget = ({
|
|
|
16619
17132
|
const t = setTimeout(() => setIsComplete(false), 100);
|
|
16620
17133
|
return () => clearTimeout(t);
|
|
16621
17134
|
}, [chatState.isLoading, chatState.messages.length]);
|
|
16622
|
-
return /* @__PURE__ */
|
|
16623
|
-
/* @__PURE__ */
|
|
17135
|
+
return /* @__PURE__ */ jsxs29("div", { className: `chatllm-floating-widget ${className}`, children: [
|
|
17136
|
+
/* @__PURE__ */ jsx30(
|
|
16624
17137
|
FloatingFab,
|
|
16625
17138
|
{
|
|
16626
17139
|
onClick: handleFabClick,
|
|
@@ -16641,7 +17154,7 @@ var ChatFloatingWidget = ({
|
|
|
16641
17154
|
isComplete
|
|
16642
17155
|
}
|
|
16643
17156
|
),
|
|
16644
|
-
/* @__PURE__ */
|
|
17157
|
+
/* @__PURE__ */ jsxs29(
|
|
16645
17158
|
FloatingPanel,
|
|
16646
17159
|
{
|
|
16647
17160
|
isOpen,
|
|
@@ -16653,7 +17166,7 @@ var ChatFloatingWidget = ({
|
|
|
16653
17166
|
panelRef,
|
|
16654
17167
|
positionStyle: dragResize.panelPositionStyle,
|
|
16655
17168
|
isResizing: dragResize.isResizing,
|
|
16656
|
-
resizeHandles: !dragResize.isMobile && !disableDragResize ? /* @__PURE__ */
|
|
17169
|
+
resizeHandles: !dragResize.isMobile && !disableDragResize ? /* @__PURE__ */ jsx30(
|
|
16657
17170
|
ResizeHandles,
|
|
16658
17171
|
{
|
|
16659
17172
|
onPointerDown: dragResize.resizeHandlers.onPointerDown,
|
|
@@ -16662,7 +17175,7 @@ var ChatFloatingWidget = ({
|
|
|
16662
17175
|
}
|
|
16663
17176
|
) : null,
|
|
16664
17177
|
children: [
|
|
16665
|
-
/* @__PURE__ */
|
|
17178
|
+
/* @__PURE__ */ jsx30(
|
|
16666
17179
|
FloatingTabBar,
|
|
16667
17180
|
{
|
|
16668
17181
|
tabs: allTabs,
|
|
@@ -16670,8 +17183,8 @@ var ChatFloatingWidget = ({
|
|
|
16670
17183
|
onTabChange: setTab
|
|
16671
17184
|
}
|
|
16672
17185
|
),
|
|
16673
|
-
/* @__PURE__ */
|
|
16674
|
-
/* @__PURE__ */
|
|
17186
|
+
/* @__PURE__ */ jsxs29("div", { style: { flex: 1, position: "relative", overflow: "hidden", minHeight: 0 }, children: [
|
|
17187
|
+
/* @__PURE__ */ jsx30(
|
|
16675
17188
|
"div",
|
|
16676
17189
|
{
|
|
16677
17190
|
style: {
|
|
@@ -16685,7 +17198,7 @@ var ChatFloatingWidget = ({
|
|
|
16685
17198
|
bottom: 0,
|
|
16686
17199
|
overflow: "hidden"
|
|
16687
17200
|
},
|
|
16688
|
-
children: /* @__PURE__ */
|
|
17201
|
+
children: /* @__PURE__ */ jsx30(
|
|
16689
17202
|
CompactChatView,
|
|
16690
17203
|
{
|
|
16691
17204
|
chatState,
|
|
@@ -16701,7 +17214,7 @@ var ChatFloatingWidget = ({
|
|
|
16701
17214
|
)
|
|
16702
17215
|
}
|
|
16703
17216
|
),
|
|
16704
|
-
tabs.map((tab) => /* @__PURE__ */
|
|
17217
|
+
tabs.map((tab) => /* @__PURE__ */ jsx30(
|
|
16705
17218
|
"div",
|
|
16706
17219
|
{
|
|
16707
17220
|
style: {
|
|
@@ -16727,7 +17240,7 @@ var ChatFloatingWidget = ({
|
|
|
16727
17240
|
};
|
|
16728
17241
|
|
|
16729
17242
|
// src/react/hooks/useDeepResearch.ts
|
|
16730
|
-
import { useState as
|
|
17243
|
+
import { useState as useState29, useCallback as useCallback16, useRef as useRef18 } from "react";
|
|
16731
17244
|
var REPORT_GENERATION_PROMPT2 = `\uB2F9\uC2E0\uC740 \uB9AC\uC11C\uCE58 \uBCF4\uACE0\uC11C \uC791\uC131 \uC804\uBB38\uAC00\uC785\uB2C8\uB2E4.
|
|
16732
17245
|
|
|
16733
17246
|
<collected_sources>
|
|
@@ -16778,10 +17291,10 @@ var QUERY_ANALYSIS_PROMPT2 = `\uC0AC\uC6A9\uC790 \uC9C8\uBB38\uC744 \uBD84\uC11D
|
|
|
16778
17291
|
- JSON \uC678 \uB2E4\uB978 \uD14D\uC2A4\uD2B8 \uCD9C\uB825 \uAE08\uC9C0`;
|
|
16779
17292
|
var useDeepResearch = (options) => {
|
|
16780
17293
|
const { onWebSearch, onExtractContent, apiEndpoint, apiKey, model, provider } = options;
|
|
16781
|
-
const [isResearching, setIsResearching] =
|
|
16782
|
-
const [progress, setProgress] =
|
|
16783
|
-
const abortControllerRef =
|
|
16784
|
-
const callLLM2 =
|
|
17294
|
+
const [isResearching, setIsResearching] = useState29(false);
|
|
17295
|
+
const [progress, setProgress] = useState29(null);
|
|
17296
|
+
const abortControllerRef = useRef18(null);
|
|
17297
|
+
const callLLM2 = useCallback16(
|
|
16785
17298
|
async (prompt, stream = false) => {
|
|
16786
17299
|
const response = await fetch(apiEndpoint, {
|
|
16787
17300
|
method: "POST",
|
|
@@ -16808,7 +17321,7 @@ var useDeepResearch = (options) => {
|
|
|
16808
17321
|
},
|
|
16809
17322
|
[apiEndpoint, apiKey, model, provider]
|
|
16810
17323
|
);
|
|
16811
|
-
const analyzeQuery2 =
|
|
17324
|
+
const analyzeQuery2 = useCallback16(
|
|
16812
17325
|
async (query) => {
|
|
16813
17326
|
const prompt = QUERY_ANALYSIS_PROMPT2.replace("{question}", query);
|
|
16814
17327
|
const response = await callLLM2(prompt);
|
|
@@ -16827,7 +17340,7 @@ var useDeepResearch = (options) => {
|
|
|
16827
17340
|
},
|
|
16828
17341
|
[callLLM2]
|
|
16829
17342
|
);
|
|
16830
|
-
const runSubAgent2 =
|
|
17343
|
+
const runSubAgent2 = useCallback16(
|
|
16831
17344
|
async (topic, queries, agentId, updateProgress) => {
|
|
16832
17345
|
updateProgress({ status: "searching", searchCount: 0, resultsCount: 0 });
|
|
16833
17346
|
const allResults = [];
|
|
@@ -16866,7 +17379,7 @@ var useDeepResearch = (options) => {
|
|
|
16866
17379
|
},
|
|
16867
17380
|
[onWebSearch, onExtractContent]
|
|
16868
17381
|
);
|
|
16869
|
-
const generateReport2 =
|
|
17382
|
+
const generateReport2 = useCallback16(
|
|
16870
17383
|
async (query, results, onStreamContent) => {
|
|
16871
17384
|
const allSources = [];
|
|
16872
17385
|
const sourcesForPrompt = [];
|
|
@@ -16924,7 +17437,7 @@ var useDeepResearch = (options) => {
|
|
|
16924
17437
|
},
|
|
16925
17438
|
[callLLM2]
|
|
16926
17439
|
);
|
|
16927
|
-
const runDeepResearch =
|
|
17440
|
+
const runDeepResearch = useCallback16(
|
|
16928
17441
|
async (query, onStreamContent) => {
|
|
16929
17442
|
abortControllerRef.current = new AbortController();
|
|
16930
17443
|
setIsResearching(true);
|
|
@@ -17027,7 +17540,7 @@ var useDeepResearch = (options) => {
|
|
|
17027
17540
|
},
|
|
17028
17541
|
[analyzeQuery2, runSubAgent2, generateReport2]
|
|
17029
17542
|
);
|
|
17030
|
-
const stopResearch =
|
|
17543
|
+
const stopResearch = useCallback16(() => {
|
|
17031
17544
|
abortControllerRef.current?.abort();
|
|
17032
17545
|
setIsResearching(false);
|
|
17033
17546
|
setProgress(null);
|
|
@@ -17041,7 +17554,7 @@ var useDeepResearch = (options) => {
|
|
|
17041
17554
|
};
|
|
17042
17555
|
|
|
17043
17556
|
// src/react/components/EmptyState.tsx
|
|
17044
|
-
import { jsx as
|
|
17557
|
+
import { jsx as jsx31, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
17045
17558
|
var EmptyState = ({
|
|
17046
17559
|
greeting,
|
|
17047
17560
|
templates = [],
|
|
@@ -17059,7 +17572,7 @@ var EmptyState = ({
|
|
|
17059
17572
|
return iconMap[icon] || "sparkling-line";
|
|
17060
17573
|
};
|
|
17061
17574
|
const hasContent = actions.length > 0 || templates.length > 0;
|
|
17062
|
-
return /* @__PURE__ */
|
|
17575
|
+
return /* @__PURE__ */ jsxs30(
|
|
17063
17576
|
"div",
|
|
17064
17577
|
{
|
|
17065
17578
|
className: "chatllm-empty-state",
|
|
@@ -17074,7 +17587,7 @@ var EmptyState = ({
|
|
|
17074
17587
|
textAlign: "center"
|
|
17075
17588
|
},
|
|
17076
17589
|
children: [
|
|
17077
|
-
/* @__PURE__ */
|
|
17590
|
+
/* @__PURE__ */ jsx31(
|
|
17078
17591
|
"div",
|
|
17079
17592
|
{
|
|
17080
17593
|
className: "chatllm-sheet",
|
|
@@ -17088,10 +17601,10 @@ var EmptyState = ({
|
|
|
17088
17601
|
marginBottom: "32px",
|
|
17089
17602
|
color: "var(--chatllm-primary)"
|
|
17090
17603
|
},
|
|
17091
|
-
children: /* @__PURE__ */
|
|
17604
|
+
children: /* @__PURE__ */ jsx31(IconSvg, { name: "chat-1-line", size: 40 })
|
|
17092
17605
|
}
|
|
17093
17606
|
),
|
|
17094
|
-
/* @__PURE__ */
|
|
17607
|
+
/* @__PURE__ */ jsx31(
|
|
17095
17608
|
"h1",
|
|
17096
17609
|
{
|
|
17097
17610
|
style: {
|
|
@@ -17104,7 +17617,7 @@ var EmptyState = ({
|
|
|
17104
17617
|
children: "How can I help you today?"
|
|
17105
17618
|
}
|
|
17106
17619
|
),
|
|
17107
|
-
(actions.length > 0 || templates.length > 0) && /* @__PURE__ */
|
|
17620
|
+
(actions.length > 0 || templates.length > 0) && /* @__PURE__ */ jsxs30(
|
|
17108
17621
|
"div",
|
|
17109
17622
|
{
|
|
17110
17623
|
style: {
|
|
@@ -17116,7 +17629,7 @@ var EmptyState = ({
|
|
|
17116
17629
|
marginBottom: "48px"
|
|
17117
17630
|
},
|
|
17118
17631
|
children: [
|
|
17119
|
-
actions.map((action) => /* @__PURE__ */
|
|
17632
|
+
actions.map((action) => /* @__PURE__ */ jsxs30(
|
|
17120
17633
|
"button",
|
|
17121
17634
|
{
|
|
17122
17635
|
onClick: () => onActionSelect?.(action),
|
|
@@ -17130,7 +17643,7 @@ var EmptyState = ({
|
|
|
17130
17643
|
fontWeight: 500
|
|
17131
17644
|
},
|
|
17132
17645
|
children: [
|
|
17133
|
-
/* @__PURE__ */
|
|
17646
|
+
/* @__PURE__ */ jsx31(
|
|
17134
17647
|
IconSvg,
|
|
17135
17648
|
{
|
|
17136
17649
|
name: getActionIcon(action.icon),
|
|
@@ -17143,7 +17656,7 @@ var EmptyState = ({
|
|
|
17143
17656
|
},
|
|
17144
17657
|
action.id
|
|
17145
17658
|
)),
|
|
17146
|
-
templates.slice(0, 4).map((template) => /* @__PURE__ */
|
|
17659
|
+
templates.slice(0, 4).map((template) => /* @__PURE__ */ jsxs30(
|
|
17147
17660
|
"button",
|
|
17148
17661
|
{
|
|
17149
17662
|
onClick: () => onTemplateClick(template),
|
|
@@ -17157,7 +17670,7 @@ var EmptyState = ({
|
|
|
17157
17670
|
fontWeight: 500
|
|
17158
17671
|
},
|
|
17159
17672
|
children: [
|
|
17160
|
-
/* @__PURE__ */
|
|
17673
|
+
/* @__PURE__ */ jsx31(
|
|
17161
17674
|
IconSvg,
|
|
17162
17675
|
{
|
|
17163
17676
|
name: "sparkling-line",
|
|
@@ -17179,8 +17692,8 @@ var EmptyState = ({
|
|
|
17179
17692
|
};
|
|
17180
17693
|
|
|
17181
17694
|
// src/react/components/MemoryPanel.tsx
|
|
17182
|
-
import { useState as
|
|
17183
|
-
import { jsx as
|
|
17695
|
+
import { useState as useState30 } from "react";
|
|
17696
|
+
import { jsx as jsx32, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
17184
17697
|
var categoryLabels = {
|
|
17185
17698
|
fact: "\uC0AC\uC6A9\uC790 \uC815\uBCF4",
|
|
17186
17699
|
skill: "\uC804\uBB38 \uBD84\uC57C/\uAE30\uC220",
|
|
@@ -17199,8 +17712,8 @@ var MemoryPanel = ({
|
|
|
17199
17712
|
isOpen,
|
|
17200
17713
|
onToggle
|
|
17201
17714
|
}) => {
|
|
17202
|
-
const [expandedId, setExpandedId] =
|
|
17203
|
-
const [activeTab, setActiveTab] =
|
|
17715
|
+
const [expandedId, setExpandedId] = useState30(null);
|
|
17716
|
+
const [activeTab, setActiveTab] = useState30("all");
|
|
17204
17717
|
const filteredItems = activeTab === "all" ? items : items.filter((item) => item.category === activeTab);
|
|
17205
17718
|
const formatDate = (timestamp) => {
|
|
17206
17719
|
const date = new Date(timestamp);
|
|
@@ -17212,7 +17725,7 @@ var MemoryPanel = ({
|
|
|
17212
17725
|
});
|
|
17213
17726
|
};
|
|
17214
17727
|
if (!isOpen) {
|
|
17215
|
-
return /* @__PURE__ */
|
|
17728
|
+
return /* @__PURE__ */ jsx32(
|
|
17216
17729
|
"button",
|
|
17217
17730
|
{
|
|
17218
17731
|
onClick: onToggle,
|
|
@@ -17232,11 +17745,11 @@ var MemoryPanel = ({
|
|
|
17232
17745
|
justifyContent: "center",
|
|
17233
17746
|
zIndex: 100
|
|
17234
17747
|
},
|
|
17235
|
-
children: /* @__PURE__ */
|
|
17748
|
+
children: /* @__PURE__ */ jsx32(IconSvg, { name: "robot-line", size: 24, color: "#ffffff" })
|
|
17236
17749
|
}
|
|
17237
17750
|
);
|
|
17238
17751
|
}
|
|
17239
|
-
return /* @__PURE__ */
|
|
17752
|
+
return /* @__PURE__ */ jsxs31(
|
|
17240
17753
|
"div",
|
|
17241
17754
|
{
|
|
17242
17755
|
className: "chatllm-memory-panel",
|
|
@@ -17256,7 +17769,7 @@ var MemoryPanel = ({
|
|
|
17256
17769
|
zIndex: 100
|
|
17257
17770
|
},
|
|
17258
17771
|
children: [
|
|
17259
|
-
/* @__PURE__ */
|
|
17772
|
+
/* @__PURE__ */ jsxs31(
|
|
17260
17773
|
"div",
|
|
17261
17774
|
{
|
|
17262
17775
|
style: {
|
|
@@ -17267,8 +17780,8 @@ var MemoryPanel = ({
|
|
|
17267
17780
|
borderBottom: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
17268
17781
|
},
|
|
17269
17782
|
children: [
|
|
17270
|
-
/* @__PURE__ */
|
|
17271
|
-
/* @__PURE__ */
|
|
17783
|
+
/* @__PURE__ */ jsxs31("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
17784
|
+
/* @__PURE__ */ jsx32(
|
|
17272
17785
|
"div",
|
|
17273
17786
|
{
|
|
17274
17787
|
style: {
|
|
@@ -17280,19 +17793,19 @@ var MemoryPanel = ({
|
|
|
17280
17793
|
alignItems: "center",
|
|
17281
17794
|
justifyContent: "center"
|
|
17282
17795
|
},
|
|
17283
|
-
children: /* @__PURE__ */
|
|
17796
|
+
children: /* @__PURE__ */ jsx32(IconSvg, { name: "robot-line", size: 18, color: "var(--chatllm-primary, #3584FA)" })
|
|
17284
17797
|
}
|
|
17285
17798
|
),
|
|
17286
|
-
/* @__PURE__ */
|
|
17287
|
-
/* @__PURE__ */
|
|
17288
|
-
/* @__PURE__ */
|
|
17799
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
17800
|
+
/* @__PURE__ */ jsx32("div", { style: { fontSize: "15px", fontWeight: 600, color: "var(--chatllm-text, #1f2937)" }, children: "AI \uBA54\uBAA8\uB9AC" }),
|
|
17801
|
+
/* @__PURE__ */ jsxs31("div", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: [
|
|
17289
17802
|
items.length,
|
|
17290
17803
|
"\uAC1C \uD56D\uBAA9"
|
|
17291
17804
|
] })
|
|
17292
17805
|
] })
|
|
17293
17806
|
] }),
|
|
17294
|
-
/* @__PURE__ */
|
|
17295
|
-
onClearAll && items.length > 0 && /* @__PURE__ */
|
|
17807
|
+
/* @__PURE__ */ jsxs31("div", { style: { display: "flex", gap: "4px" }, children: [
|
|
17808
|
+
onClearAll && items.length > 0 && /* @__PURE__ */ jsx32(
|
|
17296
17809
|
"button",
|
|
17297
17810
|
{
|
|
17298
17811
|
onClick: onClearAll,
|
|
@@ -17304,10 +17817,10 @@ var MemoryPanel = ({
|
|
|
17304
17817
|
cursor: "pointer"
|
|
17305
17818
|
},
|
|
17306
17819
|
title: "\uC804\uCCB4 \uC0AD\uC81C",
|
|
17307
|
-
children: /* @__PURE__ */
|
|
17820
|
+
children: /* @__PURE__ */ jsx32(IconSvg, { name: "delete-bin-line", size: 18, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
17308
17821
|
}
|
|
17309
17822
|
),
|
|
17310
|
-
/* @__PURE__ */
|
|
17823
|
+
/* @__PURE__ */ jsx32(
|
|
17311
17824
|
"button",
|
|
17312
17825
|
{
|
|
17313
17826
|
onClick: onToggle,
|
|
@@ -17318,14 +17831,14 @@ var MemoryPanel = ({
|
|
|
17318
17831
|
borderRadius: "8px",
|
|
17319
17832
|
cursor: "pointer"
|
|
17320
17833
|
},
|
|
17321
|
-
children: /* @__PURE__ */
|
|
17834
|
+
children: /* @__PURE__ */ jsx32(IconSvg, { name: "close-line", size: 18, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
17322
17835
|
}
|
|
17323
17836
|
)
|
|
17324
17837
|
] })
|
|
17325
17838
|
]
|
|
17326
17839
|
}
|
|
17327
17840
|
),
|
|
17328
|
-
/* @__PURE__ */
|
|
17841
|
+
/* @__PURE__ */ jsx32(
|
|
17329
17842
|
"div",
|
|
17330
17843
|
{
|
|
17331
17844
|
style: {
|
|
@@ -17335,7 +17848,7 @@ var MemoryPanel = ({
|
|
|
17335
17848
|
borderBottom: "1px solid var(--chatllm-border-light, #f3f4f6)",
|
|
17336
17849
|
overflowX: "auto"
|
|
17337
17850
|
},
|
|
17338
|
-
children: ["all", "fact", "skill", "preference"].map((tab) => /* @__PURE__ */
|
|
17851
|
+
children: ["all", "fact", "skill", "preference"].map((tab) => /* @__PURE__ */ jsx32(
|
|
17339
17852
|
"button",
|
|
17340
17853
|
{
|
|
17341
17854
|
onClick: () => setActiveTab(tab),
|
|
@@ -17356,8 +17869,8 @@ var MemoryPanel = ({
|
|
|
17356
17869
|
))
|
|
17357
17870
|
}
|
|
17358
17871
|
),
|
|
17359
|
-
/* @__PURE__ */
|
|
17360
|
-
contextSummary && activeTab === "all" && /* @__PURE__ */
|
|
17872
|
+
/* @__PURE__ */ jsxs31("div", { style: { flex: 1, overflow: "auto", padding: "12px" }, children: [
|
|
17873
|
+
contextSummary && activeTab === "all" && /* @__PURE__ */ jsxs31(
|
|
17361
17874
|
"div",
|
|
17362
17875
|
{
|
|
17363
17876
|
style: {
|
|
@@ -17368,7 +17881,7 @@ var MemoryPanel = ({
|
|
|
17368
17881
|
borderLeft: "3px solid var(--chatllm-primary, #3584FA)"
|
|
17369
17882
|
},
|
|
17370
17883
|
children: [
|
|
17371
|
-
/* @__PURE__ */
|
|
17884
|
+
/* @__PURE__ */ jsxs31(
|
|
17372
17885
|
"div",
|
|
17373
17886
|
{
|
|
17374
17887
|
style: {
|
|
@@ -17378,12 +17891,12 @@ var MemoryPanel = ({
|
|
|
17378
17891
|
marginBottom: "8px"
|
|
17379
17892
|
},
|
|
17380
17893
|
children: [
|
|
17381
|
-
/* @__PURE__ */
|
|
17382
|
-
/* @__PURE__ */
|
|
17894
|
+
/* @__PURE__ */ jsx32(IconSvg, { name: "file-text-line", size: 14, color: "var(--chatllm-primary, #3584FA)" }),
|
|
17895
|
+
/* @__PURE__ */ jsx32("span", { style: { fontSize: "12px", fontWeight: 500, color: "var(--chatllm-primary, #3584FA)" }, children: "\uB300\uD654 \uC694\uC57D" })
|
|
17383
17896
|
]
|
|
17384
17897
|
}
|
|
17385
17898
|
),
|
|
17386
|
-
/* @__PURE__ */
|
|
17899
|
+
/* @__PURE__ */ jsx32(
|
|
17387
17900
|
"p",
|
|
17388
17901
|
{
|
|
17389
17902
|
style: {
|
|
@@ -17398,7 +17911,7 @@ var MemoryPanel = ({
|
|
|
17398
17911
|
]
|
|
17399
17912
|
}
|
|
17400
17913
|
),
|
|
17401
|
-
filteredItems.length === 0 ? /* @__PURE__ */
|
|
17914
|
+
filteredItems.length === 0 ? /* @__PURE__ */ jsxs31(
|
|
17402
17915
|
"div",
|
|
17403
17916
|
{
|
|
17404
17917
|
style: {
|
|
@@ -17407,11 +17920,11 @@ var MemoryPanel = ({
|
|
|
17407
17920
|
color: "var(--chatllm-text-muted, #9ca3af)"
|
|
17408
17921
|
},
|
|
17409
17922
|
children: [
|
|
17410
|
-
/* @__PURE__ */
|
|
17411
|
-
/* @__PURE__ */
|
|
17923
|
+
/* @__PURE__ */ jsx32(IconSvg, { name: "robot-line", size: 32, color: "var(--chatllm-text-muted, #d1d5db)" }),
|
|
17924
|
+
/* @__PURE__ */ jsx32("p", { style: { fontSize: "14px", marginTop: "12px" }, children: "\uC800\uC7A5\uB41C \uBA54\uBAA8\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4" })
|
|
17412
17925
|
]
|
|
17413
17926
|
}
|
|
17414
|
-
) : /* @__PURE__ */
|
|
17927
|
+
) : /* @__PURE__ */ jsx32("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: filteredItems.map((item) => /* @__PURE__ */ jsxs31(
|
|
17415
17928
|
"div",
|
|
17416
17929
|
{
|
|
17417
17930
|
style: {
|
|
@@ -17424,10 +17937,10 @@ var MemoryPanel = ({
|
|
|
17424
17937
|
},
|
|
17425
17938
|
onClick: () => setExpandedId(expandedId === item.id ? null : item.id),
|
|
17426
17939
|
children: [
|
|
17427
|
-
/* @__PURE__ */
|
|
17428
|
-
/* @__PURE__ */
|
|
17429
|
-
/* @__PURE__ */
|
|
17430
|
-
item.category && /* @__PURE__ */
|
|
17940
|
+
/* @__PURE__ */ jsxs31("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: [
|
|
17941
|
+
/* @__PURE__ */ jsxs31("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
17942
|
+
/* @__PURE__ */ jsxs31("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [
|
|
17943
|
+
item.category && /* @__PURE__ */ jsx32(
|
|
17431
17944
|
"span",
|
|
17432
17945
|
{
|
|
17433
17946
|
style: {
|
|
@@ -17441,9 +17954,9 @@ var MemoryPanel = ({
|
|
|
17441
17954
|
children: categoryLabels[item.category]
|
|
17442
17955
|
}
|
|
17443
17956
|
),
|
|
17444
|
-
/* @__PURE__ */
|
|
17957
|
+
/* @__PURE__ */ jsx32("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: formatDate(item.timestamp) })
|
|
17445
17958
|
] }),
|
|
17446
|
-
/* @__PURE__ */
|
|
17959
|
+
/* @__PURE__ */ jsx32(
|
|
17447
17960
|
"div",
|
|
17448
17961
|
{
|
|
17449
17962
|
style: {
|
|
@@ -17455,8 +17968,8 @@ var MemoryPanel = ({
|
|
|
17455
17968
|
}
|
|
17456
17969
|
)
|
|
17457
17970
|
] }),
|
|
17458
|
-
/* @__PURE__ */
|
|
17459
|
-
onDelete && /* @__PURE__ */
|
|
17971
|
+
/* @__PURE__ */ jsxs31("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
17972
|
+
onDelete && /* @__PURE__ */ jsx32(
|
|
17460
17973
|
"button",
|
|
17461
17974
|
{
|
|
17462
17975
|
onClick: (e) => {
|
|
@@ -17471,10 +17984,10 @@ var MemoryPanel = ({
|
|
|
17471
17984
|
cursor: "pointer",
|
|
17472
17985
|
opacity: 0.5
|
|
17473
17986
|
},
|
|
17474
|
-
children: /* @__PURE__ */
|
|
17987
|
+
children: /* @__PURE__ */ jsx32(IconSvg, { name: "delete-bin-line", size: 14, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
17475
17988
|
}
|
|
17476
17989
|
),
|
|
17477
|
-
/* @__PURE__ */
|
|
17990
|
+
/* @__PURE__ */ jsx32(
|
|
17478
17991
|
IconSvg,
|
|
17479
17992
|
{
|
|
17480
17993
|
name: expandedId === item.id ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
@@ -17484,7 +17997,7 @@ var MemoryPanel = ({
|
|
|
17484
17997
|
)
|
|
17485
17998
|
] })
|
|
17486
17999
|
] }),
|
|
17487
|
-
expandedId === item.id && /* @__PURE__ */
|
|
18000
|
+
expandedId === item.id && /* @__PURE__ */ jsx32(
|
|
17488
18001
|
"div",
|
|
17489
18002
|
{
|
|
17490
18003
|
style: {
|
|
@@ -17492,7 +18005,7 @@ var MemoryPanel = ({
|
|
|
17492
18005
|
paddingTop: "12px",
|
|
17493
18006
|
borderTop: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
17494
18007
|
},
|
|
17495
|
-
children: /* @__PURE__ */
|
|
18008
|
+
children: /* @__PURE__ */ jsx32(
|
|
17496
18009
|
"p",
|
|
17497
18010
|
{
|
|
17498
18011
|
style: {
|
|
@@ -17517,6 +18030,7 @@ var MemoryPanel = ({
|
|
|
17517
18030
|
);
|
|
17518
18031
|
};
|
|
17519
18032
|
export {
|
|
18033
|
+
ArtifactCard,
|
|
17520
18034
|
ChatFloatingWidget,
|
|
17521
18035
|
ChatHeader,
|
|
17522
18036
|
ChatInput,
|