@gendive/chatllm 0.10.4 → 0.11.0

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.
@@ -1642,16 +1642,6 @@ var IconSvg = ({
1642
1642
 
1643
1643
  // src/react/components/ChatSidebar.tsx
1644
1644
  var import_jsx_runtime2 = require("react/jsx-runtime");
1645
- var formatDate = (timestamp) => {
1646
- const date = new Date(timestamp);
1647
- const now = /* @__PURE__ */ new Date();
1648
- const diff = now.getTime() - date.getTime();
1649
- const days = Math.floor(diff / (1e3 * 60 * 60 * 24));
1650
- if (days === 0) return "\uC624\uB298";
1651
- if (days === 1) return "\uC5B4\uC81C";
1652
- if (days < 7) return `${days}\uC77C \uC804`;
1653
- return date.toLocaleDateString("ko-KR");
1654
- };
1655
1645
  var ChatSidebar = ({
1656
1646
  sessions,
1657
1647
  currentSessionId,
@@ -1699,238 +1689,335 @@ var ChatSidebar = ({
1699
1689
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1700
1690
  "aside",
1701
1691
  {
1702
- className: `chatllm-sidebar ${isOpen ? "chatllm-sidebar--open" : "chatllm-sidebar--closed"}`,
1692
+ className: "chatllm-sidebar chatllm-sidebar-transition",
1703
1693
  style: {
1704
1694
  width: isOpen ? "288px" : "0",
1705
1695
  flexShrink: 0,
1706
- backgroundColor: "var(--chatllm-sidebar-bg, #ffffff)",
1707
- borderRight: "1px solid var(--chatllm-border, #e5e7eb)",
1708
- transition: "width 0.3s ease",
1709
- overflow: "hidden"
1696
+ backgroundColor: "var(--chatllm-sidebar-bg)",
1697
+ borderRight: isOpen ? "1px solid var(--chatllm-border)" : "none",
1698
+ overflow: "hidden",
1699
+ display: "flex",
1700
+ flexDirection: "column",
1701
+ zIndex: 20
1710
1702
  },
1711
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { width: "288px", height: "100%", display: "flex", flexDirection: "column" }, children: [
1712
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1713
- "div",
1714
- {
1715
- style: {
1716
- padding: "16px",
1717
- borderBottom: "1px solid var(--chatllm-border-light, #f3f4f6)"
1718
- },
1719
- children: [
1720
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "16px" }, children: [
1721
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1722
- "div",
1723
- {
1724
- style: {
1725
- width: "32px",
1726
- height: "32px",
1727
- borderRadius: "8px",
1728
- background: "linear-gradient(135deg, #3b82f6, #2563eb)",
1729
- display: "flex",
1730
- alignItems: "center",
1731
- justifyContent: "center"
1732
- },
1733
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "chat-1-line", size: 20, color: "#ffffff" })
1734
- }
1735
- ),
1736
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { fontWeight: 600, color: "var(--chatllm-text, #1f2937)" }, children: "ChatDive" })
1737
- ] }),
1738
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1739
- "button",
1740
- {
1741
- onClick: onNewSession,
1742
- style: {
1743
- width: "100%",
1744
- display: "flex",
1745
- alignItems: "center",
1746
- justifyContent: "center",
1747
- gap: "8px",
1748
- padding: "10px 16px",
1749
- backgroundColor: "var(--chatllm-primary, #3b82f6)",
1750
- color: "#ffffff",
1751
- border: "none",
1752
- borderRadius: "8px",
1753
- fontSize: "14px",
1754
- fontWeight: 500,
1755
- cursor: "pointer",
1756
- transition: "background-color 0.2s"
1757
- },
1758
- onMouseOver: (e) => {
1759
- e.currentTarget.style.backgroundColor = "var(--chatllm-primary-hover, #2563eb)";
1760
- },
1761
- onMouseOut: (e) => {
1762
- e.currentTarget.style.backgroundColor = "var(--chatllm-primary, #3b82f6)";
1763
- },
1764
- children: [
1765
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "add-line", size: 18, color: "#ffffff" }),
1766
- "\uC0C8 \uB300\uD654"
1767
- ]
1768
- }
1769
- )
1770
- ]
1771
- }
1772
- ),
1773
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { flex: 1, overflow: "auto", padding: "8px" }, children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1774
- "div",
1775
- {
1776
- style: {
1777
- padding: "24px 16px",
1778
- textAlign: "center",
1779
- color: "var(--chatllm-text-muted, #9ca3af)",
1780
- fontSize: "14px"
1781
- },
1782
- children: "\uB300\uD654 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"
1783
- }
1784
- ) : sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1785
- "div",
1786
- {
1787
- onClick: () => onSelectSession(session.id),
1788
- style: {
1789
- padding: "12px",
1790
- marginBottom: "4px",
1791
- borderRadius: "8px",
1792
- backgroundColor: session.id === currentSessionId ? "var(--chatllm-bg-active, #eff6ff)" : "transparent",
1793
- cursor: "pointer",
1794
- transition: "background-color 0.2s"
1795
- },
1796
- onMouseOver: (e) => {
1797
- if (session.id !== currentSessionId) {
1798
- e.currentTarget.style.backgroundColor = "var(--chatllm-bg-hover, #f9fafb)";
1703
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1704
+ "div",
1705
+ {
1706
+ style: {
1707
+ width: "288px",
1708
+ height: "100%",
1709
+ display: "flex",
1710
+ flexDirection: "column",
1711
+ padding: "24px"
1712
+ },
1713
+ children: [
1714
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1715
+ "div",
1716
+ {
1717
+ style: {
1718
+ display: "flex",
1719
+ alignItems: "center",
1720
+ justifyContent: "space-between",
1721
+ marginBottom: "40px"
1722
+ },
1723
+ children: [
1724
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
1725
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1726
+ "div",
1727
+ {
1728
+ style: {
1729
+ width: "28px",
1730
+ height: "28px",
1731
+ borderRadius: "6px",
1732
+ backgroundColor: "var(--chatllm-primary)",
1733
+ display: "flex",
1734
+ alignItems: "center",
1735
+ justifyContent: "center",
1736
+ boxShadow: "0 1px 2px rgba(0,0,0,0.05)"
1737
+ },
1738
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "chat-1-line", size: 16, color: "#ffffff" })
1739
+ }
1740
+ ),
1741
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1742
+ "span",
1743
+ {
1744
+ style: {
1745
+ fontSize: "14px",
1746
+ fontWeight: 700,
1747
+ textTransform: "uppercase",
1748
+ letterSpacing: "-0.01em",
1749
+ color: "var(--chatllm-text)"
1750
+ },
1751
+ children: "Intelligence"
1752
+ }
1753
+ )
1754
+ ] }),
1755
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1756
+ "button",
1757
+ {
1758
+ onClick: onToggle,
1759
+ "aria-label": "\uC0AC\uC774\uB4DC\uBC14 \uD1A0\uAE00",
1760
+ style: {
1761
+ padding: "6px",
1762
+ backgroundColor: "transparent",
1763
+ border: "none",
1764
+ borderRadius: "8px",
1765
+ cursor: "pointer",
1766
+ color: "var(--chatllm-text-muted)",
1767
+ transition: "background-color 0.2s"
1768
+ },
1769
+ onMouseOver: (e) => {
1770
+ e.currentTarget.style.backgroundColor = "var(--chatllm-bg-tertiary)";
1771
+ },
1772
+ onMouseOut: (e) => {
1773
+ e.currentTarget.style.backgroundColor = "transparent";
1774
+ },
1775
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "menu-line", size: 20 })
1776
+ }
1777
+ )
1778
+ ]
1799
1779
  }
1800
- },
1801
- onMouseOut: (e) => {
1802
- if (session.id !== currentSessionId) {
1803
- e.currentTarget.style.backgroundColor = "transparent";
1780
+ ),
1781
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1782
+ "button",
1783
+ {
1784
+ onClick: onNewSession,
1785
+ className: "chatllm-btn-primary",
1786
+ style: {
1787
+ display: "flex",
1788
+ alignItems: "center",
1789
+ justifyContent: "center",
1790
+ gap: "12px",
1791
+ padding: "12px 16px",
1792
+ marginBottom: "32px",
1793
+ borderRadius: "12px",
1794
+ fontSize: "14px",
1795
+ fontWeight: 600,
1796
+ cursor: "pointer"
1797
+ },
1798
+ children: [
1799
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "add-line", size: 20, color: "#ffffff" }),
1800
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "New conversation" })
1801
+ ]
1804
1802
  }
1805
- },
1806
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
1807
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
1808
- editingId === session.id ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1809
- "input",
1810
- {
1811
- ref: inputRef,
1812
- type: "text",
1813
- value: editingTitle,
1814
- onChange: (e) => setEditingTitle(e.target.value),
1815
- onKeyDown: handleKeyDown,
1816
- onBlur: handleSaveEdit,
1817
- onClick: (e) => e.stopPropagation(),
1818
- "aria-label": "\uC138\uC158 \uC81C\uBAA9 \uD3B8\uC9D1",
1819
- style: {
1820
- width: "100%",
1821
- padding: "4px 8px",
1822
- fontSize: "14px",
1823
- fontWeight: session.id === currentSessionId ? 500 : 400,
1824
- color: "var(--chatllm-text, #1f2937)",
1825
- backgroundColor: "var(--chatllm-bg, #ffffff)",
1826
- border: "1px solid var(--chatllm-primary, #3b82f6)",
1827
- borderRadius: "4px",
1828
- outline: "none"
1803
+ ),
1804
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1805
+ "div",
1806
+ {
1807
+ className: "chatllm-scrollbar",
1808
+ style: {
1809
+ flex: 1,
1810
+ overflow: "auto",
1811
+ display: "flex",
1812
+ flexDirection: "column"
1813
+ },
1814
+ children: sessions.length === 0 ? (
1815
+ /* Empty State */
1816
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1817
+ "div",
1818
+ {
1819
+ style: {
1820
+ flex: 1,
1821
+ display: "flex",
1822
+ flexDirection: "column",
1823
+ alignItems: "center",
1824
+ justifyContent: "center",
1825
+ textAlign: "center",
1826
+ padding: "16px"
1827
+ },
1828
+ children: [
1829
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1830
+ "div",
1831
+ {
1832
+ style: {
1833
+ width: "64px",
1834
+ height: "64px",
1835
+ borderRadius: "50%",
1836
+ backgroundColor: "var(--chatllm-bg-tertiary)",
1837
+ display: "flex",
1838
+ alignItems: "center",
1839
+ justifyContent: "center",
1840
+ marginBottom: "16px",
1841
+ color: "var(--chatllm-text-muted)"
1842
+ },
1843
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "history-line", size: 32 })
1844
+ }
1845
+ ),
1846
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1847
+ "p",
1848
+ {
1849
+ style: {
1850
+ fontSize: "14px",
1851
+ fontWeight: 600,
1852
+ color: "var(--chatllm-text-secondary)",
1853
+ marginBottom: "4px"
1854
+ },
1855
+ children: "No history yet"
1856
+ }
1857
+ ),
1858
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1859
+ "p",
1860
+ {
1861
+ style: {
1862
+ fontSize: "12px",
1863
+ color: "var(--chatllm-text-muted)"
1864
+ },
1865
+ children: "Your recent conversations will appear here."
1866
+ }
1867
+ )
1868
+ ]
1829
1869
  }
