@makemore/agent-frontend 2.4.0 → 2.7.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.
- package/README.md +10 -1
- package/dist/chat-widget.css +442 -1
- package/dist/chat-widget.js +368 -171
- package/package.json +1 -1
- package/src/components/ChatWidget.js +73 -27
- package/src/components/Message.js +156 -4
- package/src/components/MessageList.js +10 -4
- package/src/components/TaskList.js +183 -0
- package/src/hooks/useChat.js +68 -1
- package/src/hooks/useTasks.js +164 -0
package/README.md
CHANGED
|
@@ -844,7 +844,16 @@ This ensures conversations don't get mixed up between instances.
|
|
|
844
844
|
|
|
845
845
|
## Version History
|
|
846
846
|
|
|
847
|
-
### v2.
|
|
847
|
+
### v2.7.0 (Latest)
|
|
848
|
+
- 🔧 **Embedded Scroll Fix**: Fixed scrolling in embedded mode with proper flex layout
|
|
849
|
+
- 📐 Added `flex-direction: column`, `overflow: hidden` to `.cw-widget-embedded`
|
|
850
|
+
- 📜 Added `min-height: 0` to `.cw-messages` for proper flex child scrolling
|
|
851
|
+
|
|
852
|
+
### v2.6.0
|
|
853
|
+
- ✏️ **Edit & Retry**: Edit user messages and retry from any point in conversation
|
|
854
|
+
- 📋 **Task List**: Agents can track work with task management UI
|
|
855
|
+
|
|
856
|
+
### v2.1.0
|
|
848
857
|
- 🎤 **Voice Input**: Speech-to-text input using Web Speech API
|
|
849
858
|
- 🎙️ Microphone button with visual recording indicator
|
|
850
859
|
- 🌐 Automatic language detection from browser settings
|
package/dist/chat-widget.css
CHANGED
|
@@ -976,17 +976,22 @@
|
|
|
976
976
|
max-height: none !important;
|
|
977
977
|
border-radius: 0;
|
|
978
978
|
box-shadow: none;
|
|
979
|
+
display: flex;
|
|
980
|
+
flex-direction: column;
|
|
981
|
+
overflow: hidden;
|
|
979
982
|
}
|
|
980
983
|
|
|
981
984
|
/* Embedded widget header can have rounded corners if desired */
|
|
982
985
|
.cw-widget-embedded .cw-header {
|
|
983
986
|
border-radius: 0;
|
|
987
|
+
flex-shrink: 0;
|
|
984
988
|
}
|
|
985
989
|
|
|
986
|
-
/* Ensure messages area fills available space */
|
|
990
|
+
/* Ensure messages area fills available space and scrolls */
|
|
987
991
|
.cw-widget-embedded .cw-messages {
|
|
988
992
|
flex: 1;
|
|
989
993
|
min-height: 0;
|
|
994
|
+
overflow-y: auto;
|
|
990
995
|
}
|
|
991
996
|
|
|
992
997
|
/* ============================================================================
|
|
@@ -1668,4 +1673,440 @@
|
|
|
1668
1673
|
.cw-attachment-name {
|
|
1669
1674
|
color: #e0e0e0;
|
|
1670
1675
|
}
|
|
1676
|
+
|
|
1677
|
+
.cw-inline-edit-input {
|
|
1678
|
+
background: #2a2a2a;
|
|
1679
|
+
border-color: #555;
|
|
1680
|
+
color: #e0e0e0;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
.cw-inline-edit-input:focus {
|
|
1684
|
+
border-color: var(--cw-primary);
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
.cw-inline-edit-cancel {
|
|
1688
|
+
background: #444;
|
|
1689
|
+
color: #e0e0e0;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
.cw-inline-edit-cancel:hover {
|
|
1693
|
+
background: #555;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
/* ==========================================
|
|
1698
|
+
Edit/Retry Message Actions
|
|
1699
|
+
========================================== */
|
|
1700
|
+
|
|
1701
|
+
/* Wrapper for user message bubble + action buttons (inline, buttons on left) */
|
|
1702
|
+
.cw-user-actions-wrapper {
|
|
1703
|
+
display: inline-flex;
|
|
1704
|
+
align-items: center;
|
|
1705
|
+
gap: 6px;
|
|
1706
|
+
max-width: 80%;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
/* Container for action buttons - appears on hover */
|
|
1710
|
+
.cw-message-actions {
|
|
1711
|
+
display: flex;
|
|
1712
|
+
gap: 4px;
|
|
1713
|
+
opacity: 0;
|
|
1714
|
+
transition: opacity 0.15s ease;
|
|
1715
|
+
flex-shrink: 0;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
/* Buttons on left side for user messages - no special positioning needed, they're first in DOM */
|
|
1719
|
+
.cw-message-actions-left {
|
|
1720
|
+
/* Already positioned correctly via flexbox */
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/* Position below for assistant messages */
|
|
1724
|
+
.cw-message-actions-right {
|
|
1725
|
+
margin-top: 4px;
|
|
1726
|
+
justify-content: flex-start;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
.cw-message-row-with-actions:hover .cw-message-actions {
|
|
1730
|
+
opacity: 1;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
/* Small icon buttons */
|
|
1734
|
+
.cw-message-action-btn {
|
|
1735
|
+
display: flex;
|
|
1736
|
+
align-items: center;
|
|
1737
|
+
justify-content: center;
|
|
1738
|
+
width: 26px;
|
|
1739
|
+
height: 26px;
|
|
1740
|
+
padding: 0;
|
|
1741
|
+
border: none;
|
|
1742
|
+
border-radius: 4px;
|
|
1743
|
+
background: var(--cw-bg-muted);
|
|
1744
|
+
color: var(--cw-text-muted);
|
|
1745
|
+
cursor: pointer;
|
|
1746
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.cw-message-action-btn:hover {
|
|
1750
|
+
background: var(--cw-bg);
|
|
1751
|
+
color: var(--cw-text);
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
.cw-message-action-btn svg {
|
|
1755
|
+
width: 14px;
|
|
1756
|
+
height: 14px;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
/* Inline edit form */
|
|
1760
|
+
.cw-inline-edit {
|
|
1761
|
+
display: flex;
|
|
1762
|
+
flex-direction: column;
|
|
1763
|
+
gap: 8px;
|
|
1764
|
+
max-width: 80%;
|
|
1765
|
+
width: 100%;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
.cw-inline-edit-input {
|
|
1769
|
+
width: 100%;
|
|
1770
|
+
min-height: 40px;
|
|
1771
|
+
max-height: 200px;
|
|
1772
|
+
padding: 10px 14px;
|
|
1773
|
+
border: 2px solid var(--cw-primary);
|
|
1774
|
+
border-radius: var(--cw-radius-sm);
|
|
1775
|
+
background: var(--cw-bg);
|
|
1776
|
+
color: var(--cw-text);
|
|
1777
|
+
font-family: inherit;
|
|
1778
|
+
font-size: 14px;
|
|
1779
|
+
line-height: 1.4;
|
|
1780
|
+
resize: none;
|
|
1781
|
+
overflow-y: auto;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
.cw-inline-edit-input:focus {
|
|
1785
|
+
outline: none;
|
|
1786
|
+
box-shadow: 0 0 0 3px rgba(var(--cw-primary-rgb, 59, 130, 246), 0.2);
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
.cw-inline-edit-actions {
|
|
1790
|
+
display: flex;
|
|
1791
|
+
gap: 8px;
|
|
1792
|
+
justify-content: flex-end;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
.cw-inline-edit-btn {
|
|
1796
|
+
padding: 6px 12px;
|
|
1797
|
+
border: none;
|
|
1798
|
+
border-radius: 4px;
|
|
1799
|
+
font-size: 13px;
|
|
1800
|
+
font-weight: 500;
|
|
1801
|
+
cursor: pointer;
|
|
1802
|
+
transition: background 0.15s ease;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
.cw-inline-edit-cancel {
|
|
1806
|
+
background: var(--cw-bg-muted);
|
|
1807
|
+
color: var(--cw-text);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
.cw-inline-edit-cancel:hover {
|
|
1811
|
+
background: var(--cw-border);
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
.cw-inline-edit-save {
|
|
1815
|
+
background: var(--cw-primary);
|
|
1816
|
+
color: white;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
.cw-inline-edit-save:hover {
|
|
1820
|
+
filter: brightness(1.1);
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
.cw-inline-edit-save:disabled {
|
|
1824
|
+
opacity: 0.5;
|
|
1825
|
+
cursor: not-allowed;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/* =============================================================================
|
|
1829
|
+
TABS
|
|
1830
|
+
============================================================================= */
|
|
1831
|
+
|
|
1832
|
+
.cw-tabs {
|
|
1833
|
+
display: flex;
|
|
1834
|
+
border-bottom: 1px solid var(--cw-border);
|
|
1835
|
+
background: var(--cw-bg);
|
|
1836
|
+
flex-shrink: 0;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
.cw-tab {
|
|
1840
|
+
flex: 1;
|
|
1841
|
+
padding: 10px 16px;
|
|
1842
|
+
border: none;
|
|
1843
|
+
background: transparent;
|
|
1844
|
+
color: var(--cw-text-muted);
|
|
1845
|
+
font-size: 13px;
|
|
1846
|
+
font-weight: 500;
|
|
1847
|
+
cursor: pointer;
|
|
1848
|
+
transition: all 0.2s ease;
|
|
1849
|
+
position: relative;
|
|
1850
|
+
display: flex;
|
|
1851
|
+
align-items: center;
|
|
1852
|
+
justify-content: center;
|
|
1853
|
+
gap: 6px;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
.cw-tab:hover {
|
|
1857
|
+
color: var(--cw-text);
|
|
1858
|
+
background: var(--cw-bg-muted);
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
.cw-tab-active {
|
|
1862
|
+
color: var(--cw-primary);
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
.cw-tab-active::after {
|
|
1866
|
+
content: '';
|
|
1867
|
+
position: absolute;
|
|
1868
|
+
bottom: -1px;
|
|
1869
|
+
left: 0;
|
|
1870
|
+
right: 0;
|
|
1871
|
+
height: 2px;
|
|
1872
|
+
background: var(--cw-primary);
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
.cw-tab-badge {
|
|
1876
|
+
font-size: 11px;
|
|
1877
|
+
padding: 2px 6px;
|
|
1878
|
+
background: var(--cw-bg-muted);
|
|
1879
|
+
border-radius: 10px;
|
|
1880
|
+
color: var(--cw-text-muted);
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
.cw-tab-active .cw-tab-badge {
|
|
1884
|
+
background: var(--cw-primary);
|
|
1885
|
+
color: white;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/* =============================================================================
|
|
1889
|
+
TASK LIST
|
|
1890
|
+
============================================================================= */
|
|
1891
|
+
|
|
1892
|
+
.cw-tasks-container {
|
|
1893
|
+
flex: 1;
|
|
1894
|
+
display: flex;
|
|
1895
|
+
flex-direction: column;
|
|
1896
|
+
overflow: hidden;
|
|
1897
|
+
background: var(--cw-bg);
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
.cw-tasks-header {
|
|
1901
|
+
display: flex;
|
|
1902
|
+
align-items: center;
|
|
1903
|
+
justify-content: space-between;
|
|
1904
|
+
padding: 12px 16px;
|
|
1905
|
+
border-bottom: 1px solid var(--cw-border);
|
|
1906
|
+
background: var(--cw-bg-muted);
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
.cw-tasks-progress {
|
|
1910
|
+
display: flex;
|
|
1911
|
+
align-items: center;
|
|
1912
|
+
gap: 10px;
|
|
1913
|
+
flex: 1;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
.cw-tasks-progress-text {
|
|
1917
|
+
font-size: 12px;
|
|
1918
|
+
color: var(--cw-text-muted);
|
|
1919
|
+
white-space: nowrap;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
.cw-tasks-progress-bar {
|
|
1923
|
+
flex: 1;
|
|
1924
|
+
height: 6px;
|
|
1925
|
+
background: var(--cw-border);
|
|
1926
|
+
border-radius: 3px;
|
|
1927
|
+
overflow: hidden;
|
|
1928
|
+
max-width: 120px;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
.cw-tasks-progress-fill {
|
|
1932
|
+
height: 100%;
|
|
1933
|
+
background: var(--cw-primary);
|
|
1934
|
+
border-radius: 3px;
|
|
1935
|
+
transition: width 0.3s ease;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
.cw-tasks-actions {
|
|
1939
|
+
display: flex;
|
|
1940
|
+
gap: 4px;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
.cw-tasks-action-btn {
|
|
1944
|
+
width: 28px;
|
|
1945
|
+
height: 28px;
|
|
1946
|
+
border: none;
|
|
1947
|
+
background: transparent;
|
|
1948
|
+
color: var(--cw-text-muted);
|
|
1949
|
+
cursor: pointer;
|
|
1950
|
+
border-radius: var(--cw-radius-sm);
|
|
1951
|
+
display: flex;
|
|
1952
|
+
align-items: center;
|
|
1953
|
+
justify-content: center;
|
|
1954
|
+
font-size: 14px;
|
|
1955
|
+
transition: all 0.2s ease;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
.cw-tasks-action-btn:hover {
|
|
1959
|
+
background: var(--cw-bg);
|
|
1960
|
+
color: var(--cw-text);
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
.cw-tasks-error {
|
|
1964
|
+
padding: 8px 16px;
|
|
1965
|
+
background: #fee2e2;
|
|
1966
|
+
color: #dc2626;
|
|
1967
|
+
font-size: 12px;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
.cw-tasks-list {
|
|
1971
|
+
flex: 1;
|
|
1972
|
+
overflow-y: auto;
|
|
1973
|
+
padding: 8px 0;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
.cw-tasks-empty {
|
|
1977
|
+
display: flex;
|
|
1978
|
+
flex-direction: column;
|
|
1979
|
+
align-items: center;
|
|
1980
|
+
justify-content: center;
|
|
1981
|
+
padding: 40px 20px;
|
|
1982
|
+
text-align: center;
|
|
1983
|
+
color: var(--cw-text-muted);
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
.cw-tasks-empty p {
|
|
1987
|
+
margin: 0;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
.cw-tasks-empty-hint {
|
|
1991
|
+
font-size: 12px;
|
|
1992
|
+
margin-top: 8px !important;
|
|
1993
|
+
opacity: 0.7;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
.cw-tasks-loading {
|
|
1997
|
+
display: flex;
|
|
1998
|
+
align-items: center;
|
|
1999
|
+
justify-content: center;
|
|
2000
|
+
padding: 40px 20px;
|
|
2001
|
+
color: var(--cw-text-muted);
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
/* Task Item */
|
|
2005
|
+
.cw-task-item {
|
|
2006
|
+
display: flex;
|
|
2007
|
+
align-items: center;
|
|
2008
|
+
gap: 8px;
|
|
2009
|
+
padding: 8px 12px;
|
|
2010
|
+
transition: background 0.15s ease;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
.cw-task-item:hover {
|
|
2014
|
+
background: var(--cw-bg-muted);
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
.cw-task-state-btn {
|
|
2018
|
+
width: 20px;
|
|
2019
|
+
height: 20px;
|
|
2020
|
+
border: none;
|
|
2021
|
+
background: transparent;
|
|
2022
|
+
cursor: pointer;
|
|
2023
|
+
font-size: 14px;
|
|
2024
|
+
padding: 0;
|
|
2025
|
+
display: flex;
|
|
2026
|
+
align-items: center;
|
|
2027
|
+
justify-content: center;
|
|
2028
|
+
color: var(--cw-text-muted);
|
|
2029
|
+
flex-shrink: 0;
|
|
2030
|
+
transition: transform 0.15s ease;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
.cw-task-state-btn:hover {
|
|
2034
|
+
transform: scale(1.2);
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
.cw-task-state-not-started .cw-task-state-btn {
|
|
2038
|
+
color: var(--cw-text-muted);
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
.cw-task-state-in-progress .cw-task-state-btn {
|
|
2042
|
+
color: #f59e0b;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
.cw-task-state-complete .cw-task-state-btn {
|
|
2046
|
+
color: #10b981;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
.cw-task-state-cancelled .cw-task-state-btn {
|
|
2050
|
+
color: #ef4444;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
.cw-task-name {
|
|
2054
|
+
flex: 1;
|
|
2055
|
+
font-size: 13px;
|
|
2056
|
+
color: var(--cw-text);
|
|
2057
|
+
cursor: text;
|
|
2058
|
+
padding: 2px 4px;
|
|
2059
|
+
border-radius: 4px;
|
|
2060
|
+
transition: background 0.15s ease;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
.cw-task-name:hover {
|
|
2064
|
+
background: var(--cw-bg);
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
.cw-task-state-complete .cw-task-name {
|
|
2068
|
+
text-decoration: line-through;
|
|
2069
|
+
color: var(--cw-text-muted);
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
.cw-task-state-cancelled .cw-task-name {
|
|
2073
|
+
text-decoration: line-through;
|
|
2074
|
+
color: var(--cw-text-muted);
|
|
2075
|
+
opacity: 0.6;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
.cw-task-edit-input {
|
|
2079
|
+
flex: 1;
|
|
2080
|
+
font-size: 13px;
|
|
2081
|
+
padding: 4px 8px;
|
|
2082
|
+
border: 1px solid var(--cw-primary);
|
|
2083
|
+
border-radius: 4px;
|
|
2084
|
+
outline: none;
|
|
2085
|
+
background: var(--cw-bg);
|
|
2086
|
+
color: var(--cw-text);
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
.cw-task-remove-btn {
|
|
2090
|
+
width: 20px;
|
|
2091
|
+
height: 20px;
|
|
2092
|
+
border: none;
|
|
2093
|
+
background: transparent;
|
|
2094
|
+
cursor: pointer;
|
|
2095
|
+
font-size: 16px;
|
|
2096
|
+
padding: 0;
|
|
2097
|
+
display: flex;
|
|
2098
|
+
align-items: center;
|
|
2099
|
+
justify-content: center;
|
|
2100
|
+
color: var(--cw-text-muted);
|
|
2101
|
+
opacity: 0;
|
|
2102
|
+
transition: all 0.15s ease;
|
|
2103
|
+
flex-shrink: 0;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
.cw-task-item:hover .cw-task-remove-btn {
|
|
2107
|
+
opacity: 1;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
.cw-task-remove-btn:hover {
|
|
2111
|
+
color: #ef4444;
|
|
1671
2112
|
}
|