agentgui 1.0.417 → 1.0.418
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/package.json +1 -1
- package/static/js/client.js +10 -61
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -355,7 +355,6 @@ class AgentGUIClient {
|
|
|
355
355
|
this.ui.messageInput = document.querySelector('[data-message-input]');
|
|
356
356
|
this.ui.sendButton = document.querySelector('[data-send-button]');
|
|
357
357
|
this.ui.agentSelector = document.querySelector('[data-agent-selector]');
|
|
358
|
-
this.ui.agentSelector = document.querySelector('[data-agent-selector]');
|
|
359
358
|
this.ui.modelSelector = document.querySelector('[data-model-selector]');
|
|
360
359
|
|
|
361
360
|
if (this.ui.agentSelector) {
|
|
@@ -1900,37 +1899,15 @@ class AgentGUIClient {
|
|
|
1900
1899
|
|
|
1901
1900
|
lockAgentAndModel(agentId, model) {
|
|
1902
1901
|
this._agentLocked = true;
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
if (agent) {
|
|
1908
|
-
if (agent.protocol === 'cli') {
|
|
1909
|
-
if (this.ui.agentSelector) {
|
|
1910
|
-
this.ui.agentSelector.value = agentId;
|
|
1911
|
-
this.ui.agentSelector.disabled = true;
|
|
1912
|
-
}
|
|
1913
|
-
if (this.ui.agentSelector) {
|
|
1914
|
-
this.ui.agentSelector.value = '';
|
|
1915
|
-
this.ui.agentSelector.disabled = true;
|
|
1916
|
-
this.ui.agentSelector.style.display = 'none';
|
|
1917
|
-
}
|
|
1918
|
-
} else {
|
|
1919
|
-
if (this.ui.agentSelector) {
|
|
1920
|
-
this.ui.agentSelector.value = agentId;
|
|
1921
|
-
this.ui.agentSelector.disabled = true;
|
|
1922
|
-
}
|
|
1923
|
-
if (this.ui.agentSelector) {
|
|
1924
|
-
this.ui.agentSelector.value = '';
|
|
1925
|
-
this.ui.agentSelector.disabled = true;
|
|
1926
|
-
this.ui.agentSelector.style.display = 'none';
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1902
|
+
if (this.ui.agentSelector) {
|
|
1903
|
+
this.ui.agentSelector.value = agentId;
|
|
1904
|
+
this.ui.agentSelector.disabled = true;
|
|
1929
1905
|
}
|
|
1930
|
-
|
|
1906
|
+
|
|
1931
1907
|
this.loadModelsForAgent(agentId).then(() => {
|
|
1932
1908
|
if (this.ui.modelSelector && model) {
|
|
1933
1909
|
this.ui.modelSelector.value = model;
|
|
1910
|
+
this.ui.modelSelector.disabled = true;
|
|
1934
1911
|
}
|
|
1935
1912
|
});
|
|
1936
1913
|
}
|
|
@@ -1939,17 +1916,10 @@ class AgentGUIClient {
|
|
|
1939
1916
|
this._agentLocked = false;
|
|
1940
1917
|
if (this.ui.agentSelector) {
|
|
1941
1918
|
this.ui.agentSelector.disabled = false;
|
|
1942
|
-
}
|
|
1943
|
-
if (this.ui.agentSelector) {
|
|
1944
|
-
this.ui.agentSelector.disabled = false;
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
// Show both selectors again when unlocking
|
|
1948
|
-
if (this.ui.agentSelector && this.state.agents.some(a => a.protocol === 'cli')) {
|
|
1949
1919
|
this.ui.agentSelector.style.display = 'inline-block';
|
|
1950
1920
|
}
|
|
1951
|
-
if (this.ui.
|
|
1952
|
-
this.ui.
|
|
1921
|
+
if (this.ui.modelSelector) {
|
|
1922
|
+
this.ui.modelSelector.disabled = false;
|
|
1953
1923
|
}
|
|
1954
1924
|
}
|
|
1955
1925
|
|
|
@@ -1965,31 +1935,10 @@ class AgentGUIClient {
|
|
|
1965
1935
|
this.lockAgentAndModel(agentId, model);
|
|
1966
1936
|
} else {
|
|
1967
1937
|
this.unlockAgentAndModel();
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
if (agent) {
|
|
1972
|
-
if (agent.protocol === 'cli') {
|
|
1973
|
-
if (this.ui.agentSelector) {
|
|
1974
|
-
this.ui.agentSelector.value = agentId;
|
|
1975
|
-
this.ui.agentSelector.style.display = 'inline-block';
|
|
1976
|
-
}
|
|
1977
|
-
if (this.ui.agentSelector) {
|
|
1978
|
-
this.ui.agentSelector.value = '';
|
|
1979
|
-
this.ui.agentSelector.style.display = 'none';
|
|
1980
|
-
}
|
|
1981
|
-
} else {
|
|
1982
|
-
if (this.ui.agentSelector) {
|
|
1983
|
-
this.ui.agentSelector.value = agentId;
|
|
1984
|
-
this.ui.agentSelector.style.display = 'inline-block';
|
|
1985
|
-
}
|
|
1986
|
-
if (this.ui.agentSelector) {
|
|
1987
|
-
this.ui.agentSelector.value = '';
|
|
1988
|
-
this.ui.agentSelector.style.display = 'none';
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1938
|
+
if (this.ui.agentSelector) {
|
|
1939
|
+
this.ui.agentSelector.value = agentId;
|
|
1991
1940
|
}
|
|
1992
|
-
|
|
1941
|
+
|
|
1993
1942
|
this.loadModelsForAgent(agentId).then(() => {
|
|
1994
1943
|
if (model && this.ui.modelSelector) {
|
|
1995
1944
|
this.ui.modelSelector.value = model;
|