@hydra-acp/browser 0.1.3 → 0.1.4
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/dist/ui/index.html +14 -3
- package/package.json +1 -1
package/dist/ui/index.html
CHANGED
|
@@ -1073,6 +1073,16 @@ pre code { background: transparent; padding: 0; }
|
|
|
1073
1073
|
function shortSessionId(sessionId) {
|
|
1074
1074
|
return sessionId.replace(/^hydra_session_/, "");
|
|
1075
1075
|
}
|
|
1076
|
+
function shortenModel(model) {
|
|
1077
|
+
if (!model) return void 0;
|
|
1078
|
+
const idx = model.lastIndexOf("/");
|
|
1079
|
+
return idx === -1 ? model : model.slice(idx + 1);
|
|
1080
|
+
}
|
|
1081
|
+
function agentWithModel(agent, model) {
|
|
1082
|
+
const a = agent || "?";
|
|
1083
|
+
const m = shortenModel(model);
|
|
1084
|
+
return m ? `${a}(${m})` : a;
|
|
1085
|
+
}
|
|
1076
1086
|
function formatRelativeAge(iso, now = Date.now()) {
|
|
1077
1087
|
if (!iso) return "?";
|
|
1078
1088
|
const t = Date.parse(iso);
|
|
@@ -1248,7 +1258,7 @@ pre code { background: transparent; padding: 0; }
|
|
|
1248
1258
|
const title = s.title || fallbackTitle(s.sessionId);
|
|
1249
1259
|
const parts = [
|
|
1250
1260
|
shortSessionId(s.sessionId),
|
|
1251
|
-
s.agentId
|
|
1261
|
+
agentWithModel(s.agentId, s.currentModel),
|
|
1252
1262
|
`age ${formatRelativeAge(s.updatedAt)}`
|
|
1253
1263
|
];
|
|
1254
1264
|
if (showCwd) {
|
|
@@ -1608,6 +1618,7 @@ Replace it? (Any live attach will be closed.)`
|
|
|
1608
1618
|
const title = live?.title || c.title || fallbackTitle(c.sessionId);
|
|
1609
1619
|
const cwd = live?.cwd || c.cwd;
|
|
1610
1620
|
const agentId = live?.agentId || c.agentId;
|
|
1621
|
+
const model = c.model || live?.currentModel;
|
|
1611
1622
|
const header = el(
|
|
1612
1623
|
"div",
|
|
1613
1624
|
{ class: "chat-header" },
|
|
@@ -1619,7 +1630,7 @@ Replace it? (Any live attach will be closed.)`
|
|
|
1619
1630
|
el(
|
|
1620
1631
|
"div",
|
|
1621
1632
|
{ class: "row2" },
|
|
1622
|
-
`${shortSessionId(c.sessionId)} \xB7 ${agentId
|
|
1633
|
+
`${shortSessionId(c.sessionId)} \xB7 ${agentWithModel(agentId, model)} \xB7 ${cwd || "?"}`
|
|
1623
1634
|
)
|
|
1624
1635
|
),
|
|
1625
1636
|
!c.ready ? el("span", { class: "pill" }, "connecting\u2026") : c.inTurn ? el(
|
|
@@ -2254,7 +2265,7 @@ ${recent}`;
|
|
|
2254
2265
|
const live = state.sessions.find(
|
|
2255
2266
|
(s) => s.sessionId === state.current.sessionId
|
|
2256
2267
|
);
|
|
2257
|
-
const fp = live ? `${live.title}|${live.cwd}|${live.agentId}` : "";
|
|
2268
|
+
const fp = live ? `${live.title}|${live.cwd}|${live.agentId}|${live.currentModel}` : "";
|
|
2258
2269
|
if (fp !== state.current._lastMetaFp) {
|
|
2259
2270
|
state.current._lastMetaFp = fp;
|
|
2260
2271
|
render();
|