shadok-ai 0.19.93 → 0.19.94
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/public/auth-expiry.js +5 -3
- package/public/bar-overflow.js +6 -5
- package/public/index.html +240 -183
- package/public/line-icons.js +218 -0
- package/public/profile-card.js +8 -8
package/package.json
CHANGED
package/public/auth-expiry.js
CHANGED
|
@@ -96,7 +96,7 @@ export function accountExpiryLine(auth, now = Date.now()) {
|
|
|
96
96
|
* connect?: {state: string, multiTenant: boolean, agentAuth: string, user: string|null, expiresAt: number|null}}|null} auth
|
|
97
97
|
* @param {boolean} isAdmin
|
|
98
98
|
* @param {number} [now]
|
|
99
|
-
* @returns {{account: string, token: string, tokenTone: ""|"warn"|"err", relogin: string|null, replaceToken: boolean}|null}
|
|
99
|
+
* @returns {{account: string, token: string, tokenTone: ""|"warn"|"err", relogin: string|null, reloginIcon: string, replaceToken: boolean}|null}
|
|
100
100
|
*/
|
|
101
101
|
export function agentCredentialRows(auth, isAdmin, now = Date.now()) {
|
|
102
102
|
const c = auth && auth.connect;
|
|
@@ -121,8 +121,10 @@ export function agentCredentialRows(auth, isAdmin, now = Date.now()) {
|
|
|
121
121
|
}
|
|
122
122
|
// "unknown" is a failed probe, not a state to act on (invariant 27).
|
|
123
123
|
const relogin = !isAdmin || c.state === "unknown" ? null
|
|
124
|
-
: c.state === "no" ? "
|
|
125
|
-
|
|
124
|
+
: c.state === "no" ? "Connect Claude…" : "Re-login to Claude";
|
|
125
|
+
// The line icon the button draws in front of the label (public/line-icons.js).
|
|
126
|
+
const reloginIcon = relogin && c.state === "no" ? "plug" : "reload";
|
|
127
|
+
return { account, token, tokenTone, relogin, reloginIcon, replaceToken: isAdmin && !!auth.longLived && !login };
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
/** 5 days: the usage-gauge login is a month-long credential whose renewal needs
|
package/public/bar-overflow.js
CHANGED
|
@@ -36,10 +36,10 @@ export function nameReads({ clientWidth, scrollWidth }, minPx) {
|
|
|
36
36
|
*/
|
|
37
37
|
export const CHAN_OVERFLOW = [
|
|
38
38
|
{ id: "chanWebhooks", menu: null },
|
|
39
|
-
{ id: "chanGallery", menu: "
|
|
39
|
+
{ id: "chanGallery", menu: "Media gallery", icon: "gallery" },
|
|
40
40
|
{ id: "chanCron", menu: null },
|
|
41
|
-
{ id: "chanInfo", menu: "
|
|
42
|
-
{ id: "chanTerm", menu: "
|
|
41
|
+
{ id: "chanInfo", menu: "About this agent", icon: "info" },
|
|
42
|
+
{ id: "chanTerm", menu: "Terminal", icon: "terminal", menuOn: "Back to the chat", iconOn: "chat" },
|
|
43
43
|
];
|
|
44
44
|
|
|
45
45
|
/** The agent bar's overflowable icon ids, in the order they leave the row. */
|
|
@@ -50,13 +50,14 @@ export function chanOverflowIds() {
|
|
|
50
50
|
/**
|
|
51
51
|
* The entries the agent menu gains for the icons hidden from the bar, in the
|
|
52
52
|
* order they left it. `hidden` is the set of hidden ids, `on` the set of toggles currently
|
|
53
|
-
* pressed (the terminal view).
|
|
53
|
+
* pressed (the terminal view). `icon` names an entry of the menu's line-icon set.
|
|
54
54
|
*/
|
|
55
55
|
export function chanOverflowItems(hidden, on = new Set()) {
|
|
56
56
|
const out = [];
|
|
57
57
|
for (const it of CHAN_OVERFLOW) {
|
|
58
58
|
if (!it.menu || !hidden.has(it.id)) continue;
|
|
59
|
-
|
|
59
|
+
const pressed = on.has(it.id) && it.menuOn;
|
|
60
|
+
out.push({ id: it.id, label: pressed ? it.menuOn : it.menu, icon: pressed ? it.iconOn : it.icon });
|
|
60
61
|
}
|
|
61
62
|
return out;
|
|
62
63
|
}
|