feat(web): @mana/browser-llm@0.1.0-alpha.3 + reactive Server-Pick
Some checks are pending
CI / validate (push) Waiting to run
Some checks are pending
CI / validate (push) Waiting to run
Upgrade auf alpha.3 (Router-Lokal-First-Disziplin). llmSettings
spiegelt allowServerLLM in ManaLLM.configure({allowServerInPick})
auf jedem Toggle. initLocalLLM nimmt den initialen Wert mit.
`.npmrc` aus `.gitignore` raus + committet — siehe mana@821e154.
This commit is contained in:
parent
09732fabe5
commit
074b0e83b4
4 changed files with 20 additions and 8 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -68,6 +68,9 @@ ssh-key-command.txt
|
|||
.local/
|
||||
apps/landing/.astro
|
||||
|
||||
# NPM Auth — Verdaccio-Token soll nie in git
|
||||
.npmrc
|
||||
# NPM Auth — Top-Level-`.npmrc` ist committet (nur ${NPM_AUTH_TOKEN}-
|
||||
# Variable). Sub-Pfade können Klartext-Auth-Tokens enthalten und bleiben
|
||||
# blockiert.
|
||||
**/packages/*/.npmrc
|
||||
**/services/*/.npmrc
|
||||
.astro
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"clean": "rm -rf .svelte-kit build .turbo"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mana/browser-llm": "^0.1.0-alpha.2",
|
||||
"@mana/browser-llm": "^0.1.0-alpha.3",
|
||||
"@mana/event-kit": "^0.1.0",
|
||||
"@mana/event-sync": "^0.5.0",
|
||||
"@mana/shared-auth-sso": "0.1.0-alpha.3",
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class LocalLLMSettings {
|
|||
setAllowServerLLM(value: boolean) {
|
||||
this.allowServerLLM = value;
|
||||
if (browser) window.localStorage.setItem(STORAGE_ALLOW_SERVER, String(value));
|
||||
setServerPickAllowed(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -53,10 +54,18 @@ export function initLocalLLM(): void {
|
|||
ManaLLM.configure({
|
||||
serverEndpoint: apiUrl,
|
||||
serverAuthToken: () => devUser.token,
|
||||
// Lokal-First-Default: Server wird vom Router-Pick nur dann
|
||||
// gewählt, wenn User in den Settings opt-in setzt.
|
||||
allowServerInPick: llmSettings.allowServerLLM,
|
||||
});
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
export function setServerPickAllowed(allowed: boolean): void {
|
||||
if (!browser) return;
|
||||
ManaLLM.configure({ allowServerInPick: allowed });
|
||||
}
|
||||
|
||||
export async function probeBackends(force = false): Promise<CapabilityReport[]> {
|
||||
if (capabilityCache && !force) return capabilityCache;
|
||||
const result = await probeAllBackends();
|
||||
|
|
|
|||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
|
|
@ -80,8 +80,8 @@ importers:
|
|||
apps/web:
|
||||
dependencies:
|
||||
'@mana/browser-llm':
|
||||
specifier: ^0.1.0-alpha.2
|
||||
version: 0.1.0-alpha.2
|
||||
specifier: ^0.1.0-alpha.3
|
||||
version: 0.1.0-alpha.3
|
||||
'@mana/event-kit':
|
||||
specifier: ^0.1.0
|
||||
version: 0.1.0
|
||||
|
|
@ -1412,8 +1412,8 @@ packages:
|
|||
'@jridgewell/trace-mapping@0.3.31':
|
||||
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
||||
|
||||
'@mana/browser-llm@0.1.0-alpha.2':
|
||||
resolution: {integrity: sha512-uWU46Cs4Slo9eCLFY3aKYN6JPMCLNhIOOrsJqxgH4Eg3orwpnwU5z8jj+dtPhZPuntDGMS53DsPul3vve4IE2Q==}
|
||||
'@mana/browser-llm@0.1.0-alpha.3':
|
||||
resolution: {integrity: sha512-7LShWMqcitiLhWm7JZ/bCc0Yg9HLfH/PES/hb/VfhcFkD/2vWZniwUqLanSgW8AvsrsAiS0dn4oFukjj71G6Yw==}
|
||||
|
||||
'@mana/event-kit@0.1.0':
|
||||
resolution: {integrity: sha512-iW6IE1MrFstwjbBwFljYD0UYVq8nvuvzi7+cgTbdWZsNReDYwpw7QtgliuNWY8XDr4YHSEK9QWcJTLiI2CJQNw==}
|
||||
|
|
@ -5659,7 +5659,7 @@ snapshots:
|
|||
'@jridgewell/resolve-uri': 3.1.2
|
||||
'@jridgewell/sourcemap-codec': 1.5.5
|
||||
|
||||
'@mana/browser-llm@0.1.0-alpha.2': {}
|
||||
'@mana/browser-llm@0.1.0-alpha.3': {}
|
||||
|
||||
'@mana/event-kit@0.1.0':
|
||||
dependencies:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue