protocol-proxy 2.8.2 → 2.8.3

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/public/style.css CHANGED
@@ -1784,3 +1784,329 @@ body {
1784
1784
  background: var(--accent-subtle);
1785
1785
  color: var(--accent);
1786
1786
  }
1787
+
1788
+ /* ---------- Assistant Page ---------- */
1789
+ .assistant-layout {
1790
+ display: flex;
1791
+ flex-direction: column;
1792
+ height: calc(100vh - var(--topbar-height) - 48px);
1793
+ gap: 16px;
1794
+ }
1795
+
1796
+ .assistant-toolbar {
1797
+ display: flex;
1798
+ align-items: center;
1799
+ justify-content: space-between;
1800
+ gap: 12px;
1801
+ flex-shrink: 0;
1802
+ }
1803
+
1804
+ .assistant-model-select {
1805
+ display: flex;
1806
+ align-items: center;
1807
+ gap: 8px;
1808
+ }
1809
+
1810
+ .assistant-model-select label {
1811
+ font-size: 12px;
1812
+ color: var(--text-muted);
1813
+ font-weight: 600;
1814
+ text-transform: uppercase;
1815
+ letter-spacing: 0.04em;
1816
+ }
1817
+
1818
+ .assistant-model-select select {
1819
+ height: 32px;
1820
+ padding: 0 10px;
1821
+ background: var(--bg-elevated);
1822
+ border: 1px solid var(--border-default);
1823
+ border-radius: var(--radius-md);
1824
+ color: var(--text-primary);
1825
+ font-size: 13px;
1826
+ font-family: var(--font-body);
1827
+ outline: none;
1828
+ cursor: pointer;
1829
+ }
1830
+
1831
+ .assistant-chat {
1832
+ flex: 1;
1833
+ overflow-y: auto;
1834
+ display: flex;
1835
+ flex-direction: column;
1836
+ gap: 12px;
1837
+ padding: 16px;
1838
+ background: var(--bg-elevated);
1839
+ border: 1px solid var(--border-default);
1840
+ border-radius: var(--radius-lg);
1841
+ min-height: 0;
1842
+ }
1843
+
1844
+ .assistant-message {
1845
+ max-width: 85%;
1846
+ padding: 12px 16px;
1847
+ border-radius: var(--radius-lg);
1848
+ font-size: 14px;
1849
+ line-height: 1.6;
1850
+ word-break: break-word;
1851
+ animation: msg-in 200ms ease;
1852
+ }
1853
+
1854
+ @keyframes msg-in {
1855
+ from { opacity: 0; transform: translateY(4px); }
1856
+ to { opacity: 1; transform: translateY(0); }
1857
+ }
1858
+
1859
+ .assistant-message.user {
1860
+ align-self: flex-end;
1861
+ background: var(--accent);
1862
+ color: #fff;
1863
+ }
1864
+
1865
+ .assistant-message.assistant {
1866
+ align-self: flex-start;
1867
+ background: var(--bg-surface);
1868
+ color: var(--text-secondary);
1869
+ border: 1px solid var(--border-default);
1870
+ }
1871
+
1872
+ .assistant-message.assistant pre {
1873
+ background: var(--bg-base);
1874
+ padding: 12px;
1875
+ border-radius: var(--radius-md);
1876
+ overflow-x: auto;
1877
+ font-family: var(--font-mono);
1878
+ font-size: 12px;
1879
+ margin: 8px 0;
1880
+ border: 1px solid var(--border-subtle);
1881
+ }
1882
+
1883
+ .assistant-message.assistant code {
1884
+ font-family: var(--font-mono);
1885
+ font-size: 12px;
1886
+ background: var(--bg-base);
1887
+ padding: 2px 6px;
1888
+ border-radius: var(--radius-sm);
1889
+ color: var(--text-primary);
1890
+ }
1891
+
1892
+ .assistant-message.assistant p {
1893
+ margin-bottom: 8px;
1894
+ }
1895
+
1896
+ .assistant-message.assistant p:last-child {
1897
+ margin-bottom: 0;
1898
+ }
1899
+
1900
+ .assistant-message.assistant ul,
1901
+ .assistant-message.assistant ol {
1902
+ margin: 8px 0;
1903
+ padding-left: 20px;
1904
+ }
1905
+
1906
+ .assistant-message.assistant li {
1907
+ margin-bottom: 4px;
1908
+ }
1909
+
1910
+ .assistant-message.assistant strong {
1911
+ color: var(--text-primary);
1912
+ font-weight: 600;
1913
+ }
1914
+
1915
+ .assistant-welcome {
1916
+ text-align: center;
1917
+ padding: 40px 20px;
1918
+ color: var(--text-muted);
1919
+ margin: auto;
1920
+ }
1921
+
1922
+ .assistant-welcome-icon {
1923
+ margin-bottom: 16px;
1924
+ color: var(--accent);
1925
+ opacity: 0.7;
1926
+ }
1927
+
1928
+ .assistant-welcome h3 {
1929
+ color: var(--text-primary);
1930
+ font-size: 20px;
1931
+ font-weight: 700;
1932
+ margin-bottom: 12px;
1933
+ font-family: var(--font-display);
1934
+ }
1935
+
1936
+ .assistant-welcome ul {
1937
+ text-align: left;
1938
+ display: inline-block;
1939
+ margin: 12px 0;
1940
+ padding-left: 20px;
1941
+ }
1942
+
1943
+ .assistant-welcome li {
1944
+ margin-bottom: 6px;
1945
+ }
1946
+
1947
+ .assistant-hint {
1948
+ font-size: 12px;
1949
+ color: var(--text-faint);
1950
+ margin-top: 16px;
1951
+ }
1952
+
1953
+ .assistant-input-area {
1954
+ display: flex;
1955
+ gap: 8px;
1956
+ align-items: flex-end;
1957
+ flex-shrink: 0;
1958
+ }
1959
+
1960
+ .assistant-input-area textarea {
1961
+ flex: 1;
1962
+ min-height: 44px;
1963
+ max-height: 120px;
1964
+ padding: 10px 14px;
1965
+ background: var(--bg-elevated);
1966
+ border: 1px solid var(--border-default);
1967
+ border-radius: var(--radius-md);
1968
+ color: var(--text-primary);
1969
+ font-family: var(--font-body);
1970
+ font-size: 14px;
1971
+ outline: none;
1972
+ resize: none;
1973
+ line-height: 1.5;
1974
+ transition: all var(--transition-micro);
1975
+ }
1976
+
1977
+ .assistant-input-area textarea:focus {
1978
+ border-color: var(--accent);
1979
+ box-shadow: 0 0 0 3px var(--accent-subtle);
1980
+ }
1981
+
1982
+ .assistant-thinking {
1983
+ align-self: flex-start;
1984
+ display: flex;
1985
+ align-items: center;
1986
+ gap: 6px;
1987
+ padding: 10px 14px;
1988
+ background: var(--bg-surface);
1989
+ border-radius: var(--radius-lg);
1990
+ color: var(--text-muted);
1991
+ font-size: 13px;
1992
+ border: 1px solid var(--border-default);
1993
+ }
1994
+
1995
+ .assistant-dot {
1996
+ width: 6px;
1997
+ height: 6px;
1998
+ border-radius: 50%;
1999
+ background: var(--text-muted);
2000
+ animation: assistant-bounce 1.4s infinite ease-in-out both;
2001
+ }
2002
+
2003
+ .assistant-dot:nth-child(1) { animation-delay: -0.32s; }
2004
+ .assistant-dot:nth-child(2) { animation-delay: -0.16s; }
2005
+
2006
+ @keyframes assistant-bounce {
2007
+ 0%, 80%, 100% { transform: scale(0); }
2008
+ 40% { transform: scale(1); }
2009
+ }
2010
+
2011
+ /* 工具调用块 */
2012
+ .assistant-message.tool-calls {
2013
+ align-self: flex-start;
2014
+ max-width: 85%;
2015
+ background: var(--bg-surface);
2016
+ border: 1px solid var(--accent-border);
2017
+ border-left: 3px solid var(--accent);
2018
+ border-radius: var(--radius-md);
2019
+ padding: 10px 14px;
2020
+ font-size: 13px;
2021
+ color: var(--text-muted);
2022
+ }
2023
+
2024
+ .tool-calls-header {
2025
+ font-size: 11px;
2026
+ font-weight: 600;
2027
+ text-transform: uppercase;
2028
+ letter-spacing: 0.05em;
2029
+ color: var(--accent);
2030
+ margin-bottom: 6px;
2031
+ }
2032
+
2033
+ .tool-call-item {
2034
+ display: flex;
2035
+ align-items: center;
2036
+ gap: 8px;
2037
+ padding: 3px 0;
2038
+ }
2039
+
2040
+ .tool-call-name {
2041
+ font-family: var(--font-mono);
2042
+ font-size: 12px;
2043
+ color: var(--accent);
2044
+ font-weight: 500;
2045
+ }
2046
+
2047
+ .tool-call-args {
2048
+ font-family: var(--font-mono);
2049
+ font-size: 11px;
2050
+ color: var(--text-faint);
2051
+ max-width: 300px;
2052
+ overflow: hidden;
2053
+ text-overflow: ellipsis;
2054
+ white-space: nowrap;
2055
+ }
2056
+
2057
+ /* 工具结果块 */
2058
+ .assistant-message.tool-result {
2059
+ align-self: flex-start;
2060
+ max-width: 85%;
2061
+ background: var(--bg-elevated);
2062
+ border: 1px solid var(--border-subtle);
2063
+ border-left: 3px solid var(--success);
2064
+ border-radius: var(--radius-md);
2065
+ padding: 8px 12px;
2066
+ font-size: 12px;
2067
+ color: var(--text-faint);
2068
+ }
2069
+
2070
+ .tool-result-header {
2071
+ display: flex;
2072
+ align-items: center;
2073
+ justify-content: space-between;
2074
+ cursor: pointer;
2075
+ user-select: none;
2076
+ }
2077
+
2078
+ .tool-result-name {
2079
+ font-family: var(--font-mono);
2080
+ font-size: 12px;
2081
+ color: var(--text-secondary);
2082
+ font-weight: 500;
2083
+ }
2084
+
2085
+ .tool-result-toggle {
2086
+ font-size: 11px;
2087
+ color: var(--text-muted);
2088
+ }
2089
+
2090
+ .tool-result-body {
2091
+ display: none;
2092
+ margin-top: 8px;
2093
+ padding: 8px;
2094
+ background: var(--bg-base);
2095
+ border-radius: var(--radius-sm);
2096
+ border: 1px solid var(--border-subtle);
2097
+ max-height: 200px;
2098
+ overflow-y: auto;
2099
+ }
2100
+
2101
+ .tool-result-body.expanded {
2102
+ display: block;
2103
+ }
2104
+
2105
+ .tool-result-body pre {
2106
+ margin: 0;
2107
+ font-family: var(--font-mono);
2108
+ font-size: 11px;
2109
+ white-space: pre-wrap;
2110
+ word-break: break-all;
2111
+ color: var(--text-secondary);
2112
+ }