1830
- }
1831
- ) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1832
- "div",
1833
- {
1834
- style: {
1835
- fontWeight: session.id === currentSessionId ? 500 : 400,
1836
- color: "var(--chatllm-text, #1f2937)",
1837
- fontSize: "14px",
1838
- overflow: "hidden",
1839
- textOverflow: "ellipsis",
1840
- whiteSpace: "nowrap"
1841
- },
1842
- children: session.title
1843
- }
1844
- ),
1845
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1846
- "div",
1847
- {
1848
- style: {
1849
- fontSize: "12px",
1850
- color: "var(--chatllm-text-muted, #9ca3af)",
1851
- marginTop: "4px"
1852
- },
1853
- children: formatDate(session.updatedAt)
1854
- }
1855
- )
1856
- ] }),
1857
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", gap: "2px" }, children: [
1858
- onRenameSession && editingId !== session.id && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1859
- "button",
1860
- {
1861
- onClick: (e) => handleStartEdit(session, e),
1862
- "aria-label": "\uC81C\uBAA9 \uD3B8\uC9D1",
1863
- style: {
1864
- padding: "4px",
1865
- backgroundColor: "transparent",
1866
- border: "none",
1867
- borderRadius: "4px",
1868
- cursor: "pointer",
1869
- opacity: 0.5,
1870
- transition: "opacity 0.2s"
1871
- },
1872
- onMouseOver: (e) => {
1873
- e.currentTarget.style.opacity = "1";
1874
- },
1875
- onMouseOut: (e) => {
1876
- e.currentTarget.style.opacity = "0.5";
1877
- },
1878
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "pencil-line", size: 16, color: "var(--chatllm-text-muted, #9ca3af)" })
1879
- }
1880
- ),
1881
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1882
- "button",
1883
- {
1884
- onClick: (e) => {
1885
- e.stopPropagation();
1886
- onDeleteSession(session.id);
1887
- },
1888
- "aria-label": "\uC138\uC158 \uC0AD\uC81C",
1889
- style: {
1890
- padding: "4px",
1891
- backgroundColor: "transparent",
1892
- border: "none",
1893
- borderRadius: "4px",
1894
- cursor: "pointer",
1895
- opacity: 0.5,
1896
- transition: "opacity 0.2s"
1897
- },
1898
- onMouseOver: (e) => {
1899
- e.currentTarget.style.opacity = "1";
1900
- },
1901
- onMouseOut: (e) => {
1902
- e.currentTarget.style.opacity = "0.5";
1903
- },
1904
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "delete-bin-line", size: 16, color: "var(--chatllm-text-muted, #9ca3af)" })
1905
- }
1906
- )
1907
- ] })
1908
- ] })
1909
- },
1910
- session.id
1911
- )) }),
1912
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1913
- "button",
1914
- {
1915
- onClick: onToggle,
1916
- style: {
1917
- position: "absolute",
1918
- top: "16px",
1919
- right: "-40px",
1920
- width: "32px",
1921
- height: "32px",
1922
- backgroundColor: "var(--chatllm-bg, #ffffff)",
1923
- border: "1px solid var(--chatllm-border, #e5e7eb)",
1924
- borderRadius: "8px",
1925
- display: "flex",
1926
- alignItems: "center",
1927
- justifyContent: "center",
1928
- cursor: "pointer"
1929
- },
1930
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: isOpen ? "arrow-left-line" : "menu-line", size: 18 })
1931
- }
1932
- )
1933
- ] })
1870
+ )
1871
+ ) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
1872
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1873
+ "div",
1874
+ {
1875
+ style: {
1876
+ fontSize: "11px",
1877
+ fontWeight: 700,
1878
+ color: "var(--chatllm-text-muted)",
1879
+ textTransform: "uppercase",
1880
+ letterSpacing: "0.1em",
1881
+ marginBottom: "12px",
1882
+ padding: "0 8px"
1883
+ },
1884
+ children: "Recent activity"
1885
+ }
1886
+ ),
1887
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: sessions.map((session) => {
1888
+ const isSelected = session.id === currentSessionId;
1889
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1890
+ "div",
1891
+ {
1892
+ onClick: () => onSelectSession(session.id),
1893
+ style: {
1894
+ display: "flex",
1895
+ alignItems: "center",
1896
+ gap: "12px",
1897
+ padding: "10px 12px",
1898
+ borderRadius: "8px",
1899
+ backgroundColor: isSelected ? "var(--chatllm-bg-active)" : "transparent",
1900
+ border: isSelected ? "1px solid var(--chatllm-border-light)" : "1px solid transparent",
1901
+ cursor: "pointer",
1902
+ transition: "all 0.2s"
1903
+ },
1904
+ onMouseOver: (e) => {
1905
+ if (!isSelected) {
1906
+ e.currentTarget.style.backgroundColor = "var(--chatllm-bg-hover)";
1907
+ }
1908
+ },
1909
+ onMouseOut: (e) => {
1910
+ if (!isSelected) {
1911
+ e.currentTarget.style.backgroundColor = "transparent";
1912
+ }
1913
+ },
1914
+ children: [
1915
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1916
+ IconSvg,
1917
+ {
1918
+ name: "chat-1-line",
1919
+ size: 18,
1920
+ color: "var(--chatllm-text-muted)"
1921
+ }
1922
+ ),
1923
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { flex: 1, minWidth: 0 }, children: editingId === session.id ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1924
+ "input",
1925
+ {
1926
+ ref: inputRef,
1927
+ type: "text",
1928
+ value: editingTitle,
1929
+ onChange: (e) => setEditingTitle(e.target.value),
1930
+ onKeyDown: handleKeyDown,
1931
+ onBlur: handleSaveEdit,
1932
+ onClick: (e) => e.stopPropagation(),
1933
+ "aria-label": "\uC138\uC158 \uC81C\uBAA9 \uD3B8\uC9D1",
1934
+ style: {
1935
+ width: "100%",
1936
+ padding: "2px 6px",
1937
+ fontSize: "14px",
1938
+ fontWeight: 500,
1939
+ color: "var(--chatllm-text)",
1940
+ backgroundColor: "var(--chatllm-content-bg)",
1941
+ border: "1px solid var(--chatllm-primary)",
1942
+ borderRadius: "4px",
1943
+ outline: "none"
1944
+ }
1945
+ }
1946
+ ) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1947
+ "p",
1948
+ {
1949
+ style: {
1950
+ fontSize: "14px",
1951
+ fontWeight: 500,
1952
+ color: isSelected ? "var(--chatllm-text)" : "var(--chatllm-text-secondary)",
1953
+ overflow: "hidden",
1954
+ textOverflow: "ellipsis",
1955
+ whiteSpace: "nowrap",
1956
+ margin: 0
1957
+ },
1958
+ children: session.title
1959
+ }
1960
+ ) }),
1961
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1962
+ "div",
1963
+ {
1964
+ style: {
1965
+ display: "flex",
1966
+ gap: "2px",
1967
+ opacity: isSelected ? 1 : 0,
1968
+ transition: "opacity 0.2s"
1969
+ },
1970
+ className: "session-actions",
1971
+ children: [
1972
+ onRenameSession && editingId !== session.id && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1973
+ "button",
1974
+ {
1975
+ onClick: (e) => handleStartEdit(session, e),
1976
+ "aria-label": "\uC81C\uBAA9 \uD3B8\uC9D1",
1977
+ style: {
1978
+ padding: "4px",
1979
+ backgroundColor: "transparent",
1980
+ border: "none",
1981
+ borderRadius: "4px",
1982
+ cursor: "pointer",
1983
+ color: "var(--chatllm-text-muted)"
1984
+ },
1985
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "pencil-line", size: 14 })
1986
+ }
1987
+ ),
1988
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1989
+ "button",
1990
+ {
1991
+ onClick: (e) => {
1992
+ e.stopPropagation();
1993
+ onDeleteSession(session.id);
1994
+ },
1995
+ "aria-label": "\uC138\uC158 \uC0AD\uC81C",
1996
+ style: {
1997
+ padding: "4px",
1998
+ backgroundColor: "transparent",
1999
+ border: "none",
2000
+ borderRadius: "4px",
2001
+ cursor: "pointer",
2002
+ color: "var(--chatllm-text-muted)"
2003
+ },
2004
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconSvg, { name: "delete-bin-line", size: 14 })
2005
+ }
2006
+ )
2007
+ ]
2008
+ }
2009
+ )
2010
+ ]
2011
+ },
2012
+ session.id
2013
+ );
2014
+ }) })
2015
+ ] })
2016
+ }
2017
+ )
2018
+ ]
2019
+ }
2020
+ )
1934
2021
  }
1935
2022
  );
1936
2023
  };
