rename GIFs to English, clean up unused files
@@ -100,6 +100,20 @@ function T(key) {
|
||||
}
|
||||
|
||||
var PRIORITY = ['error','working','typing','thinking','prompt','done','idle'];
|
||||
|
||||
// Status icons
|
||||
var STATUS_ICONS = {};
|
||||
(function loadIcons() {
|
||||
var icons = {thinking:'thinking.gif',working:'working.gif',typing:'typing.gif',done:'done.gif',error:'error.gif'};
|
||||
Object.keys(icons).forEach(function(k) {
|
||||
try {
|
||||
var file = icons[k];
|
||||
var ext = file.split('.').pop().toLowerCase();
|
||||
var mime = ext === 'png' ? 'image/png' : ext === 'gif' ? 'image/gif' : 'image/svg+xml';
|
||||
STATUS_ICONS[k] = 'data:' + mime + ';base64,' + fs.readFileSync(path.join(__dirname, '..', 'static', 'img', file)).toString('base64');
|
||||
} catch(_) {}
|
||||
});
|
||||
})();
|
||||
var states = {}; // per-context state: { agent, currentState, lastActivity, offsets, timer, logoUri }
|
||||
|
||||
function makeSvg(fill, label, blink, breathe) {
|
||||
@@ -112,18 +126,17 @@ function makeSvg(fill, label, blink, breathe) {
|
||||
function setDisplay(ctx, state) {
|
||||
var d = STATUS[state] || STATUS['idle'];
|
||||
var ss = states[ctx];
|
||||
if (state === 'idle' && ss && ss.agent) {
|
||||
// Use relative PNG path for idle
|
||||
if (state === 'idle' && ss && ss.agent && ss.agent.logoFile) {
|
||||
plugin.setTitle(ctx, '');
|
||||
plugin.setImage(ctx, 'static/img/' + ss.agent.logoFile);
|
||||
} else {
|
||||
plugin.setTitle(ctx, d.title);
|
||||
var svg = '<svg width="144" height="144" xmlns="http://www.w3.org/2000/svg"><rect width="144" height="144" rx="20" fill="none"/>';
|
||||
var anim = '';
|
||||
if (d.blink) anim = '<animate attributeName="opacity" values="1;0.2;1" dur="0.8s" repeatCount="indefinite"/>';
|
||||
else if (d.breathe) anim = '<animate attributeName="opacity" values="1;0.4;1" dur="2s" repeatCount="indefinite"/>';
|
||||
svg += '<circle cx="72" cy="58" r="32" fill="' + d.fill + '">' + anim + '</circle></svg>';
|
||||
plugin.setImage(ctx, 'data:image/svg+xml;charset=utf-8,' + svg);
|
||||
var icon = STATUS_ICONS[state];
|
||||
if (icon) {
|
||||
plugin.setImage(ctx, icon);
|
||||
} else {
|
||||
plugin.setImage(ctx, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<svg fill="none" height="2500" viewBox="0 -.01 39.5 39.53" width="2500" xmlns="http://www.w3.org/2000/svg"><path d="m7.75 26.27 7.77-4.36.13-.38-.13-.21h-.38l-1.3-.08-4.44-.12-3.85-.16-3.73-.2-.94-.2-.88-1.16.09-.58.79-.53 1.13.1 2.5.17 3.75.26 2.72.16 4.03.42h.64l.09-.26-.22-.16-.17-.16-3.88-2.63-4.2-2.78-2.2-1.6-1.19-.81-.6-.76-.26-1.66 1.08-1.19 1.45.1.37.1 1.47 1.13 3.14 2.43 4.1 3.02.6.5.24-.17.03-.12-.27-.45-2.23-4.03-2.38-4.1-1.06-1.7-.28-1.02c-.1-.42-.17-.77-.17-1.2l1.23-1.67.68-.22 1.64.22.69.6 1.02 2.33 1.65 3.67 2.56 4.99.75 1.48.4 1.37.15.42h.26v-.24l.21-2.81.39-3.45.38-4.44.13-1.25.62-1.5 1.23-.81.96.46.79 1.13-.11.73-.47 3.05-.92 4.78-.6 3.2h.35l.4-.4 1.62-2.15 2.72-3.4 1.2-1.35 1.4-1.49.9-.71h1.7l1.25 1.86-.56 1.92-1.75 2.22-1.45 1.88-2.08 2.8-1.3 2.24.12.18.31-.03 4.7-1 2.54-.46 3.03-.52 1.37.64.15.65-.54 1.33-3.24.8-3.8.76-5.66 1.34-.07.05.08.1 2.55.24 1.09.06h2.67l4.97.37 1.3.86.78 1.05-.13.8-2 1.02-2.7-.64-6.3-1.5-2.16-.54h-.3v.18l1.8 1.76 3.3 2.98 4.13 3.84.21.95-.53.75-.56-.08-3.63-2.73-1.4-1.23-3.17-2.67h-.21v.28l.73 1.07 3.86 5.8.2 1.78-.28.58-1 .35-1.1-.2-2.26-3.17-2.33-3.57-1.88-3.2-.23.13-1.11 11.95-.52.61-1.2.46-1-.76-.53-1.23.53-2.43.64-3.17.52-2.52.47-3.13.28-1.04-.02-.07-.23.03-2.36 3.24-3.59 4.85-2.84 3.04-.68.27-1.18-.61.11-1.09.66-.97 3.93-5 2.37-3.1 1.53-1.79-.01-.26h-.09l-10.44 6.78-1.86.24-.8-.75.1-1.23.38-.4 3.14-2.16z" fill="#d97757"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,6 +0,0 @@
|
||||
<svg fill="none" height="144" viewBox="0 0 144 144" width="144" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Codex</title>
|
||||
<polygon points="72,12 130,48 130,120 72,156 14,120 14,48" fill="none" stroke="#6366f1" stroke-width="6"/>
|
||||
<text x="72" y="80" text-anchor="middle" font-family="Arial,sans-serif" font-weight="bold" font-size="52" fill="#6366f1">CX</text>
|
||||
<text x="72" y="118" text-anchor="middle" font-family="Arial,sans-serif" font-size="16" fill="#818cf8">Codex</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 490 B |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 33 KiB |
@@ -1,5 +0,0 @@
|
||||
<svg fill="none" height="144" viewBox="0 0 144 144" width="144" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>opencode</title>
|
||||
<rect x="24" y="24" width="96" height="96" rx="16" fill="none" stroke="#06b6d4" stroke-width="5"/>
|
||||
<text x="52" y="92" font-family="monospace" font-size="64" fill="#06b6d4">>_</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 323 B |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 43 KiB |