feat: GPU-Nummer im Chip-Symbol statt als Text daneben (#1108); Version 0.1.17-rc2

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GmHhg6sxZ8wsKZAVLQ6Xj5
This commit is contained in:
2026-11-21 20:20:26 +01:00
parent 8670f59e55
commit 0673dc6c00
9 changed files with 59 additions and 11 deletions

View File

@ -13,5 +13,6 @@ eingebauten WebSocket von Node (kein Paket, keine Installation). Sie laufen gege
| `kontrast.mjs` | Textkontrast aller sichtbaren Texte auf allen Seiten, hell und dunkel, Verläufe einzeln (Grenze 4,5:1, großer Text 3:1) | `browser2bedienung.4` |
| `fokusring.mjs` | Fokusring von Knopf, Link, Feld und Auswahl in beiden Themes | `browser2bedienung.4` |
| `embeddings.mjs` | Reiter Embeddings, Knöpfe je Modellart, Vektor-Test (Testinstanz mit bge-m3 und einem Chat-Modell, Standard-Port 18097) | `browser2embeddings.1` bis `.3` |
| `gpu-symbol.mjs` | GPU-Nummer im Symbol der Modelle-Tabelle, hell und dunkel, Screenshots | `browser2modellarten.4` |
`lib.mjs` ist der kleine Treiber. Die Skripte sind Prüfwerkzeuge, kein Teil des Programms.

View File

@ -0,0 +1,17 @@
// browser2modellarten.4 (#1108): GPU-Nummer steht im Symbol, kein Text daneben; Bilder in <Ordner> (Aufruf: node gpu-symbol.mjs <Passwort> <Ordner>); Testinstanz mit Modellen auf GPU 0,1 / 1 / 12.
import * as cdp from './lib.mjs';
import fs from 'node:fs';
const BASE=process.env.NEXUS_BASE||'http://127.0.0.1:18120', pw=process.argv[2];
const b=await cdp.start({port:9351});
try{
await b.login(BASE,'claude',pw);
await b.viewport(1100,500,{mobile:false});
for(const theme of ['light','dark']){
await b.goto(BASE+'/ui/modelle');
await b.eval(`document.documentElement.setAttribute('data-theme','${theme}');localStorage.setItem('theme','${theme}')`);
await new Promise(r=>setTimeout(r,600));
const info=await b.eval(`[...document.querySelectorAll('tr')].filter(r=>/gpu|zwei|eine/.test(r.innerText)).map(r=>{const c=[...r.querySelectorAll('.fkann')];return {zeile:r.innerText.split('\\n')[0].slice(0,24),symbole:c.map(x=>({text:x.innerText.trim(),svgText:x.querySelector('svg text')?.textContent,aria:x.querySelector('svg')?.getAttribute('aria-label'),w:Math.round(x.querySelector('svg').getBoundingClientRect().width)}))}}).filter(x=>x.symbole.length)`);
console.log(theme, JSON.stringify(info));
await b.send('Emulation.setDeviceMetricsOverride',{width:1100,height:500,deviceScaleFactor:3,mobile:false});const r=await b.eval(`(()=>{const t=document.querySelector('th:nth-child(5)').getBoundingClientRect();return [t.x-10,t.y-5]})()`);const c=await b.send('Page.captureScreenshot',{format:'png',clip:{x:r[0],y:r[1],width:230,height:190,scale:1}});fs.writeFileSync(`${process.argv[3]}/gpu-${theme}.png`,Buffer.from(c.data,'base64'));
}
}finally{b.close();}