@@ -2211,7 +2298,7 @@ var ChatInput = ({
2211
2298
  onSubmit,
2212
2299
  onStop,
2213
2300
  isLoading,
2214
- placeholder = "\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",
2301
+ placeholder = "Message or ask a question...",
2215
2302
  quotedText,
2216
2303
  onClearQuote,
2217
2304
  selectedAction,
@@ -2237,217 +2324,122 @@ var ChatInput = ({
2237
2324
  onActionSelect?.(action);
2238
2325
  setActionMenuOpen(false);
2239
2326
  };
2240
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2241
- "div",
2327
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2328
+ "footer",
2242
2329
  {
2243
- className: "chatllm-input-container",
2330
+ className: "chatllm-input-footer",
2244
2331
  style: {
2245
- padding: "16px 24px",
2246
- borderTop: "1px solid var(--chatllm-border, #e5e7eb)",
2247
- backgroundColor: "var(--chatllm-bg, #ffffff)"
2332
+ position: "absolute",
2333
+ bottom: 0,
2334
+ left: 0,
2335
+ right: 0,
2336
+ display: "flex",
2337
+ flexDirection: "column",
2338
+ alignItems: "center",
2339
+ paddingBottom: "40px",
2340
+ paddingTop: "64px",
2341
+ background: "linear-gradient(to top, var(--chatllm-bg) 60%, transparent)",
2342
+ pointerEvents: "none"
2248
2343
  },
2249
- children: [
2250
- (quotedText || selectedAction) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", gap: "8px", marginBottom: "12px", flexWrap: "wrap" }, children: [
2251
- quotedText && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2252
- "div",
2253
- {
2254
- style: {
2255
- display: "flex",
2256
- alignItems: "center",
2257
- gap: "8px",
2258
- padding: "8px 12px",
2259
- backgroundColor: "var(--chatllm-bg-secondary, #f9fafb)",
2260
- borderRadius: "8px",
2261
- borderLeft: "3px solid var(--chatllm-primary, #3b82f6)",
2262
- maxWidth: "100%"
2263
- },
2264
- children: [
2265
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "double-quotes-l", size: 14, color: "var(--chatllm-primary, #3b82f6)" }),
2266
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2267
- "span",
2268
- {
2269
- style: {
2270
- fontSize: "13px",
2271
- color: "var(--chatllm-text, #1f2937)",
2272
- overflow: "hidden",
2273
- textOverflow: "ellipsis",
2274
- whiteSpace: "nowrap",
2275
- maxWidth: "300px"
2276
- },
2277
- children: quotedText
2278
- }
2279
- ),
2280
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2281
- "button",
2282
- {
2283
- onClick: onClearQuote,
2284
- style: {
2285
- padding: "2px",
2286
- backgroundColor: "transparent",
2287
- border: "none",
2288
- borderRadius: "4px",
2289
- cursor: "pointer",
2290
- display: "flex",
2291
- alignItems: "center",
2292
- justifyContent: "center"
2293
- },
2294
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "close-line", size: 14, color: "var(--chatllm-text-muted, #9ca3af)" })
2295
- }
2296
- )
2297
- ]
2298
- }
2299
- ),
2300
- selectedAction && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2301
- "div",
2302
- {
2303
- style: {
2304
- display: "flex",
2305
- alignItems: "center",
2306
- gap: "6px",
2307
- padding: "6px 12px",
2308
- backgroundColor: "var(--chatllm-primary-light, #dbeafe)",
2309
- borderRadius: "16px",
2310
- fontSize: "13px",
2311
- fontWeight: 500,
2312
- color: "var(--chatllm-primary, #3b82f6)"
2313
- },
2314
- children: [
2315
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "sparkling-line", size: 14, color: "var(--chatllm-primary, #3b82f6)" }),
2316
- selectedAction.label,
2317
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2318
- "button",
2319
- {
2320
- onClick: onClearAction,
2321
- style: {
2322
- padding: "2px",
2323
- backgroundColor: "transparent",
2324
- border: "none",
2325
- borderRadius: "4px",
2326
- cursor: "pointer",
2327
- display: "flex",
2328
- alignItems: "center",
2329
- justifyContent: "center"
2330
- },
2331
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "close-line", size: 14, color: "var(--chatllm-primary, #3b82f6)" })
2332
- }
2333
- )
2334
- ]
2335
- }
2336
- )
2337
- ] }),
2338
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2339
- "div",
2340
- {
2341
- style: {
2342
- display: "flex",
2343
- alignItems: "flex-end",
2344
- gap: "12px",
2345
- padding: "12px 16px",
2346
- backgroundColor: "var(--chatllm-input-bg, #f9fafb)",
2347
- borderRadius: "16px",
2348
- border: "1px solid var(--chatllm-border, #e5e7eb)",
2349
- transition: "border-color 0.2s, box-shadow 0.2s"
2350
- },
2351
- children: [
2352
- actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { position: "relative" }, children: [
2353
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2354
- "button",
2355
- {
2356
- onClick: () => setActionMenuOpen(!actionMenuOpen),
2357
- style: {
2358
- width: "36px",
2359
- height: "36px",
2360
- display: "flex",
2361
- alignItems: "center",
2362
- justifyContent: "center",
2363
- backgroundColor: "var(--chatllm-bg, #ffffff)",
2364
- border: "1px solid var(--chatllm-border, #e5e7eb)",
2365
- borderRadius: "8px",
2366
- cursor: "pointer",
2367
- transition: "background-color 0.2s"
2368
- },
2369
- onMouseOver: (e) => {
2370
- e.currentTarget.style.backgroundColor = "var(--chatllm-bg-hover, #f3f4f6)";
2371
- },
2372
- onMouseOut: (e) => {
2373
- e.currentTarget.style.backgroundColor = "var(--chatllm-bg, #ffffff)";
2374
- },
2375
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "add-line", size: 20, color: "var(--chatllm-text, #1f2937)" })
2376
- }
2377
- ),
2378
- actionMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2379
- "div",
2380
- {
2381
- style: {
2382
- position: "absolute",
2383
- bottom: "100%",
2384
- left: 0,
2385
- marginBottom: "8px",
2386
- backgroundColor: "var(--chatllm-bg, #ffffff)",
2387
- borderRadius: "12px",
2388
- boxShadow: "0 4px 24px rgba(0, 0, 0, 0.12)",
2389
- border: "1px solid var(--chatllm-border, #e5e7eb)",
2390
- padding: "8px",
2391
- minWidth: "200px",
2392
- zIndex: 100
2393
- },
2394
- children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2344
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2345
+ "div",
2346
+ {
2347
+ style: {
2348
+ width: "100%",
2349
+ maxWidth: "820px",
2350
+ padding: "0 24px",
2351
+ pointerEvents: "auto"
2352
+ },
2353
+ children: [
2354
+ (quotedText || selectedAction) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", gap: "8px", marginBottom: "12px", flexWrap: "wrap" }, children: [
2355
+ quotedText && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2356
+ "div",
2357
+ {
2358
+ style: {
2359
+ display: "flex",
2360
+ alignItems: "center",
2361
+ gap: "8px",
2362
+ padding: "8px 12px",
2363
+ backgroundColor: "var(--chatllm-content-bg)",
2364
+ borderRadius: "12px",
2365
+ border: "1px solid var(--chatllm-border)",
2366
+ maxWidth: "100%"
2367
+ },
2368
+ children: [
2369
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "double-quotes-l", size: 14, color: "var(--chatllm-primary)" }),
2370
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2371
+ "span",
2372
+ {
2373
+ style: {
2374
+ fontSize: "13px",
2375
+ color: "var(--chatllm-text)",
2376
+ overflow: "hidden",
2377
+ textOverflow: "ellipsis",
2378
+ whiteSpace: "nowrap",
2379
+ maxWidth: "300px"
2380
+ },
2381
+ children: quotedText
2382
+ }
2383
+ ),
2384
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2395
2385
  "button",
2396
2386
  {
2397
- onClick: () => handleActionSelect(action),
2387
+ onClick: onClearQuote,
2398
2388
  style: {
2399
- width: "100%",
2389
+ padding: "2px",
2390
+ backgroundColor: "transparent",
2391
+ border: "none",
2392
+ borderRadius: "4px",
2393
+ cursor: "pointer",
2400
2394
  display: "flex",
2401
2395
  alignItems: "center",
2402
- gap: "12px",
2403
- padding: "10px 12px",
2396
+ justifyContent: "center"
2397
+ },
2398
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "close-line", size: 14, color: "var(--chatllm-text-muted)" })
2399
+ }
2400
+ )
2401
+ ]
2402
+ }
2403
+ ),
2404
+ selectedAction && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2405
+ "div",
2406
+ {
2407
+ style: {
2408
+ display: "flex",
2409
+ alignItems: "center",
2410
+ gap: "6px",
2411
+ padding: "8px 14px",
2412
+ backgroundColor: "var(--chatllm-primary-light)",
2413
+ borderRadius: "9999px",
2414
+ fontSize: "13px",
2415
+ fontWeight: 500,
2416
+ color: "var(--chatllm-primary)"
2417
+ },
2418
+ children: [
2419
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "sparkling-line", size: 14, color: "var(--chatllm-primary)" }),
2420
+ selectedAction.label,
2421
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2422
+ "button",
2423
+ {
2424
+ onClick: onClearAction,
2425
+ style: {
2426
+ padding: "2px",
2404
2427
  backgroundColor: "transparent",
2405
2428
  border: "none",
2406
- borderRadius: "8px",
2429
+ borderRadius: "4px",
2407
2430
  cursor: "pointer",
2408
- textAlign: "left",
2409
- transition: "background-color 0.2s"
2410
- },
2411
- onMouseOver: (e) => {
2412
- e.currentTarget.style.backgroundColor = "var(--chatllm-bg-hover, #f3f4f6)";
2413
- },
2414
- onMouseOut: (e) => {
2415
- e.currentTarget.style.backgroundColor = "transparent";
2431
+ display: "flex",
2432
+ alignItems: "center",
2433
+ justifyContent: "center"
2416
2434
  },
2417
- children: [
2418
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2419
- "div",
2420
- {
2421
- style: {
2422
- width: "32px",
2423
- height: "32px",
2424
- display: "flex",
2425
- alignItems: "center",
2426
- justifyContent: "center",
2427
- backgroundColor: "var(--chatllm-primary-light, #dbeafe)",
2428
- borderRadius: "8px"
2429
- },
2430
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2431
- IconSvg,
2432
- {
2433
- name: action.icon === "search" ? "search-line" : action.icon === "image" ? "image-line" : action.icon === "code" ? "code-s-slash-line" : "file-text-line",
2434
- size: 18,
2435
- color: "var(--chatllm-primary, #3b82f6)"
2436
- }
2437
- )
2438
- }
2439
- ),
2440
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
2441
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text, #1f2937)" }, children: action.label }),
2442
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: action.description })
2443
- ] })
2444
- ]
2445
- },
2446
- action.id
2447
- ))
2448
- }
2449
- )
2450
- ] }),
2435
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "close-line", size: 14, color: "var(--chatllm-primary)" })
2436
+ }
2437
+ )
2438
+ ]
2439
+ }
2440
+ )
2441
+ ] }),
2442
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "chatllm-input-container", children: [
2451
2443
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2452
2444
  "textarea",
2453
2445
  {
@@ -2458,65 +2450,221 @@ var ChatInput = ({
2458
2450
  placeholder,
2459
2451
  rows: 1,
2460
2452
  style: {
2461
- flex: 1,
2462
- minHeight: "24px",
2453
+ width: "100%",
2454
+ minHeight: "60px",
2463
2455
  maxHeight: "200px",
2464
- padding: "6px 0",
2456
+ padding: "24px 32px 8px 32px",
2465
2457
  backgroundColor: "transparent",
2466
2458
  border: "none",
2467
2459
  outline: "none",
2468
- fontSize: "15px",
2460
+ fontSize: "16px",
2469
2461
  lineHeight: "1.5",
2470
2462
  resize: "none",
2471
- color: "var(--chatllm-text, #1f2937)"
2463
+ color: "var(--chatllm-text)"
2472
2464
  }
2473
2465
  }
2474
2466
  ),
2475
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2476
- "button",
2467
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2468
+ "div",
2477
2469
  {
2478
- onClick: onStop,
2479
2470
  style: {
2480
- width: "36px",
2481
- height: "36px",
2482
2471
  display: "flex",
2483
2472
  alignItems: "center",
2484
- justifyContent: "center",
2485
- backgroundColor: "var(--chatllm-error, #ef4444)",
2486
- border: "none",
2487
- borderRadius: "8px",
2488
- cursor: "pointer",
2489
- transition: "background-color 0.2s"
2473
+ justifyContent: "space-between",
2474
+ padding: "0 24px 20px 24px"
2490
2475
  },
2491
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "stop-circle-line", size: 20, color: "#ffffff" })
2492
- }
2493
- ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2494
- "button",
2495
- {
2496
- onClick: onSubmit,
2497
- disabled: !value.trim(),
2498
- style: {
2499
- width: "36px",
2500
- height: "36px",
2501
- display: "flex",
2502
- alignItems: "center",
2503
- justifyContent: "center",
2504
- backgroundColor: value.trim() ? "var(--chatllm-primary, #3b82f6)" : "var(--chatllm-bg-disabled, #e5e7eb)",
2505
- border: "none",
2506
- borderRadius: "8px",
2507
- cursor: value.trim() ? "pointer" : "not-allowed",
2508
- transition: "background-color 0.2s"
2509
- },
2510
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "send-plane-fill", size: 18, color: value.trim() ? "#ffffff" : "#9ca3af" })
2476
+ children: [
2477
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
2478
+ actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { position: "relative" }, children: [
2479
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2480
+ "button",
2481
+ {
2482
+ onClick: () => setActionMenuOpen(!actionMenuOpen),
2483
+ style: iconButtonStyle,
2484
+ title: "\uAE30\uB2A5 \uCD94\uAC00",
2485
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "add-line", size: 22, color: "var(--chatllm-text-muted)" })
2486
+ }
2487
+ ),
2488
+ actionMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2489
+ "div",
2490
+ {
2491
+ style: {
2492
+ position: "absolute",
2493
+ bottom: "100%",
2494
+ left: 0,
2495
+ marginBottom: "8px",
2496
+ backgroundColor: "var(--chatllm-content-bg)",
2497
+ borderRadius: "16px",
2498
+ boxShadow: "var(--chatllm-shadow-sheet)",
2499
+ border: "1px solid var(--chatllm-border)",
2500
+ padding: "8px",
2501
+ minWidth: "220px",
2502
+ zIndex: 100
2503
+ },
2504
+ children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2505
+ "button",
2506
+ {
2507
+ onClick: () => handleActionSelect(action),
2508
+ style: {
2509
+ width: "100%",
2510
+ display: "flex",
2511
+ alignItems: "center",
2512
+ gap: "12px",
2513
+ padding: "12px",
2514
+ backgroundColor: "transparent",
2515
+ border: "none",
2516
+ borderRadius: "12px",
2517
+ cursor: "pointer",
2518
+ textAlign: "left",
2519
+ transition: "background-color 0.2s"
2520
+ },
2521
+ onMouseOver: (e) => {
2522
+ e.currentTarget.style.backgroundColor = "var(--chatllm-bg-hover)";
2523
+ },
2524
+ onMouseOut: (e) => {
2525
+ e.currentTarget.style.backgroundColor = "transparent";
2526
+ },
2527
+ children: [
2528
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2529
+ "div",
2530
+ {
2531
+ style: {
2532
+ width: "36px",
2533
+ height: "36px",
2534
+ display: "flex",
2535
+ alignItems: "center",
2536
+ justifyContent: "center",
2537
+ backgroundColor: "var(--chatllm-primary-light)",
2538
+ borderRadius: "10px"
2539
+ },
2540
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2541
+ IconSvg,
2542
+ {
2543
+ name: action.icon === "search" ? "search-line" : action.icon === "image" ? "image-line" : action.icon === "code" ? "code-s-slash-line" : "file-text-line",
2544
+ size: 20,
2545
+ color: "var(--chatllm-primary)"
2546
+ }
2547
+ )
2548
+ }
2549
+ ),
2550
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
2551
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { fontSize: "14px", fontWeight: 600, color: "var(--chatllm-text)" }, children: action.label }),
2552
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { fontSize: "12px", color: "var(--chatllm-text-muted)" }, children: action.description })
2553
+ ] })
2554
+ ]
2555
+ },
2556
+ action.id
2557
+ ))
2558
+ }
2559
+ )
2560
+ ] }),
2561
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { style: iconButtonStyle, title: "\uD30C\uC77C \uCCA8\uBD80", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "attachment-line", size: 22, color: "var(--chatllm-text-muted)" }) }),
2562
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { width: "1px", height: "20px", backgroundColor: "var(--chatllm-border-light)", margin: "0 4px" } }),
2563
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { style: iconButtonStyle, title: "AI \uAE30\uB2A5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "magic-line", size: 22, color: "var(--chatllm-text-muted)" }) })
2564
+ ] }),
2565
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2566
+ "button",
2567
+ {
2568
+ onClick: onStop,
2569
+ style: {
2570
+ display: "flex",
2571
+ alignItems: "center",
2572
+ justifyContent: "center",
2573
+ height: "48px",
2574
+ padding: "0 32px",
2575
+ backgroundColor: "var(--chatllm-bg-tertiary)",
2576
+ border: "1px solid var(--chatllm-border)",
2577
+ borderRadius: "12px",
2578
+ cursor: "pointer",
2579
+ transition: "all 0.2s",
2580
+ gap: "8px"
2581
+ },
2582
+ children: [
2583
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2584
+ "span",
2585
+ {
2586
+ style: {
2587
+ fontSize: "14px",
2588
+ fontWeight: 700,
2589
+ color: "var(--chatllm-text-secondary)",
2590
+ textTransform: "uppercase",
2591
+ letterSpacing: "0.02em"
2592
+ },
2593
+ children: "Stop"
2594
+ }
2595
+ ),
2596
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "stop-circle-line", size: 18, color: "var(--chatllm-text-secondary)" })
2597
+ ]
2598
+ }
2599
+ ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2600
+ "button",
2601
+ {
2602
+ onClick: onSubmit,
2603
+ disabled: !value.trim(),
2604
+ className: "chatllm-btn-primary",
2605
+ style: {
2606
+ display: "flex",
2607
+ alignItems: "center",
2608
+ justifyContent: "center",
2609
+ height: "48px",
2610
+ padding: "0 32px",
2611
+ borderRadius: "12px",
2612
+ cursor: value.trim() ? "pointer" : "not-allowed",
2613
+ opacity: value.trim() ? 1 : 0.5,
2614
+ gap: "8px"
2615
+ },
2616
+ children: [
2617
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2618
+ "span",
2619
+ {
2620
+ style: {
2621
+ fontSize: "14px",
2622
+ fontWeight: 700,
2623
+ letterSpacing: "0.02em"
2624
+ },
2625
+ children: "Send message"
2626
+ }
2627
+ ),
2628
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconSvg, { name: "arrow-up-s-line", size: 20, color: "#ffffff" })
2629
+ ]
2630
+ }
2631
+ )
2632
+ ]
2511
2633
  }
