mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
fix(llm): add deep-link to AI settings in tier error messages
Error messages now include a clickable Markdown link "KI-Einstellungen öffnen" that navigates to /?app=settings#ai-options, which opens the settings panel in the workbench, switches to the AI tab, and scrolls to the LLM options section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f0c38da784
commit
928f036033
1 changed files with 6 additions and 4 deletions
|
|
@ -38,16 +38,18 @@ export class NoTierAvailableError extends LlmError {
|
|||
this.name = 'NoTierAvailableError';
|
||||
}
|
||||
|
||||
/** User-friendly German explanation of what went wrong. */
|
||||
/** User-friendly German explanation of what went wrong (Markdown). */
|
||||
getUserMessage(): string {
|
||||
const settingsLink = '[KI-Einstellungen öffnen](/?app=settings#ai-options)';
|
||||
|
||||
if (this.skipped.length === 0 && this.attempted.length === 0) {
|
||||
return 'Kein KI-Modell konfiguriert. Aktiviere ein Modell unter Einstellungen → KI.';
|
||||
return `Kein KI-Modell konfiguriert.\n\n${settingsLink}`;
|
||||
}
|
||||
|
||||
const reasons = this.skipped.map((s) => {
|
||||
switch (s.reason) {
|
||||
case 'no-consent':
|
||||
return `**${tierLabel(s.tier)}**: Cloud-Einwilligung fehlt. Aktiviere sie unter Einstellungen → KI.`;
|
||||
return `**${tierLabel(s.tier)}**: Cloud-Einwilligung fehlt.`;
|
||||
case 'no-backend':
|
||||
return `**${tierLabel(s.tier)}**: Backend nicht registriert.`;
|
||||
case 'not-available':
|
||||
|
|
@ -60,7 +62,7 @@ export class NoTierAvailableError extends LlmError {
|
|||
return 'Kein KI-Modell konfiguriert.';
|
||||
}
|
||||
});
|
||||
return reasons.join('\n');
|
||||
return `${reasons.join('\n')}\n\n${settingsLink}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue