agentgui 1.0.426 → 1.0.428
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/server.js +2 -1
- package/static/js/client.js +8 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -3173,7 +3173,8 @@ function serveFile(filePath, res, req) {
|
|
|
3173
3173
|
if (err) { res.writeHead(500); res.end('Server error'); return; }
|
|
3174
3174
|
let content = data.toString();
|
|
3175
3175
|
const baseTag = `<script>window.__BASE_URL='${BASE_URL}';</script>`;
|
|
3176
|
-
content = content.replace('<head>',
|
|
3176
|
+
content = content.replace('<head>', `<head>\n <base href="${BASE_URL}/">\n ` + baseTag);
|
|
3177
|
+
content = content.replace(/(href|src)="vendor\//g, `$1="${BASE_URL}/vendor/`);
|
|
3177
3178
|
if (watch) {
|
|
3178
3179
|
content += `\n<script>(function(){const ws=new WebSocket((location.protocol==='https:'?'wss://':'ws://')+location.host+'${BASE_URL}/hot-reload');ws.onmessage=e=>{if(JSON.parse(e.data).type==='reload')location.reload()};})();</script>`;
|
|
3179
3180
|
}
|
package/static/js/client.js
CHANGED
|
@@ -2571,6 +2571,14 @@ class AgentGUIClient {
|
|
|
2571
2571
|
return this.getEffectiveAgentId();
|
|
2572
2572
|
}
|
|
2573
2573
|
|
|
2574
|
+
saveAgentAndModelToConversation() {
|
|
2575
|
+
const convId = this.state.currentConversation;
|
|
2576
|
+
if (!convId || this._agentLocked) return;
|
|
2577
|
+
const agentId = this.getEffectiveAgentId();
|
|
2578
|
+
const model = this.getCurrentModel();
|
|
2579
|
+
window.wsClient.rpc('conv.upd', { id: convId, agentType: agentId, model: model || undefined }).catch(() => {});
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2574
2582
|
/**
|
|
2575
2583
|
* Get current selected model
|
|
2576
2584
|
*/
|