2512
2634
  )
2513
- ]
2514
- }
2515
- )
2516
- ]
2635
+ ] }),
2636
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2637
+ "p",
2638
+ {
2639
+ style: {
2640
+ fontSize: "10px",
2641
+ textAlign: "center",
2642
+ marginTop: "16px",
2643
+ color: "var(--chatllm-text-muted)",
2644
+ fontWeight: 700,
2645
+ textTransform: "uppercase",
2646
+ letterSpacing: "0.15em"
2647
+ },
2648
+ children: "AI Professional Assistant \u2022 Secured by Canvas"
2649
+ }
2650
+ )
2651
+ ]
2652
+ }
2653
+ )
2517
2654
  }
2518
2655
  );
2519
2656
  };
2657
+ var iconButtonStyle = {
2658
+ padding: "10px",
2659
+ backgroundColor: "transparent",
2660
+ border: "none",
2661
+ borderRadius: "12px",
2662
+ cursor: "pointer",
2663
+ display: "flex",
2664
+ alignItems: "center",
2665
+ justifyContent: "center",
2666
+ transition: "background-color 0.2s, color 0.2s"
2667
+ };
2520
2668
 
2521
2669
  // src/react/components/MessageList.tsx
2522
2670
  var import_react10 = require("react");
@@ -3742,356 +3890,395 @@ var MessageBubble = ({
3742
3890
  if (text && text.length > 0) {
3743
3891
  }
3744
3892
  };
3745
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3893
+ if (isUser) {
3894
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3895
+ "div",
3896
+ {
3897
+ className: "chatllm-message chatllm-message--user",
3898
+ style: {
3899
+ display: "flex",
3900
+ justifyContent: "flex-end",
3901
+ padding: "16px 24px"
3902
+ },
3903
+ onMouseEnter: () => setShowActions(true),
3904
+ onMouseLeave: () => setShowActions(false),
3905
+ onMouseUp: handleMouseUp,
3906
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3907
+ "div",
3908
+ {
3909
+ style: {
3910
+ maxWidth: "80%",
3911
+ backgroundColor: "var(--chatllm-user-bubble)",
3912
+ padding: "16px 24px",
3913
+ borderRadius: "16px",
3914
+ borderTopRightRadius: "4px"
3915
+ },
3916
+ children: [
3917
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3918
+ "div",
3919
+ {
3920
+ style: {
3921
+ fontSize: "15px",
3922
+ lineHeight: "1.6",
3923
+ color: "var(--chatllm-text)",
3924
+ whiteSpace: "pre-wrap"
3925
+ },
3926
+ children: displayContent
3927
+ }
3928
+ ),
3929
+ showActions && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3930
+ "div",
3931
+ {
3932
+ style: {
3933
+ display: "flex",
3934
+ gap: "4px",
3935
+ marginTop: "12px",
3936
+ justifyContent: "flex-end"
3937
+ },
3938
+ children: [
3939
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: onCopy, style: actionButtonStyle, title: "\uBCF5\uC0AC", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3940
+ IconSvg,
3941
+ {
3942
+ name: isCopied ? "check-line" : "file-copy-line",
3943
+ size: 14,
3944
+ color: isCopied ? "var(--chatllm-success)" : "var(--chatllm-text-muted)"
3945
+ }
3946
+ ) }),
3947
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: onEdit, style: actionButtonStyle, title: "\uC218\uC815", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "edit-line", size: 14, color: "var(--chatllm-text-muted)" }) }),
3948
+ onAskOtherModel && otherModels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { position: "relative" }, children: [
3949
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3950
+ "button",
3951
+ {
3952
+ onClick: () => setShowModelMenu(!showModelMenu),
3953
+ style: actionButtonStyle,
3954
+ title: "\uB2E4\uB978 \uBAA8\uB378\uC5D0\uAC8C \uC9C8\uBB38",
3955
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "robot-line", size: 14, color: "var(--chatllm-text-muted)" })
3956
+ }
3957
+ ),
3958
+ showModelMenu && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3959
+ ModelMenu,
3960
+ {
3961
+ models: otherModels,
3962
+ onSelect: (modelId) => {
3963
+ onAskOtherModel(modelId);
3964
+ setShowModelMenu(false);
3965
+ },
3966
+ onClose: () => setShowModelMenu(false)
3967
+ }
3968
+ )
3969
+ ] })
3970
+ ]
3971
+ }
3972
+ ),
3973
+ relevantAlternatives && relevantAlternatives.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3974
+ "div",
3975
+ {
3976
+ style: {
3977
+ display: "flex",
3978
+ alignItems: "center",
3979
+ gap: "8px",
3980
+ marginTop: "12px",
3981
+ justifyContent: "flex-end"
3982
+ },
3983
+ children: [
3984
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3985
+ "button",
3986
+ {
3987
+ onClick: () => onAlternativeChange?.(Math.max(0, relevantActiveIndex - 1)),
3988
+ disabled: relevantActiveIndex === 0,
3989
+ style: {
3990
+ ...navButtonStyle,
3991
+ opacity: relevantActiveIndex === 0 ? 0.5 : 1,
3992
+ cursor: relevantActiveIndex === 0 ? "not-allowed" : "pointer"
3993
+ },
3994
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "arrow-left-line", size: 12 })
3995
+ }
3996
+ ),
3997
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted)" }, children: [
3998
+ relevantActiveIndex + 1,
3999
+ " / ",
4000
+ relevantAlternatives.length + 1
4001
+ ] }),
4002
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4003
+ "button",
4004
+ {
4005
+ onClick: () => onAlternativeChange?.(Math.min(relevantAlternatives.length, relevantActiveIndex + 1)),
4006
+ disabled: relevantActiveIndex === relevantAlternatives.length,
4007
+ style: {
4008
+ ...navButtonStyle,
4009
+ opacity: relevantActiveIndex === relevantAlternatives.length ? 0.5 : 1,
4010
+ cursor: relevantActiveIndex === relevantAlternatives.length ? "not-allowed" : "pointer"
4011
+ },
4012
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "arrow-right-line", size: 12 })
4013
+ }
4014
+ )
4015
+ ]
4016
+ }
4017
+ )
4018
+ ]
4019
+ }
4020
+ )
4021
+ }
4022
+ );
4023
+ }
4024
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3746
4025
  "div",
3747
4026
  {
3748
- className: `chatllm-message chatllm-message--${message.role}`,
4027
+ className: "chatllm-message chatllm-message--assistant",
3749
4028
  style: {
3750
4029
  display: "flex",
3751
- gap: "12px",
3752
- padding: "16px 24px",
3753
- backgroundColor: isUser ? "transparent" : "var(--chatllm-bg-secondary, #f9fafb)"
4030
+ justifyContent: "flex-start",
4031
+ padding: "16px 24px"
3754
4032
  },
3755
4033
  onMouseEnter: () => setShowActions(true),
3756
4034
  onMouseLeave: () => setShowActions(false),
3757
4035
  onMouseUp: handleMouseUp,
3758
- children: [
3759
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3760
- "div",
3761
- {
3762
- style: {
3763
- width: "32px",
3764
- height: "32px",
3765
- borderRadius: "8px",
3766
- backgroundColor: isUser ? "var(--chatllm-user-avatar, #e5e7eb)" : "var(--chatllm-assistant-avatar, #dbeafe)",
3767
- display: "flex",
3768
- alignItems: "center",
3769
- justifyContent: "center",
3770
- flexShrink: 0
3771
- },
3772
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3773
- IconSvg,
4036
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
4037
+ "div",
4038
+ {
4039
+ className: "chatllm-sheet",
4040
+ style: {
4041
+ width: "100%",
4042
+ padding: "32px",
4043
+ display: "flex",
4044
+ gap: "24px"
4045
+ },
4046
+ children: [
4047
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4048
+ "div",
3774
4049
  {
3775
- name: isUser ? "user-3-line" : "robot-line",
3776
- size: 18,
3777
- color: isUser ? "var(--chatllm-text-muted, #6b7280)" : "var(--chatllm-primary, #3b82f6)"
4050
+ style: {
4051
+ width: "40px",
4052
+ height: "40px",
4053
+ borderRadius: "12px",
4054
+ backgroundColor: "var(--chatllm-primary-light)",
4055
+ display: "flex",
4056
+ alignItems: "center",
4057
+ justifyContent: "center",
4058
+ color: "var(--chatllm-primary)"
4059
+ },
4060
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "magic-line", size: 24 })
3778
4061
  }
3779
- )
3780
- }
3781
- ),
3782
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
3783
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3784
- "div",
3785
- {
3786
- style: {
3787
- display: "flex",
3788
- alignItems: "center",
3789
- gap: "8px",
3790
- marginBottom: "8px"
3791
- },
3792
- children: [
3793
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3794
- "span",
3795
- {
3796
- style: {
3797
- fontSize: "14px",
3798
- fontWeight: 500,
3799
- color: "var(--chatllm-text, #1f2937)"
3800
- },
3801
- children: isUser ? "\uB098" : "AI"
3802
- }
3803
- ),
3804
- displayModel && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3805
- "span",
3806
- {
3807
- style: {
3808
- fontSize: "12px",
3809
- padding: "2px 8px",
3810
- backgroundColor: "var(--chatllm-bg-tertiary, #f3f4f6)",
3811
- borderRadius: "4px",
3812
- color: "var(--chatllm-text-muted, #6b7280)"
3813
- },
3814
- children: displayModel
3815
- }
3816
- )
3817
- ]
3818
- }
3819
- ),
3820
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3821
- "div",
3822
- {
3823
- style: {
3824
- wordBreak: "break-word"
3825
- },
3826
- children: [
3827
- isAssistant ? (
3828
- // AI 메시지는 마크다운 렌더링
3829
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3830
- MarkdownRenderer,
3831
- {
3832
- content: displayContent,
3833
- onChoiceClick,
3834
- showThinking,
3835
- thinkingDefaultOpen
3836
- }
3837
- )
3838
- ) : (
3839
- // 사용자 메시지는 일반 텍스트
3840
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3841
- "div",
3842
- {
3843
- style: {
3844
- fontSize: "15px",
3845
- lineHeight: "1.7",
3846
- color: "var(--chatllm-text, #374151)",
3847
- whiteSpace: "pre-wrap"
3848
- },
3849
- children: displayContent
3850
- }
3851
- )
3852
- ),
3853
- isLoading && isAssistant && !displayContent && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3854
- "span",
3855
- {
3856
- style: {
3857
- display: "inline-flex",
3858
- gap: "4px"
3859
- },
3860
- children: [
3861
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "chatllm-typing-dot", style: dotStyle }),
3862
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "chatllm-typing-dot", style: { ...dotStyle, animationDelay: "0.2s" } }),
3863
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "chatllm-typing-dot", style: { ...dotStyle, animationDelay: "0.4s" } })
3864
- ]
3865
- }
3866
- )
3867
- ]
3868
- }
3869
- ),
3870
- displaySources && displaySources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3871
- "div",
3872
- {
3873
- style: {
3874
- display: "flex",
3875
- flexWrap: "wrap",
3876
- gap: "8px",
3877
- marginTop: "12px",
3878
- paddingTop: "12px",
3879
- borderTop: "1px solid var(--chatllm-border-light, #f3f4f6)"
3880
- },
3881
- children: [
3882
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3883
- "span",
3884
- {
3885
- style: {
3886
- fontSize: "12px",
3887
- fontWeight: 500,
3888
- color: "var(--chatllm-text-muted, #9ca3af)",
3889
- marginRight: "4px"
3890
- },
3891
- children: "\uCD9C\uCC98:"
3892
- }
3893
- ),
3894
- displaySources.map((source, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3895
- LinkChip,
3896
- {
3897
- text: source.title,
3898
- url: source.url,
3899
- index: index + 1,
3900
- showFavicon: true
4062
+ ) }),
4063
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
4064
+ displayModel && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4065
+ "div",
4066
+ {
4067
+ style: {
4068
+ display: "flex",
4069
+ alignItems: "center",
4070
+ gap: "8px",
4071
+ marginBottom: "16px"
3901
4072
  },
3902
- source.id
3903
- ))
3904
- ]
3905
- }
3906
- ),
3907
- isUser && relevantAlternatives && relevantAlternatives.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3908
- "div",
3909
- {
3910
- style: {
3911
- display: "flex",
3912
- alignItems: "center",
3913
- gap: "8px",
3914
- marginTop: "12px",
3915
- paddingTop: "12px",
3916
- borderTop: "1px solid var(--chatllm-border-light, #f3f4f6)"
3917
- },
3918
- children: [
3919
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3920
- "button",
3921
- {
3922
- onClick: () => onAlternativeChange?.(Math.max(0, relevantActiveIndex - 1)),
3923
- disabled: relevantActiveIndex === 0,
3924
- style: {
3925
- ...navButtonStyle,
3926
- opacity: relevantActiveIndex === 0 ? 0.5 : 1,
3927
- cursor: relevantActiveIndex === 0 ? "not-allowed" : "pointer"
3928
- },
3929
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "arrow-left-line", size: 14 })
3930
- }
3931
- ),
3932
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: [
3933
- relevantActiveIndex + 1,
3934
- " / ",
3935
- relevantAlternatives.length + 1
3936
- ] }),
3937
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3938
- "button",
3939
- {
3940
- onClick: () => onAlternativeChange?.(Math.min(relevantAlternatives.length, relevantActiveIndex + 1)),
3941
- disabled: relevantActiveIndex === relevantAlternatives.length,
3942
- style: {
3943
- ...navButtonStyle,
3944
- opacity: relevantActiveIndex === relevantAlternatives.length ? 0.5 : 1,
3945
- cursor: relevantActiveIndex === relevantAlternatives.length ? "not-allowed" : "pointer"
3946
- },
3947
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "arrow-right-line", size: 14 })
3948
- }
3949
- )
3950
- ]
3951
- }
3952
- ),
3953
- showActions && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3954
- "div",
3955
- {
3956
- style: {
3957
- display: "flex",
3958
- gap: "4px",
3959
- marginTop: "12px"
3960
- },
3961
- children: [
3962
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: onCopy, style: actionButtonStyle, title: "\uBCF5\uC0AC", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3963
- IconSvg,
3964
- {
3965
- name: isCopied ? "check-line" : "file-copy-line",
3966
- size: 16,
3967
- color: isCopied ? "var(--chatllm-success, #22c55e)" : "var(--chatllm-text-muted, #9ca3af)"
3968
- }
3969
- ) }),
3970
- isUser && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: onEdit, style: actionButtonStyle, title: "\uC218\uC815", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "edit-line", size: 16, color: "var(--chatllm-text-muted, #9ca3af)" }) }),
3971
- isAssistant && onRegenerate && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: onRegenerate, style: actionButtonStyle, title: "\uB2E4\uC2DC \uC0DD\uC131", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "refresh-line", size: 16, color: "var(--chatllm-text-muted, #9ca3af)" }) }),
3972
- isUser && onAskOtherModel && otherModels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { position: "relative" }, children: [
3973
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3974
- "button",
3975
- {
3976
- onClick: () => setShowModelMenu(!showModelMenu),
3977
- style: actionButtonStyle,
3978
- title: "\uB2E4\uB978 \uBAA8\uB378\uC5D0\uAC8C \uC9C8\uBB38",
3979
- children: [
3980
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "robot-line", size: 16, color: "var(--chatllm-text-muted, #9ca3af)" }),
3981
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3982
- IconSvg,
3983
- {
3984
- name: "arrow-down-s-line",
3985
- size: 12,
3986
- color: "var(--chatllm-text-muted, #9ca3af)",
3987
- style: { marginLeft: "2px" }
3988
- }
3989
- )
3990
- ]
3991
- }
3992
- ),
3993
- showModelMenu && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
3994
- "div",
4073
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4074
+ "span",
3995
4075
  {
3996
4076
  style: {
3997
- position: "absolute",
3998
- bottom: "100%",
3999
- left: 0,
4000
- marginBottom: "4px",
4001
- backgroundColor: "var(--chatllm-bg, #ffffff)",
4002
- border: "1px solid var(--chatllm-border, #e5e7eb)",
4003
- borderRadius: "8px",
4004
- boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
4005
- minWidth: "160px",
4006
- zIndex: 100,
4007
- overflow: "hidden"
4008
- },
4009
- onMouseLeave: () => setShowModelMenu(false),
4010
- children: [
4011
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4012
- "div",
4013
- {
4014
- style: {
4015
- padding: "8px 12px",
4016
- fontSize: "11px",
4017
- fontWeight: 600,
4018
- color: "var(--chatllm-text-muted, #9ca3af)",
4019
- textTransform: "uppercase",
4020
- borderBottom: "1px solid var(--chatllm-border-light, #f3f4f6)"
4021
- },
4022
- children: "\uB2E4\uB978 \uBAA8\uB378\uC5D0\uAC8C \uC9C8\uBB38"
4023
- }
4024
- ),
4025
- otherModels.map((model) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
4026
- "button",
4027
- {
4028
- onClick: () => {
4029
- onAskOtherModel(model.id);
4030
- setShowModelMenu(false);
4031
- },
4032
- style: {
4033
- width: "100%",
4034
- padding: "10px 12px",
4035
- display: "flex",
4036
- alignItems: "center",
4037
- gap: "8px",
4038
- backgroundColor: "transparent",
4039
- border: "none",
4040
- cursor: "pointer",
4041
- fontSize: "13px",
4042
- color: "var(--chatllm-text, #1f2937)",
4043
- textAlign: "left"
4044
- },
4045
- onMouseEnter: (e) => {
4046
- e.currentTarget.style.backgroundColor = "var(--chatllm-bg-hover, #f3f4f6)";
4047
- },
4048
- onMouseLeave: (e) => {
4049
- e.currentTarget.style.backgroundColor = "transparent";
4050
- },
4051
- children: [
4052
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "robot-line", size: 14, color: "var(--chatllm-primary, #3b82f6)" }),
4053
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { style: { flex: 1 }, children: model.name }),
4054
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4055
- "span",
4056
- {
4057
- style: {
4058
- fontSize: "10px",
4059
- padding: "2px 6px",
4060
- backgroundColor: "var(--chatllm-bg-tertiary, #f3f4f6)",
4061
- borderRadius: "4px",
4062
- color: "var(--chatllm-text-muted, #9ca3af)"
4063
- },
4064
- children: model.provider
4065
- }
4066
- )
4067
- ]
4068
- },
4069
- model.id
4070
- ))
4071
- ]
4077
+ fontSize: "12px",
4078
+ fontWeight: 600,
4079
+ color: "var(--chatllm-text-muted)",
4080
+ textTransform: "uppercase",
4081
+ letterSpacing: "0.02em"
4082
+ },
4083
+ children: displayModel
4084
+ }
4085
+ )
4086
+ }
4087
+ ),
4088
+ isLoading && !displayContent && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
4089
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
4090
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
4091
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "chatllm-dot-bounce", style: dotStyle }),
4092
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "chatllm-dot-bounce", style: dotStyle }),
4093
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "chatllm-dot-bounce", style: dotStyle })
4094
+ ] }),
4095
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4096
+ "span",
4097
+ {
4098
+ style: {
4099
+ fontSize: "14px",
4100
+ fontWeight: 600,
4101
+ fontStyle: "italic",
4102
+ color: "var(--chatllm-text-muted)"
4103
+ },
4104
+ children: "Thinking..."
4072
4105
  }
4073
4106
  )
4107
+ ] }),
4108
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "chatllm-skeleton-pulse", style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
4109
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { height: "32px", width: "75%", backgroundColor: "var(--chatllm-bg-tertiary)", borderRadius: "8px" } }),
4110
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
4111
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { height: "16px", width: "100%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } }),
4112
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { height: "16px", width: "85%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } }),
4113
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { height: "16px", width: "65%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } })
4114
+ ] })
4074
4115
  ] })
4075
- ]
4076
- }
4077
- )
4078
- ] })
4079
- ]
4116
+ ] }),
4117
+ displayContent && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { wordBreak: "break-word" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4118
+ MarkdownRenderer,
4119
+ {
4120
+ content: displayContent,
4121
+ onChoiceClick,
4122
+ showThinking,
4123
+ thinkingDefaultOpen
4124
+ }
4125
+ ) }),
4126
+ displaySources && displaySources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
4127
+ "div",
4128
+ {
4129
+ style: {
4130
+ display: "flex",
4131
+ flexWrap: "wrap",
4132
+ gap: "8px",
4133
+ marginTop: "16px",
4134
+ paddingTop: "16px",
4135
+ borderTop: "1px solid var(--chatllm-border-light)"
4136
+ },
4137
+ children: [
4138
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4139
+ "span",
4140
+ {
4141
+ style: {
4142
+ fontSize: "12px",
4143
+ fontWeight: 500,
4144
+ color: "var(--chatllm-text-muted)",
4145
+ marginRight: "4px"
4146
+ },
4147
+ children: "\uCD9C\uCC98:"
4148
+ }
4149
+ ),
4150
+ displaySources.map((source, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4151
+ LinkChip,
4152
+ {
4153
+ text: source.title,
4154
+ url: source.url,
4155
+ index: index + 1,
4156
+ showFavicon: true
4157
+ },
4158
+ source.id
4159
+ ))
4160
+ ]
4161
+ }
4162
+ ),
4163
+ showActions && !isLoading && displayContent && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
4164
+ "div",
4165
+ {
4166
+ style: {
4167
+ display: "flex",
4168
+ gap: "4px",
4169
+ marginTop: "16px"
4170
+ },
4171
+ children: [
4172
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: onCopy, style: actionButtonStyle, title: "\uBCF5\uC0AC", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4173
+ IconSvg,
4174
+ {
4175
+ name: isCopied ? "check-line" : "file-copy-line",
4176
+ size: 16,
4177
+ color: isCopied ? "var(--chatllm-success)" : "var(--chatllm-text-muted)"
4178
+ }
4179
+ ) }),
4180
+ onRegenerate && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: onRegenerate, style: actionButtonStyle, title: "\uB2E4\uC2DC \uC0DD\uC131", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "refresh-line", size: 16, color: "var(--chatllm-text-muted)" }) })
4181
+ ]
4182
+ }
4183
+ )
4184
+ ] })
4185
+ ]
4186
+ }
4187
+ )
4080
4188
  }
4081
4189
  );
4082
4190
  };
4191
+ var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
4192
+ "div",
4193
+ {
4194
+ style: {
4195
+ position: "absolute",
4196
+ bottom: "100%",
4197
+ right: 0,
4198
+ marginBottom: "4px",
4199
+ backgroundColor: "var(--chatllm-content-bg)",
4200
+ border: "1px solid var(--chatllm-border)",
4201
+ borderRadius: "12px",
4202
+ boxShadow: "var(--chatllm-shadow-sheet)",
4203
+ minWidth: "180px",
4204
+ zIndex: 100,
4205
+ overflow: "hidden"
4206
+ },
4207
+ onMouseLeave: onClose,
4208
+ children: [
4209
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4210
+ "div",
4211
+ {
4212
+ style: {
4213
+ padding: "10px 14px",
4214
+ fontSize: "11px",
4215
+ fontWeight: 700,
4216
+ color: "var(--chatllm-text-muted)",
4217
+ textTransform: "uppercase",
4218
+ letterSpacing: "0.05em",
4219
+ borderBottom: "1px solid var(--chatllm-border-light)"
4220
+ },
4221
+ children: "\uB2E4\uB978 \uBAA8\uB378\uC5D0\uAC8C \uC9C8\uBB38"
4222
+ }
4223
+ ),
4224
+ models.map((model) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
4225
+ "button",
4226
+ {
4227
+ onClick: () => onSelect(model.id),
4228
+ style: {
4229
+ width: "100%",
4230
+ padding: "12px 14px",
4231
+ display: "flex",
4232
+ alignItems: "center",
4233
+ gap: "10px",
4234
+ backgroundColor: "transparent",
4235
+ border: "none",
4236
+ cursor: "pointer",
4237
+ fontSize: "13px",
4238
+ color: "var(--chatllm-text)",
4239
+ textAlign: "left",
4240
+ transition: "background-color 0.15s"
4241
+ },
4242
+ onMouseEnter: (e) => {
4243
+ e.currentTarget.style.backgroundColor = "var(--chatllm-bg-hover)";
4244
+ },
4245
+ onMouseLeave: (e) => {
4246
+ e.currentTarget.style.backgroundColor = "transparent";
4247
+ },
4248
+ children: [
4249
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSvg, { name: "robot-line", size: 16, color: "var(--chatllm-primary)" }),
4250
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { style: { flex: 1, fontWeight: 500 }, children: model.name }),
4251
+ model.provider && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4252
+ "span",
4253
+ {
4254
+ style: {
4255
+ fontSize: "10px",
4256
+ padding: "2px 8px",
4257
+ backgroundColor: "var(--chatllm-bg-tertiary)",
4258
+ borderRadius: "4px",
4259
+ color: "var(--chatllm-text-muted)"
4260
+ },
4261
+ children: model.provider
4262
+ }
4263
+ )
4264
+ ]
4265
+ },
4266
+ model.id
4267
+ ))
4268
+ ]
4269
+ }
4270
+ );
4083
4271
  var dotStyle = {
4084
4272
  width: "8px",
4085
4273
  height: "8px",
4086
4274
  borderRadius: "50%",
4087
- backgroundColor: "var(--chatllm-primary, #3b82f6)",
4088
- animation: "chatllm-typing 1.4s infinite ease-in-out both"
4275
+ backgroundColor: "var(--chatllm-primary)"
4089
4276
  };
4090
4277
  var actionButtonStyle = {
4091
- padding: "6px",
4278
+ padding: "8px",
4092
4279
  backgroundColor: "transparent",
4093
4280
  border: "none",
4094
- borderRadius: "6px",
4281
+ borderRadius: "8px",
4095
4282
  cursor: "pointer",
4096
4283
  display: "flex",
4097
4284
  alignItems: "center",
@@ -4104,8 +4291,8 @@ var navButtonStyle = {
4104
4291
  display: "flex",
4105
4292
  alignItems: "center",
4106
4293
  justifyContent: "center",
4107
- backgroundColor: "var(--chatllm-bg, #ffffff)",
4108
- border: "1px solid var(--chatllm-border, #e5e7eb)",
4294
+ backgroundColor: "var(--chatllm-content-bg)",
4295
+ border: "1px solid var(--chatllm-border)",
4109
4296
  borderRadius: "6px"
4110
4297
  };
4111
4298
 
@@ -4170,7 +4357,7 @@ var MessageList = ({
4170
4357
  "div",
4171
4358
  {
4172
4359
  ref: containerRef,
4173
- className: "chatllm-message-list",
4360
+ className: "chatllm-message-list chatllm-scrollbar",
4174
4361
  style: {
4175
4362
  flex: 1,
4176
4363
  overflow: "auto",
@@ -4178,34 +4365,49 @@ var MessageList = ({
4178
4365
  },
4179
4366
  onMouseUp: handleMouseUp,
4180
4367
  children: [
4181
- messages.map((message, index) => {
4182
- const nextAssistant = message.role === "user" && index + 1 < messages.length ? messages[index + 1] : null;
4183
- const assistantForAlts = nextAssistant?.role === "assistant" ? nextAssistant : null;
4184
- const activeAltIndex = assistantForAlts ? activeAlternatives[assistantForAlts.id] ?? 0 : 0;
4185
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4186
- MessageBubble,
4187
- {
4188
- message,
4189
- isLoading: isLoading && index === messages.length - 1 && message.role === "assistant",
4190
- isCopied: copiedId === message.id,
4191
- isEditing: editingId === message.id,
4192
- onCopy: () => onCopy(message.content, message.id),
4193
- onEdit: () => onEdit(message),
4194
- onRegenerate: message.role === "assistant" ? () => onRegenerate(message.id) : void 0,
4195
- onQuote,
4196
- nextAssistantMessage: assistantForAlts,
4197
- activeAlternativeIndex: message.role === "user" ? activeAltIndex : activeAlternatives[message.id] ?? 0,
4198
- onAskOtherModel: message.role === "user" && assistantForAlts && onAskOtherModel ? (targetModel) => onAskOtherModel(message.id, assistantForAlts.id, targetModel) : void 0,
4199
- onAlternativeChange: message.role === "user" && assistantForAlts && onSetActiveAlternative ? (idx) => onSetActiveAlternative(assistantForAlts.id, idx) : message.role === "assistant" && onSetActiveAlternative ? (idx) => onSetActiveAlternative(message.id, idx) : void 0,
4200
- models,
4201
- alternatives: message.role === "assistant" ? message.alternatives : assistantForAlts?.alternatives,
4202
- onChoiceClick: message.role === "assistant" ? onChoiceClick : void 0,
4203
- showThinking,
4204
- thinkingDefaultOpen
4368
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
4369
+ "div",
4370
+ {
4371
+ style: {
4372
+ maxWidth: "860px",
4373
+ margin: "0 auto",
4374
+ paddingTop: "32px",
4375
+ paddingBottom: "240px"
4376
+ // Space for floating input
4205
4377
  },
4206
- message.id
4207
- );
4208
- }),
4378
+ children: [
4379
+ messages.map((message, index) => {
4380
+ const nextAssistant = message.role === "user" && index + 1 < messages.length ? messages[index + 1] : null;
4381
+ const assistantForAlts = nextAssistant?.role === "assistant" ? nextAssistant : null;
4382
+ const activeAltIndex = assistantForAlts ? activeAlternatives[assistantForAlts.id] ?? 0 : 0;
4383
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4384
+ MessageBubble,
4385
+ {
4386
+ message,
4387
+ isLoading: isLoading && index === messages.length - 1 && message.role === "assistant",
4388
+ isCopied: copiedId === message.id,
4389
+ isEditing: editingId === message.id,
4390
+ onCopy: () => onCopy(message.content, message.id),
4391
+ onEdit: () => onEdit(message),
4392
+ onRegenerate: message.role === "assistant" ? () => onRegenerate(message.id) : void 0,
4393
+ onQuote,
4394
+ nextAssistantMessage: assistantForAlts,
4395
+ activeAlternativeIndex: message.role === "user" ? activeAltIndex : activeAlternatives[message.id] ?? 0,
4396
+ onAskOtherModel: message.role === "user" && assistantForAlts && onAskOtherModel ? (targetModel) => onAskOtherModel(message.id, assistantForAlts.id, targetModel) : void 0,
4397
+ onAlternativeChange: message.role === "user" && assistantForAlts && onSetActiveAlternative ? (idx) => onSetActiveAlternative(assistantForAlts.id, idx) : message.role === "assistant" && onSetActiveAlternative ? (idx) => onSetActiveAlternative(message.id, idx) : void 0,
4398
+ models,
4399
+ alternatives: message.role === "assistant" ? message.alternatives : assistantForAlts?.alternatives,
4400
+ onChoiceClick: message.role === "assistant" ? onChoiceClick : void 0,
4401
+ showThinking,
4402
+ thinkingDefaultOpen
4403
+ },
4404
+ message.id
4405
+ );
4406
+ }),
4407
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref: messagesEndRef })
4408
+ ]
4409
+ }
4410
+ ),
4209
4411
  selectionPosition && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
4210
4412
  "div",
4211
4413
  {
@@ -4259,8 +4461,7 @@ var MessageList = ({
4259
4461
  )
4260
4462
  ]
4261
4463
  }
4262
- ),
4263
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref: messagesEndRef })
4464
+ )
4264
4465
  ]
4265
4466
  }
4266
4467
  );
@@ -4295,219 +4496,110 @@ var EmptyState = ({
4295
4496
  alignItems: "center",
4296
4497
  justifyContent: "center",
4297
4498
  padding: "48px 24px",
4499
+ paddingBottom: "200px",
4500
+ // Space for floating input
4298
4501
  textAlign: "center"
4299
4502
  },
4300
4503
  children: [
4301
4504
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4302
4505
  "div",
4303
4506
  {
4507
+ className: "chatllm-sheet",
4304
4508
  style: {
4305
4509
  width: "64px",
4306
4510
  height: "64px",
4307
4511
  borderRadius: "16px",
4308
- background: "linear-gradient(135deg, #3b82f6, #8b5cf6)",
4309
4512
  display: "flex",
4310
4513
  alignItems: "center",
4311
4514
  justifyContent: "center",
4312
- marginBottom: "24px",
4313
- boxShadow: "0 8px 32px rgba(59, 130, 246, 0.25)"
4515
+ marginBottom: "32px",
4516
+ color: "var(--chatllm-primary)"
4314
4517
  },
4315
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconSvg, { name: "sparkling-line", size: 32, color: "#ffffff" })
4518
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconSvg, { name: "chat-1-line", size: 40 })
4316
4519
  }
4317
4520
  ),
4318
4521
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4319
4522
  "h1",
4320
4523
  {
4321
4524
  style: {
4322
- fontSize: "28px",
4323
- fontWeight: 600,
4324
- color: "var(--chatllm-text, #1f2937)",
4325
- marginBottom: "8px"
4326
- },
4327
- children: greeting
4328
- }
4329
- ),
4330
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4331
- "p",
4332
- {
4333
- style: {
4334
- fontSize: "16px",
4335
- color: "var(--chatllm-text-muted, #6b7280)",
4336
- marginBottom: "32px"
4525
+ fontSize: "30px",
4526
+ fontWeight: 700,
4527
+ color: "var(--chatllm-text)",
4528
+ marginBottom: "40px",
4529
+ lineHeight: 1.3
4337
4530
  },
4338
- children: "\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"
4531
+ children: "How can I help you today?"
4339
4532
  }
4340
4533
  ),
4341
- actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4534
+ (actions.length > 0 || templates.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4342
4535
  "div",
4343
4536
  {
4344
4537
  style: {
4345
- display: "grid",
4346
- gridTemplateColumns: "repeat(auto-fit, minmax(140px, 1fr))",
4538
+ display: "flex",
4539
+ flexWrap: "wrap",
4540
+ justifyContent: "center",
4347
4541
  gap: "12px",
4348
- width: "100%",
4349
- maxWidth: "600px",
4350
- marginBottom: "32px"
4542
+ maxWidth: "800px",
4543
+ marginBottom: "48px"
4351
4544
  },
4352
- children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4353
- "button",
4354
- {
4355
- onClick: () => onActionSelect?.(action),
4356
- style: {
4357
- display: "flex",
4358
- flexDirection: "column",
4359
- alignItems: "center",
4360
- gap: "12px",
4361
- padding: "20px 16px",
4362
- backgroundColor: "var(--chatllm-bg, #ffffff)",
4363
- border: "1px solid var(--chatllm-border, #e5e7eb)",
4364
- borderRadius: "12px",
4365
- cursor: "pointer",
4366
- transition: "all 0.2s"
4367
- },
4368
- onMouseOver: (e) => {
4369
- e.currentTarget.style.borderColor = "var(--chatllm-primary, #3b82f6)";
4370
- e.currentTarget.style.boxShadow = "0 4px 12px rgba(59, 130, 246, 0.1)";
4371
- },
4372
- onMouseOut: (e) => {
4373
- e.currentTarget.style.borderColor = "var(--chatllm-border, #e5e7eb)";
4374
- e.currentTarget.style.boxShadow = "none";
4545
+ children: [
4546
+ actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4547
+ "button",
4548
+ {
4549
+ onClick: () => onActionSelect?.(action),
4550
+ className: "chatllm-btn-secondary",
4551
+ style: {
4552
+ display: "flex",
4553
+ alignItems: "center",
4554
+ gap: "8px",
4555
+ padding: "12px 20px",
4556
+ fontSize: "14px",
4557
+ fontWeight: 500
4558
+ },
4559
+ children: [
4560
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4561
+ IconSvg,
4562
+ {
4563
+ name: getActionIcon(action.icon),
4564
+ size: 18,
4565
+ color: "var(--chatllm-primary)"
4566
+ }
4567
+ ),
4568
+ action.label
4569
+ ]
4375
4570
  },
4376
- children: [
4377
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4378
- "div",
4379
- {
4380
- style: {
4381
- width: "44px",
4382
- height: "44px",
4383
- borderRadius: "12px",
4384
- backgroundColor: "var(--chatllm-primary-light, #dbeafe)",
4385
- display: "flex",
4386
- alignItems: "center",
4387
- justifyContent: "center"
4388
- },
4389
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4390
- IconSvg,
4391
- {
4392
- name: getActionIcon(action.icon),
4393
- size: 22,
4394
- color: "var(--chatllm-primary, #3b82f6)"
4395
- }
4396
- )
4397
- }
4398
- ),
4399
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4400
- "div",
4401
- {
4402
- style: {
4403
- fontSize: "14px",
4404
- fontWeight: 500,
4405
- color: "var(--chatllm-text, #1f2937)"
4406
- },
4407
- children: action.label
4408
- }
4409
- ) })
4410
- ]
4411
- },
4412
- action.id
4413
- ))
4414
- }
4415
- ),
4416
- templates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { width: "100%", maxWidth: "600px" }, children: [
4417
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4418
- "h3",
4419
- {
4420
- style: {
4421
- fontSize: "14px",
4422
- fontWeight: 500,
4423
- color: "var(--chatllm-text-muted, #6b7280)",
4424
- marginBottom: "12px",
4425
- textAlign: "left"
4426
- },
4427
- children: "\uCD94\uCC9C \uD504\uB86C\uD504\uD2B8"
4428
- }
4429
- ),
4430
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4431
- "div",
4432
- {
4433
- style: {
4434
- display: "flex",
4435
- flexDirection: "column",
4436
- gap: "8px"
4437
- },
4438
- children: templates.map((template) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4571
+ action.id
4572
+ )),
4573
+ templates.slice(0, 4).map((template) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4439
4574
  "button",
4440
4575
  {
4441
4576
  onClick: () => onTemplateClick(template),
4577
+ className: "chatllm-btn-secondary",
4442
4578
  style: {
4443
4579
  display: "flex",
4444
4580
  alignItems: "center",
4445
- gap: "12px",
4446
- padding: "14px 16px",
4447
- backgroundColor: "var(--chatllm-bg, #ffffff)",
4448
- border: "1px solid var(--chatllm-border, #e5e7eb)",
4449
- borderRadius: "10px",
4450
- cursor: "pointer",
4451
- textAlign: "left",
4452
- transition: "all 0.2s"
4453
- },
4454
- onMouseOver: (e) => {
4455
- e.currentTarget.style.backgroundColor = "var(--chatllm-bg-hover, #f9fafb)";
4456
- },
4457
- onMouseOut: (e) => {
4458
- e.currentTarget.style.backgroundColor = "var(--chatllm-bg, #ffffff)";
4581
+ gap: "8px",
4582
+ padding: "12px 20px",
4583
+ fontSize: "14px",
4584
+ fontWeight: 500
4459
4585
  },
4460
4586
  children: [
4461
4587
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4462
- "div",
4588
+ IconSvg,
4463
4589
  {
4464
- style: {
4465
- width: "36px",
4466
- height: "36px",
4467
- borderRadius: "8px",
4468
- backgroundColor: "var(--chatllm-bg-secondary, #f3f4f6)",
4469
- display: "flex",
4470
- alignItems: "center",
4471
- justifyContent: "center",
4472
- flexShrink: 0
4473
- },
4474
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconSvg, { name: "file-text-line", size: 18, color: "var(--chatllm-text-muted, #6b7280)" })
4590
+ name: "sparkling-line",
4591
+ size: 18,
4592
+ color: "var(--chatllm-primary)"
4475
4593
  }
4476
4594
  ),
4477
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
4478
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4479
- "div",
4480
- {
4481
- style: {
4482
- fontSize: "14px",
4483
- fontWeight: 500,
4484
- color: "var(--chatllm-text, #1f2937)"
4485
- },
4486
- children: template.title
4487
- }
4488
- ),
4489
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4490
- "div",
4491
- {
4492
- style: {
4493
- fontSize: "13px",
4494
- color: "var(--chatllm-text-muted, #9ca3af)",
4495
- overflow: "hidden",
4496
- textOverflow: "ellipsis",
4497
- whiteSpace: "nowrap"
4498
- },
4499
- children: template.description
4500
- }
4501
- )
4502
- ] }),
4503
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconSvg, { name: "arrow-right-line", size: 16, color: "var(--chatllm-text-muted, #9ca3af)" })
4595
+ template.title
4504
4596
  ]
4505
4597
  },
4506
4598
  template.id
4507
4599
  ))
4508
- }
4509
- )
4510
- ] })
4600
+ ]
4601
+ }
4602
+ )
4511
4603
  ]
4512
4604
  }
4513
4605
  );
@@ -4539,7 +4631,7 @@ var MemoryPanel = ({
4539
4631
  const [expandedId, setExpandedId] = (0, import_react11.useState)(null);
4540
4632
  const [activeTab, setActiveTab] = (0, import_react11.useState)("all");
4541
4633
  const filteredItems = activeTab === "all" ? items : items.filter((item) => item.category === activeTab);
4542
- const formatDate2 = (timestamp) => {
4634
+ const formatDate = (timestamp) => {
4543
4635
  const date = new Date(timestamp);
4544
4636
  return date.toLocaleDateString("ko-KR", {
4545
4637
  month: "short",
@@ -4778,7 +4870,7 @@ var MemoryPanel = ({
4778
4870
  children: categoryLabels[item.category]
4779
4871
  }
4780
4872
  ),
4781
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: formatDate2(item.timestamp) })
4873
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: formatDate(item.timestamp) })
4782
4874
  ] }),
4783
4875
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
4784
4876
  "div",
@@ -5354,6 +5446,8 @@ var injectStyles = () => {
5354
5446
  const style = document.createElement("style");
5355
5447
  style.id = styleId;
5356
5448
  style.textContent = `
5449
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
5450
+
5357
5451
  @keyframes chatllm-typing {
5358
5452
  0%, 80%, 100% {
5359
5453
  transform: scale(0);
@@ -5365,46 +5459,67 @@ var injectStyles = () => {
5365
5459
  }
5366
5460
  }
5367
5461
 
5462
+ @keyframes chatllm-bounce {
5463
+ 0%, 100% { transform: translateY(0); }
5464
+ 50% { transform: translateY(-4px); }
5465
+ }
5466
+
5467
+ @keyframes chatllm-pulse {
5468
+ 0%, 100% { opacity: 1; }
5469
+ 50% { opacity: 0.5; }
5470
+ }
5471
+
5368
5472
  .chatllm-root {
5369
- --chatllm-primary: #3b82f6;
5370
- --chatllm-primary-hover: #2563eb;
5371
- --chatllm-primary-light: #dbeafe;
5372
- --chatllm-bg: #ffffff;
5373
- --chatllm-bg-secondary: #f9fafb;
5374
- --chatllm-bg-tertiary: #f3f4f6;
5375
- --chatllm-bg-hover: #f3f4f6;
5376
- --chatllm-bg-active: #eff6ff;
5377
- --chatllm-bg-disabled: #e5e7eb;
5378
- --chatllm-sidebar-bg: #ffffff;
5379
- --chatllm-input-bg: #f9fafb;
5380
- --chatllm-text: #1f2937;
5381
- --chatllm-text-muted: #6b7280;
5382
- --chatllm-border: #e5e7eb;
5383
- --chatllm-border-light: #f3f4f6;
5473
+ --chatllm-primary: #4A90E2;
5474
+ --chatllm-primary-hover: #357ABD;
5475
+ --chatllm-primary-light: rgba(74, 144, 226, 0.1);
5476
+ --chatllm-bg: #F5F5F5;
5477
+ --chatllm-bg-secondary: #F5F5F5;
5478
+ --chatllm-bg-tertiary: #EDEDED;
5479
+ --chatllm-bg-hover: rgba(255, 255, 255, 0.4);
5480
+ --chatllm-bg-active: rgba(255, 255, 255, 0.6);
5481
+ --chatllm-bg-disabled: #E5E7EB;
5482
+ --chatllm-sidebar-bg: #F5F5F5;
5483
+ --chatllm-content-bg: #FFFFFF;
5484
+ --chatllm-input-bg: #FFFFFF;
5485
+ --chatllm-user-bubble: #EDEDED;
5486
+ --chatllm-text: #1e293b;
5487
+ --chatllm-text-secondary: #475569;
5488
+ --chatllm-text-muted: #94a3b8;
5489
+ --chatllm-border: #e2e8f0;
5490
+ --chatllm-border-light: rgba(226, 232, 240, 0.5);
5384
5491
  --chatllm-error: #ef4444;
5385
5492
  --chatllm-success: #22c55e;
5386
- --chatllm-user-avatar: #e5e7eb;
5387
- --chatllm-assistant-avatar: #dbeafe;
5493
+ --chatllm-radius: 1rem;
5494
+ --chatllm-radius-lg: 1.5rem;
5495
+ --chatllm-shadow-sheet: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.03);
5496
+ --chatllm-shadow-input: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
5388
5497
  }
5389
5498
 
5390
5499
  .chatllm-root.chatllm-dark {
5391
5500
  --chatllm-primary: #60a5fa;
5392
5501
  --chatllm-primary-hover: #3b82f6;
5393
- --chatllm-primary-light: #1e3a5f;
5394
- --chatllm-bg: #111827;
5395
- --chatllm-bg-secondary: #1f2937;
5396
- --chatllm-bg-tertiary: #374151;
5397
- --chatllm-bg-hover: #374151;
5398
- --chatllm-bg-active: #1e3a5f;
5399
- --chatllm-bg-disabled: #374151;
5400
- --chatllm-sidebar-bg: #111827;
5401
- --chatllm-input-bg: #1f2937;
5402
- --chatllm-text: #f9fafb;
5403
- --chatllm-text-muted: #9ca3af;
5404
- --chatllm-border: #374151;
5405
- --chatllm-border-light: #1f2937;
5406
- --chatllm-user-avatar: #374151;
5407
- --chatllm-assistant-avatar: #1e3a5f;
5502
+ --chatllm-primary-light: rgba(96, 165, 250, 0.15);
5503
+ --chatllm-bg: #0f172a;
5504
+ --chatllm-bg-secondary: #1e293b;
5505
+ --chatllm-bg-tertiary: #334155;
5506
+ --chatllm-bg-hover: rgba(51, 65, 85, 0.5);
5507
+ --chatllm-bg-active: rgba(51, 65, 85, 0.8);
5508
+ --chatllm-sidebar-bg: #0f172a;
5509
+ --chatllm-content-bg: #1e293b;
5510
+ --chatllm-input-bg: #1e293b;
5511
+ --chatllm-user-bubble: #334155;
5512
+ --chatllm-text: #f1f5f9;
5513
+ --chatllm-text-secondary: #cbd5e1;
5514
+ --chatllm-text-muted: #64748b;
5515
+ --chatllm-border: #334155;
5516
+ --chatllm-border-light: rgba(51, 65, 85, 0.5);
5517
+ }
5518
+
5519
+ .chatllm-root {
5520
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
5521
+ -webkit-font-smoothing: antialiased;
5522
+ -moz-osx-font-smoothing: grayscale;
5408
5523
  }
5409
5524
 
5410
5525
  .chatllm-root * {
@@ -5420,17 +5535,57 @@ var injectStyles = () => {
5420
5535
  outline-offset: 2px;
5421
5536
  }
5422
5537
 
5423
- .chatllm-message-list::-webkit-scrollbar {
5424
- width: 6px;
5538
+ .chatllm-scrollbar::-webkit-scrollbar {
5539
+ width: 5px;
5425
5540
  }
5426
5541
 
5427
- .chatllm-message-list::-webkit-scrollbar-track {
5542
+ .chatllm-scrollbar::-webkit-scrollbar-track {
5428
5543
  background: transparent;
5429
5544
  }
5430
5545
 
5431
- .chatllm-message-list::-webkit-scrollbar-thumb {
5432
- background-color: var(--chatllm-border);
5433
- border-radius: 3px;
5546
+ .chatllm-scrollbar::-webkit-scrollbar-thumb {
5547
+ background: #E0E0E0;
5548
+ border-radius: 10px;
5549
+ }
5550
+
5551
+ .chatllm-sheet {
5552
+ background: var(--chatllm-content-bg);
5553
+ border-radius: var(--chatllm-radius-lg);
5554
+ box-shadow: var(--chatllm-shadow-sheet);
5555
+ border: 1px solid var(--chatllm-border);
5556
+ }
5557
+
5558
+ .chatllm-input-container {
5559
+ background: var(--chatllm-input-bg);
5560
+ border-radius: var(--chatllm-radius-lg);
5561
+ box-shadow: var(--chatllm-shadow-input);
5562
+ border: 1px solid var(--chatllm-border);
5563
+ transition: all 0.3s ease;
5564
+ }
5565
+
5566
+ .chatllm-input-container:focus-within {
5567
+ border-color: rgba(74, 144, 226, 0.3);
5568
+ box-shadow: var(--chatllm-shadow-input), 0 0 0 4px rgba(74, 144, 226, 0.05);
5569
+ }
5570
+
5571
+ .chatllm-dot-bounce {
5572
+ animation: chatllm-bounce 0.6s infinite ease-in-out;
5573
+ }
5574
+
5575
+ .chatllm-dot-bounce:nth-child(2) {
5576
+ animation-delay: 0.1s;
5577
+ }
5578
+
5579
+ .chatllm-dot-bounce:nth-child(3) {
5580
+ animation-delay: 0.2s;
5581
+ }
5582
+
5583
+ .chatllm-skeleton-pulse {
5584
+ animation: chatllm-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
5585
+ }
5586
+
5587
+ .chatllm-sidebar-transition {
5588
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
5434
5589
  }
5435
5590
 
5436
5591
  .chatllm-table {
@@ -5441,22 +5596,22 @@ var injectStyles = () => {
5441
5596
 
5442
5597
  .chatllm-table th,
5443
5598
  .chatllm-table td {
5444
- border: 1px solid var(--chatllm-border, #e5e7eb);
5599
+ border: 1px solid var(--chatllm-border);
5445
5600
  padding: 10px 12px;
5446
5601
  }
5447
5602
 
5448
5603
  .chatllm-table th {
5449
- background-color: var(--chatllm-bg-secondary, #f9fafb);
5604
+ background-color: var(--chatllm-bg-tertiary);
5450
5605
  font-weight: 600;
5451
5606
  }
5452
5607
 
5453
5608
  .chatllm-table tr:hover {
5454
- background-color: var(--chatllm-bg-hover, #f3f4f6);
5609
+ background-color: var(--chatllm-bg-hover);
5455
5610
  }
5456
5611
 
5457
5612
  .chatllm-image {
5458
5613
  max-width: 100%;
5459
- border-radius: 8px;
5614
+ border-radius: var(--chatllm-radius);
5460
5615
  margin: 8px 0;
5461
5616
  display: block;
5462
5617
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
@@ -5465,6 +5620,39 @@ var injectStyles = () => {
5465
5620
  .chatllm-image:hover {
5466
5621
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
5467
5622
  }
5623
+
5624
+ .chatllm-btn-primary {
5625
+ background: var(--chatllm-primary);
5626
+ color: white;
5627
+ border: none;
5628
+ border-radius: var(--chatllm-radius);
5629
+ font-weight: 600;
5630
+ transition: all 0.2s ease;
5631
+ box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
5632
+ }
5633
+
5634
+ .chatllm-btn-primary:hover {
5635
+ background: var(--chatllm-primary-hover);
5636
+ }
5637
+
5638
+ .chatllm-btn-primary:active {
5639
+ transform: scale(0.98);
5640
+ }
5641
+
5642
+ .chatllm-btn-secondary {
5643
+ background: var(--chatllm-content-bg);
5644
+ color: var(--chatllm-text-secondary);
5645
+ border: 1px solid var(--chatllm-border);
5646
+ border-radius: 9999px;
5647
+ font-weight: 500;
5648
+ transition: all 0.2s ease;
5649
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
5650
+ }
5651
+
5652
+ .chatllm-btn-secondary:hover {
5653
+ background: var(--chatllm-bg-hover);
5654
+ border-color: rgba(74, 144, 226, 0.3);
5655
+ }
5468
5656
  `;
5469
5657
  document.head.appendChild(style);
5470
5658
  };
@@ -5630,8 +5818,10 @@ var ChatUI = ({
5630
5818
  style: {
5631
5819
  display: "flex",
5632
5820
  height: "100%",
5633
- backgroundColor: "var(--chatllm-bg-secondary)",
5634
- fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'
5821
+ width: "100%",
5822
+ backgroundColor: "var(--chatllm-bg)",
5823
+ overflow: "hidden",
5824
+ position: "relative"
5635
5825
  },
5636
5826
  children: [
5637
5827
  showSidebar && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
@@ -5654,7 +5844,8 @@ var ChatUI = ({
5654
5844
  flex: 1,
5655
5845
  display: "flex",
5656
5846
  flexDirection: "column",
5657
- backgroundColor: "var(--chatllm-bg)",
5847
+ position: "relative",
5848
+ overflow: "hidden",
5658
5849
  minWidth: 0
5659
5850
  },
5660
5851
  children: [