@lastbrain/ai-ui-react 1.0.72 → 1.0.74

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.
Files changed (83) hide show
  1. package/dist/components/AiChipLabel.d.ts.map +1 -1
  2. package/dist/components/AiChipLabel.js +10 -7
  3. package/dist/components/AiContextButton.d.ts +1 -1
  4. package/dist/components/AiContextButton.d.ts.map +1 -1
  5. package/dist/components/AiContextButton.js +25 -12
  6. package/dist/components/AiImageButton.d.ts.map +1 -1
  7. package/dist/components/AiImageButton.js +32 -16
  8. package/dist/components/AiInput.d.ts.map +1 -1
  9. package/dist/components/AiInput.js +15 -5
  10. package/dist/components/AiModelSelect.d.ts.map +1 -1
  11. package/dist/components/AiModelSelect.js +3 -1
  12. package/dist/components/AiPromptPanel.d.ts.map +1 -1
  13. package/dist/components/AiPromptPanel.js +72 -47
  14. package/dist/components/AiSelect.d.ts.map +1 -1
  15. package/dist/components/AiSelect.js +8 -3
  16. package/dist/components/AiStatusButton.d.ts.map +1 -1
  17. package/dist/components/AiStatusButton.js +55 -28
  18. package/dist/components/AiTextarea.d.ts.map +1 -1
  19. package/dist/components/AiTextarea.js +19 -6
  20. package/dist/components/ErrorToast.d.ts.map +1 -1
  21. package/dist/components/ErrorToast.js +4 -2
  22. package/dist/components/LBApiKeySelector.d.ts.map +1 -1
  23. package/dist/components/LBApiKeySelector.js +13 -5
  24. package/dist/components/LBConnectButton.d.ts.map +1 -1
  25. package/dist/components/LBConnectButton.js +8 -3
  26. package/dist/components/LBKeyPicker.d.ts.map +1 -1
  27. package/dist/components/LBKeyPicker.js +8 -4
  28. package/dist/components/LBSigninModal.d.ts.map +1 -1
  29. package/dist/components/LBSigninModal.js +13 -7
  30. package/dist/components/UsageToast.d.ts.map +1 -1
  31. package/dist/components/UsageToast.js +4 -2
  32. package/dist/context/I18nContext.d.ts +15 -0
  33. package/dist/context/I18nContext.d.ts.map +1 -0
  34. package/dist/context/I18nContext.js +44 -0
  35. package/dist/context/LBAuthProvider.d.ts +4 -1
  36. package/dist/context/LBAuthProvider.d.ts.map +1 -1
  37. package/dist/context/LBAuthProvider.js +3 -2
  38. package/dist/hooks/useAiCallImage.d.ts.map +1 -1
  39. package/dist/hooks/useAiCallImage.js +1 -107
  40. package/dist/hooks/useAiCallText.d.ts.map +1 -1
  41. package/dist/hooks/useAiCallText.js +1 -25
  42. package/dist/hooks/useLoadingTimer.d.ts +5 -0
  43. package/dist/hooks/useLoadingTimer.d.ts.map +1 -0
  44. package/dist/hooks/useLoadingTimer.js +27 -0
  45. package/dist/i18n/de.json +62 -0
  46. package/dist/i18n/en.json +128 -0
  47. package/dist/i18n/es.json +70 -0
  48. package/dist/i18n/fr.json +128 -0
  49. package/dist/i18n/it.json +62 -0
  50. package/dist/i18n/pt.json +62 -0
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +2 -0
  54. package/dist/styles.css +142 -1
  55. package/package.json +3 -3
  56. package/src/components/AiChipLabel.tsx +17 -8
  57. package/src/components/AiContextButton.tsx +44 -20
  58. package/src/components/AiImageButton.tsx +52 -25
  59. package/src/components/AiInput.tsx +20 -5
  60. package/src/components/AiModelSelect.tsx +3 -1
  61. package/src/components/AiPromptPanel.tsx +177 -59
  62. package/src/components/AiSelect.tsx +8 -3
  63. package/src/components/AiStatusButton.tsx +100 -57
  64. package/src/components/AiTextarea.tsx +24 -6
  65. package/src/components/ErrorToast.tsx +4 -2
  66. package/src/components/LBApiKeySelector.tsx +33 -13
  67. package/src/components/LBConnectButton.tsx +9 -3
  68. package/src/components/LBKeyPicker.tsx +10 -4
  69. package/src/components/LBSigninModal.tsx +31 -15
  70. package/src/components/UsageToast.tsx +4 -2
  71. package/src/context/I18nContext.tsx +71 -0
  72. package/src/context/LBAuthProvider.tsx +9 -1
  73. package/src/hooks/useAiCallImage.ts +1 -149
  74. package/src/hooks/useAiCallText.ts +1 -30
  75. package/src/hooks/useLoadingTimer.ts +32 -0
  76. package/src/i18n/de.json +62 -0
  77. package/src/i18n/en.json +128 -0
  78. package/src/i18n/es.json +70 -0
  79. package/src/i18n/fr.json +128 -0
  80. package/src/i18n/it.json +62 -0
  81. package/src/i18n/pt.json +62 -0
  82. package/src/index.ts +2 -0
  83. package/src/styles.css +142 -1
@@ -1,95 +1,6 @@
1
1
  "use client";
2
2
  import { useState, useCallback } from "react";
3
3
  import { useAiClient } from "./useAiClient";
4
- /**
5
- * Génère une image Canvas pour l'environnement de développement
6
- */
7
- async function generateDevImage(prompt, width, height) {
8
- // Créer un canvas
9
- const canvas = document.createElement("canvas");
10
- const ctx = canvas.getContext("2d");
11
- if (!ctx) {
12
- throw new Error("Could not create canvas context");
13
- }
14
- canvas.width = width;
15
- canvas.height = height;
16
- // Générer des couleurs basées sur le prompt
17
- const promptHash = prompt
18
- .split("")
19
- .reduce((hash, char) => (hash * 31 + char.charCodeAt(0)) % 255, 0);
20
- // Couleurs de base dégradées
21
- const colors = [
22
- `hsl(${(promptHash * 7) % 360}, 70%, 60%)`,
23
- `hsl(${(promptHash * 11) % 360}, 60%, 70%)`,
24
- `hsl(${(promptHash * 13) % 360}, 50%, 80%)`,
25
- ];
26
- // Créer un dégradé radial
27
- const gradient = ctx.createRadialGradient(width / 2, height / 2, 0, width / 2, height / 2, Math.max(width, height) / 2);
28
- gradient.addColorStop(0, colors[0]);
29
- gradient.addColorStop(0.5, colors[1]);
30
- gradient.addColorStop(1, colors[2]);
31
- // Remplir le fond
32
- ctx.fillStyle = gradient;
33
- ctx.fillRect(0, 0, width, height);
34
- // Ajouter des formes géométriques basées sur le prompt
35
- const shapes = prompt.split(" ").slice(0, 5);
36
- shapes.forEach((word, index) => {
37
- const wordHash = word
38
- .split("")
39
- .reduce((hash, char) => (hash * 31 + char.charCodeAt(0)) % 1000, 0);
40
- ctx.save();
41
- ctx.globalAlpha = 0.3 + index * 0.1;
42
- ctx.fillStyle = `hsl(${(wordHash * 17) % 360}, 80%, 50%)`;
43
- // Formes différentes selon l'index
44
- const x = (wordHash % (width - 100)) + 50;
45
- const y = ((wordHash * 3) % (height - 100)) + 50;
46
- const size = 30 + (wordHash % 50);
47
- switch (index % 4) {
48
- case 0: // Cercle
49
- ctx.beginPath();
50
- ctx.arc(x, y, size, 0, Math.PI * 2);
51
- ctx.fill();
52
- break;
53
- case 1: // Carré
54
- ctx.fillRect(x - size / 2, y - size / 2, size, size);
55
- break;
56
- case 2: // Triangle
57
- ctx.beginPath();
58
- ctx.moveTo(x, y - size / 2);
59
- ctx.lineTo(x - size / 2, y + size / 2);
60
- ctx.lineTo(x + size / 2, y + size / 2);
61
- ctx.closePath();
62
- ctx.fill();
63
- break;
64
- case 3: // Losange
65
- ctx.save();
66
- ctx.translate(x, y);
67
- ctx.rotate((wordHash / 100) % (Math.PI * 2));
68
- ctx.fillRect(-size / 2, -size / 2, size, size);
69
- ctx.restore();
70
- break;
71
- }
72
- ctx.restore();
73
- });
74
- // Ajouter le texte du prompt en overlay
75
- ctx.save();
76
- ctx.fillStyle = "rgba(255, 255, 255, 0.9)";
77
- ctx.font = `bold ${Math.min(width, height) / 30}px system-ui, -apple-system, sans-serif`;
78
- ctx.textAlign = "center";
79
- ctx.textBaseline = "middle";
80
- // Fond semi-transparent pour le texte
81
- const textMetrics = ctx.measureText(prompt);
82
- const textWidth = textMetrics.width;
83
- const textHeight = parseInt(ctx.font);
84
- ctx.fillStyle = "rgba(0, 0, 0, 0.6)";
85
- ctx.fillRect(width / 2 - textWidth / 2 - 20, height / 2 - textHeight / 2 - 10, textWidth + 40, textHeight + 20);
86
- // Texte du prompt
87
- ctx.fillStyle = "white";
88
- ctx.fillText(prompt, width / 2, height / 2);
89
- ctx.restore();
90
- // Convertir en data URL
91
- return canvas.toDataURL("image/png", 0.8);
92
- }
93
4
  export function useAiCallImage(options) {
94
5
  const client = useAiClient(options);
95
6
  const [loading, setLoading] = useState(false);
@@ -98,23 +9,6 @@ export function useAiCallImage(options) {
98
9
  setLoading(true);
99
10
  setError(null);
100
11
  try {
101
- // Vérifier si on est en mode dev (API key contient "dev")
102
- if (options?.apiKeyId?.includes("dev")) {
103
- // Simulation complète pour l'environnement dev
104
- await new Promise((resolve) => setTimeout(resolve, 2000)); // Délai réaliste pour simuler l'API
105
- // Parse size format "1024x1024" or default to "1024x1024"
106
- const sizeMatch = request.size?.match(/(\d+)x(\d+)/);
107
- const width = sizeMatch ? parseInt(sizeMatch[1]) : 1024;
108
- const height = sizeMatch ? parseInt(sizeMatch[2]) : 1024;
109
- // Créer une image générée avec Canvas
110
- const imageUrl = await generateDevImage(request.prompt, width, height);
111
- return {
112
- requestId: `dev-img-${Date.now()}`,
113
- url: imageUrl,
114
- debitTokens: 30, // Coût simulé
115
- };
116
- }
117
- // Mode production : appel API normal
118
12
  const result = await client.generateImage(request);
119
13
  return result;
120
14
  }
@@ -126,7 +20,7 @@ export function useAiCallImage(options) {
126
20
  finally {
127
21
  setLoading(false);
128
22
  }
129
- }, [client, options?.apiKeyId]);
23
+ }, [client]);
130
24
  return {
131
25
  generateImage,
132
26
  loading,
@@ -1 +1 @@
1
- {"version":3,"file":"useAiCallText.d.ts","sourceRoot":"","sources":["../../src/hooks/useAiCallText.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG3E,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,wBAAgB,aAAa,CAC3B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,mBAAmB,CA0DrB"}
1
+ {"version":3,"file":"useAiCallText.d.ts","sourceRoot":"","sources":["../../src/hooks/useAiCallText.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG3E,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,wBAAgB,aAAa,CAC3B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,mBAAmB,CA6BrB"}
@@ -9,30 +9,6 @@ export function useAiCallText(options) {
9
9
  setLoading(true);
10
10
  setError(null);
11
11
  try {
12
- // Vérifier si on est en mode dev (API key contient "dev")
13
- if (options?.apiKeyId?.includes("dev")) {
14
- // Simulation pour l'environnement dev
15
- await new Promise((resolve) => setTimeout(resolve, 1000)); // Délai pour simuler l'API
16
- let simulatedResult = "";
17
- // Si le prompt contient des mots-clés pour les chips
18
- if (request.prompt.toLowerCase().includes("tags") ||
19
- request.prompt.toLowerCase().includes("chip") ||
20
- request.prompt.toLowerCase().includes("virgule")) {
21
- simulatedResult =
22
- "react, typescript, javascript, frontend, backend, api, development, web, mobile, database";
23
- }
24
- else {
25
- // Lorem ipsum pour les autres cas
26
- simulatedResult =
27
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.";
28
- }
29
- return {
30
- requestId: `dev-${Date.now()}`,
31
- text: simulatedResult,
32
- debitTokens: 150,
33
- };
34
- }
35
- // Mode production : appel API normal
36
12
  const result = await client.generateText(request);
37
13
  return result;
38
14
  }
@@ -44,7 +20,7 @@ export function useAiCallText(options) {
44
20
  finally {
45
21
  setLoading(false);
46
22
  }
47
- }, [client, options?.apiKeyId]);
23
+ }, [client]);
48
24
  return {
49
25
  generateText,
50
26
  loading,
@@ -0,0 +1,5 @@
1
+ export declare function useLoadingTimer(active: boolean): {
2
+ seconds: number;
3
+ formatted: string;
4
+ };
5
+ //# sourceMappingURL=useLoadingTimer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLoadingTimer.d.ts","sourceRoot":"","sources":["../../src/hooks/useLoadingTimer.ts"],"names":[],"mappings":"AAWA,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO;;;EAmB9C"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { useEffect, useState } from "react";
3
+ function formatElapsed(seconds) {
4
+ const mins = Math.floor(seconds / 60);
5
+ const secs = seconds % 60;
6
+ if (mins <= 0)
7
+ return `${secs}s`;
8
+ return `${String(mins).padStart(2, "0")}:${String(secs).padStart(2, "0")}`;
9
+ }
10
+ export function useLoadingTimer(active) {
11
+ const [seconds, setSeconds] = useState(0);
12
+ useEffect(() => {
13
+ if (!active) {
14
+ setSeconds(0);
15
+ return;
16
+ }
17
+ setSeconds(0);
18
+ const id = window.setInterval(() => {
19
+ setSeconds((prev) => prev + 1);
20
+ }, 1000);
21
+ return () => window.clearInterval(id);
22
+ }, [active]);
23
+ return {
24
+ seconds,
25
+ formatted: formatElapsed(seconds),
26
+ };
27
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "common.close": "Schließen",
3
+ "common.cancel": "Abbrechen",
4
+ "common.loading": "Lädt...",
5
+ "common.search": "Suchen...",
6
+ "common.all": "Alle",
7
+ "common.unknown": "Unbekannt",
8
+ "common.error": "Ein Fehler ist aufgetreten",
9
+ "common.inactive": "Inaktiv",
10
+ "common.active": "Aktiv",
11
+ "common.save": "Speichern",
12
+ "common.download": "Herunterladen",
13
+ "common.continue": "Weiter",
14
+ "common.errorTitle": "Fehler",
15
+ "auth.signIn": "Anmelden",
16
+ "auth.signOut": "Abmelden",
17
+ "auth.required": "Authentifizierung erforderlich",
18
+ "auth.connectRequired": "Verbindung erforderlich",
19
+ "auth.modal.title": "LastBrain Anmeldung",
20
+ "auth.modal.subtitle": "Melde dich an, um KI-Komponenten in deiner App zu aktivieren.",
21
+ "auth.modal.email": "E-Mail",
22
+ "auth.modal.password": "Passwort",
23
+ "auth.modal.connecting": "Anmeldung...",
24
+ "auth.modal.createAccount": "Konto erstellen",
25
+ "status.title": "API-Status",
26
+ "status.view": "Status anzeigen",
27
+ "status.selectApiKey": "API-Schlüssel wählen",
28
+ "status.user": "Benutzer",
29
+ "status.apiKey": "API-Schlüssel",
30
+ "status.env": "Umgebung",
31
+ "status.rateLimit": "Rate Limit",
32
+ "status.auth": "Auth",
33
+ "status.wallet": "Wallet",
34
+ "status.storage": "Speicher",
35
+ "status.total": "Gesamt",
36
+ "status.changeApiKey": "API-Schlüssel wechseln",
37
+ "status.dashboard": "Dashboard",
38
+ "status.history": "Verlauf",
39
+ "status.settings": "Einstellungen",
40
+ "status.prompts": "Prompts",
41
+ "status.folders": "Ordner",
42
+ "status.logout": "Abmelden",
43
+ "prompt.modal.title": "KI Prompt Konfiguration",
44
+ "prompt.modal.aiModel": "KI-Modell",
45
+ "prompt.modal.manageModels": "Modelle verwalten",
46
+ "prompt.modal.loadingModels": "Modelle werden geladen...",
47
+ "prompt.modal.prompt": "Prompt",
48
+ "prompt.modal.browsePrompts": "Prompts durchsuchen",
49
+ "prompt.modal.cancel": "Abbrechen",
50
+ "prompt.modal.generate": "Mit KI generieren",
51
+ "prompt.modal.generating": "Generierung...",
52
+ "prompt.modal.transforming": "Transformation...",
53
+ "ai.setup": "KI einrichten",
54
+ "ai.generate": "Mit KI generieren",
55
+ "ai.loading.elapsed": "{seconds}",
56
+ "ai.generationSuccess": "KI-Generierung erfolgreich",
57
+ "ai.generationError": "Textgenerierung fehlgeschlagen",
58
+ "ai.image.generate": "Bild generieren",
59
+ "ai.image.generating": "Generierung...",
60
+ "ai.image.generatedSuccess": "Bild erfolgreich generiert",
61
+ "usage.toast.used": "{amount}$ verwendet"
62
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "common.close": "Close",
3
+ "common.cancel": "Cancel",
4
+ "common.loading": "Loading...",
5
+ "common.search": "Search...",
6
+ "common.all": "All",
7
+ "common.unknown": "Unknown",
8
+ "common.error": "An error occurred",
9
+ "common.inactive": "Inactive",
10
+ "common.active": "Active",
11
+ "common.save": "Save",
12
+ "common.download": "Download",
13
+ "common.continue": "Continue",
14
+ "common.errorTitle": "Error",
15
+ "common.result": "Result",
16
+ "common.promptUsed": "Prompt used",
17
+ "common.closeLabel": "Close",
18
+ "auth.signIn": "Sign in",
19
+ "auth.signOut": "Sign out",
20
+ "auth.required": "Authentication required",
21
+ "auth.connectRequired": "Connection required",
22
+ "auth.connectToUseAi": "Sign in to use AI",
23
+ "auth.modal.title": "LastBrain Sign In",
24
+ "auth.modal.subtitle": "Sign in to enable AI components in your app.",
25
+ "auth.modal.email": "Email",
26
+ "auth.modal.password": "Password",
27
+ "auth.modal.emailPlaceholder": "your@email.com",
28
+ "auth.modal.passwordPlaceholder": "••••••••",
29
+ "auth.modal.connecting": "Signing in...",
30
+ "auth.modal.createAccount": "Create account",
31
+ "auth.modal.loginFailed": "Login failed",
32
+ "auth.modal.tokenMissing": "Access token unavailable",
33
+ "auth.modal.apiKeysFetchError": "Failed to fetch API keys",
34
+ "auth.modal.selectionError": "Selection error",
35
+ "auth.modal.genericError": "An error occurred",
36
+ "status.title": "API Status",
37
+ "status.view": "View status",
38
+ "status.selectApiKey": "Select an API key",
39
+ "status.user": "User",
40
+ "status.apiKey": "API Key",
41
+ "status.env": "Env",
42
+ "status.rateLimit": "Rate Limit",
43
+ "status.auth": "Auth",
44
+ "status.wallet": "Wallet",
45
+ "status.storage": "Storage",
46
+ "status.total": "Total",
47
+ "status.unknown": "unknown",
48
+ "status.changeApiKey": "Switch API key",
49
+ "status.selectApiKeySubtitle": "Choose the API key to use for your AI requests.",
50
+ "status.lastbrainAuth": "LastBrain Authentication",
51
+ "status.connectToAccess": "Sign in to access AI features.",
52
+ "status.dashboard": "Dashboard",
53
+ "status.history": "History",
54
+ "status.settings": "Settings",
55
+ "status.prompts": "Prompts",
56
+ "status.folders": "Folders",
57
+ "status.logout": "Logout",
58
+ "status.aiStatusAria": "AI status",
59
+ "prompt.modal.title": "AI Prompt Configuration",
60
+ "prompt.modal.selectPrompt": "Select a Prompt",
61
+ "prompt.modal.sourceText": "Source Text",
62
+ "prompt.modal.aiModel": "AI Model",
63
+ "prompt.modal.manageModels": "Manage models",
64
+ "prompt.modal.noActiveModels": "No active models. Open 'Manage models'.",
65
+ "prompt.modal.loadingModels": "Loading models...",
66
+ "prompt.modal.prompt": "Prompt",
67
+ "prompt.modal.promptHint": "(Cmd/Ctrl + Enter to submit)",
68
+ "prompt.modal.browsePrompts": "Browse Prompts",
69
+ "prompt.modal.promptPlaceholderWithSource": "Enter your AI prompt... e.g., 'Fix grammar', 'Make it more professional', 'Translate to English'",
70
+ "prompt.modal.promptPlaceholderNoSource": "Enter your AI prompt... e.g., 'Write a blog post about AI', 'Generate product description'",
71
+ "prompt.modal.backToForm": "← Back to form",
72
+ "prompt.modal.searchPrompts": "Search prompts...",
73
+ "prompt.modal.tags": "Tags",
74
+ "prompt.modal.noPrompts": "No prompts available for this model type",
75
+ "prompt.modal.favorites": "Favorites",
76
+ "prompt.modal.allPrompts": "All prompts",
77
+ "prompt.modal.cancel": "Cancel",
78
+ "prompt.modal.generate": "Generate with AI",
79
+ "prompt.modal.transform": "Transform with AI",
80
+ "prompt.modal.generating": "Generating...",
81
+ "prompt.modal.transforming": "Transforming...",
82
+ "prompt.modal.modelMgmtTitle": "AI Model Management",
83
+ "prompt.modal.modelMgmtSubtitle": "Enable or disable models based on your needs",
84
+ "prompt.modal.modelAvailableCount": "{available} models available • {active} enabled",
85
+ "prompt.modal.searchModel": "Search a model...",
86
+ "prompt.modal.noModelMatch": "No model matches your search",
87
+ "prompt.modal.noModelAvailable": "No models available",
88
+ "prompt.modal.closeModelMgmt": "Close",
89
+ "prompt.modal.clickSettingsHint": "Click ⚙️ to enable/disable models",
90
+ "prompt.modal.showOnlyTagsFormat": "Reply only with comma-separated tags.",
91
+ "prompt.modal.backToFormNoArrow": "Back to form",
92
+ "ai.setup": "Setup AI",
93
+ "ai.generate": "Generate with AI",
94
+ "ai.loading.elapsed": "{seconds}",
95
+ "ai.generationSuccess": "AI generation successful",
96
+ "ai.generationError": "Failed to generate text",
97
+ "ai.analyze": "Analyze with AI",
98
+ "ai.analyzing": "Analyzing...",
99
+ "ai.analysisDoneCost": "Analysis completed - Cost: {cost}",
100
+ "ai.image.generate": "Generate image",
101
+ "ai.image.generating": "Generating...",
102
+ "ai.image.generatedSuccess": "Image generated successfully",
103
+ "ai.image.savedSuccess": "Image saved",
104
+ "ai.image.saveError": "Error while saving",
105
+ "ai.image.download": "Download image",
106
+ "ai.image.saveToDb": "Save to database",
107
+ "ai.context.description": "Data to analyze",
108
+ "ai.context.resultTitle": "Analysis result",
109
+ "ai.context.saveFileNamePrompt": "File name:",
110
+ "ai.context.fileNameBase": "analysis-{date}.txt",
111
+ "ai.context.fileHeader": "DATA ANALYSIS",
112
+ "ai.context.metadata": "METADATA",
113
+ "ai.context.tokensUsed": "Tokens used",
114
+ "ai.context.requestId": "Request ID",
115
+ "ai.context.cost": "Cost",
116
+ "ai.context.analyzeStructured": "Analyze this data and respond in a clear, structured way.",
117
+ "ai.context.buttonAnalyze": "Analyze",
118
+ "ai.chips.placeholder": "Type and press Enter to add tags...",
119
+ "ai.chips.generate": "Generate tags with AI",
120
+ "ai.chips.remove": "Remove",
121
+ "ai.chips.artifactTitle": "AI generated tags",
122
+ "ai.select.modelPlaceholder": "Select a model",
123
+ "ai.select.suggestionReady": "AI suggestion ready",
124
+ "lb.keypicker.changeApiKey": "Switch API key",
125
+ "lb.keypicker.loadError": "Unable to load API keys",
126
+ "lb.keypicker.switchError": "Failed to switch API key",
127
+ "usage.toast.used": "{amount}$ used"
128
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "common.close": "Cerrar",
3
+ "common.cancel": "Cancelar",
4
+ "common.loading": "Cargando...",
5
+ "common.search": "Buscar...",
6
+ "common.all": "Todos",
7
+ "common.unknown": "Desconocido",
8
+ "common.error": "Ocurrió un error",
9
+ "common.inactive": "Inactivo",
10
+ "common.active": "Activo",
11
+ "common.save": "Guardar",
12
+ "common.download": "Descargar",
13
+ "common.continue": "Continuar",
14
+ "common.errorTitle": "Error",
15
+ "common.result": "Resultado",
16
+ "common.promptUsed": "Prompt usado",
17
+ "common.closeLabel": "Cerrar",
18
+ "auth.signIn": "Iniciar sesión",
19
+ "auth.signOut": "Cerrar sesión",
20
+ "auth.required": "Autenticación requerida",
21
+ "auth.connectRequired": "Conexión requerida",
22
+ "auth.connectToUseAi": "Inicia sesión para usar IA",
23
+ "auth.modal.title": "Inicio de sesión LastBrain",
24
+ "auth.modal.subtitle": "Inicia sesión para activar los componentes IA en tu app.",
25
+ "auth.modal.email": "Correo",
26
+ "auth.modal.password": "Contraseña",
27
+ "auth.modal.emailPlaceholder": "tu@email.com",
28
+ "auth.modal.passwordPlaceholder": "••••••••",
29
+ "auth.modal.connecting": "Conectando...",
30
+ "auth.modal.createAccount": "Crear cuenta",
31
+ "status.title": "Estado API",
32
+ "status.view": "Ver estado",
33
+ "status.selectApiKey": "Seleccionar clave API",
34
+ "status.user": "Usuario",
35
+ "status.apiKey": "Clave API",
36
+ "status.env": "Entorno",
37
+ "status.rateLimit": "Límite",
38
+ "status.auth": "Auth",
39
+ "status.wallet": "Billetera",
40
+ "status.storage": "Almacenamiento",
41
+ "status.total": "Total",
42
+ "status.changeApiKey": "Cambiar clave API",
43
+ "status.dashboard": "Panel",
44
+ "status.history": "Historial",
45
+ "status.settings": "Ajustes",
46
+ "status.prompts": "Prompts",
47
+ "status.folders": "Carpetas",
48
+ "status.logout": "Cerrar sesión",
49
+ "status.lastbrainAuth": "Autenticación LastBrain",
50
+ "status.connectToAccess": "Inicia sesión para acceder a funciones IA",
51
+ "prompt.modal.title": "Configuración de Prompt IA",
52
+ "prompt.modal.aiModel": "Modelo IA",
53
+ "prompt.modal.manageModels": "Gestionar modelos",
54
+ "prompt.modal.loadingModels": "Cargando modelos...",
55
+ "prompt.modal.prompt": "Prompt",
56
+ "prompt.modal.browsePrompts": "Ver prompts",
57
+ "prompt.modal.cancel": "Cancelar",
58
+ "prompt.modal.generate": "Generar con IA",
59
+ "prompt.modal.generating": "Generando...",
60
+ "prompt.modal.transforming": "Transformando...",
61
+ "ai.setup": "Configurar IA",
62
+ "ai.generate": "Generar con IA",
63
+ "ai.loading.elapsed": "{seconds}",
64
+ "ai.generationSuccess": "Generación IA completada",
65
+ "ai.generationError": "Error al generar texto",
66
+ "ai.image.generate": "Generar imagen",
67
+ "ai.image.generating": "Generando...",
68
+ "ai.image.generatedSuccess": "Imagen generada correctamente",
69
+ "usage.toast.used": "{amount}$ usado"
70
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "common.close": "Fermer",
3
+ "common.cancel": "Annuler",
4
+ "common.loading": "Chargement...",
5
+ "common.search": "Rechercher...",
6
+ "common.all": "Tous",
7
+ "common.unknown": "Inconnu",
8
+ "common.error": "Une erreur s'est produite",
9
+ "common.inactive": "Inactif",
10
+ "common.active": "Actif",
11
+ "common.save": "Sauvegarder",
12
+ "common.download": "Télécharger",
13
+ "common.continue": "Continuer",
14
+ "common.errorTitle": "Erreur",
15
+ "common.result": "Résultat",
16
+ "common.promptUsed": "Prompt utilisé",
17
+ "common.closeLabel": "Fermer",
18
+ "auth.signIn": "Se connecter",
19
+ "auth.signOut": "Déconnexion",
20
+ "auth.required": "Authentification requise",
21
+ "auth.connectRequired": "Connexion requise",
22
+ "auth.connectToUseAi": "Se connecter pour utiliser l'IA",
23
+ "auth.modal.title": "Connexion LastBrain",
24
+ "auth.modal.subtitle": "Connectez-vous pour activer les composants IA dans votre app.",
25
+ "auth.modal.email": "Email",
26
+ "auth.modal.password": "Mot de passe",
27
+ "auth.modal.emailPlaceholder": "votre@email.com",
28
+ "auth.modal.passwordPlaceholder": "••••••••",
29
+ "auth.modal.connecting": "Connexion...",
30
+ "auth.modal.createAccount": "Créer un compte",
31
+ "auth.modal.loginFailed": "Échec de la connexion",
32
+ "auth.modal.tokenMissing": "Token d'accès non disponible",
33
+ "auth.modal.apiKeysFetchError": "Erreur lors de la récupération des clés API",
34
+ "auth.modal.selectionError": "Erreur lors de la sélection",
35
+ "auth.modal.genericError": "Une erreur s'est produite",
36
+ "status.title": "Statut API",
37
+ "status.view": "Voir le statut",
38
+ "status.selectApiKey": "Sélectionnez une clé API",
39
+ "status.user": "Utilisateur",
40
+ "status.apiKey": "API Key",
41
+ "status.env": "Env",
42
+ "status.rateLimit": "Rate Limit",
43
+ "status.auth": "Auth",
44
+ "status.wallet": "Portefeuille",
45
+ "status.storage": "Stockage",
46
+ "status.total": "Total",
47
+ "status.unknown": "unknown",
48
+ "status.changeApiKey": "Changer de clé API",
49
+ "status.selectApiKeySubtitle": "Choisissez la clé API à utiliser pour vos requêtes IA.",
50
+ "status.lastbrainAuth": "LastBrain Authentication",
51
+ "status.connectToAccess": "Connectez-vous pour accéder aux fonctionnalités IA.",
52
+ "status.dashboard": "Dashboard",
53
+ "status.history": "Historique",
54
+ "status.settings": "Paramètres",
55
+ "status.prompts": "Prompts",
56
+ "status.folders": "Dossiers",
57
+ "status.logout": "Déconnexion",
58
+ "status.aiStatusAria": "Statut IA",
59
+ "prompt.modal.title": "AI Prompt Configuration",
60
+ "prompt.modal.selectPrompt": "Sélectionner un prompt",
61
+ "prompt.modal.sourceText": "Texte source",
62
+ "prompt.modal.aiModel": "Modèle IA",
63
+ "prompt.modal.manageModels": "Gérer les modèles",
64
+ "prompt.modal.noActiveModels": "Aucun modèle actif. Ouvrez 'Gérer les modèles'.",
65
+ "prompt.modal.loadingModels": "Chargement des modèles...",
66
+ "prompt.modal.prompt": "Prompt",
67
+ "prompt.modal.promptHint": "(Cmd/Ctrl + Enter pour envoyer)",
68
+ "prompt.modal.browsePrompts": "Parcourir les prompts",
69
+ "prompt.modal.promptPlaceholderWithSource": "Entrez votre prompt IA... ex: 'Corrige la grammaire', 'Rends le texte plus pro', 'Traduis en anglais'",
70
+ "prompt.modal.promptPlaceholderNoSource": "Entrez votre prompt IA... ex: 'Écris un article sur l'IA', 'Génère une description produit'",
71
+ "prompt.modal.backToForm": "← Retour au formulaire",
72
+ "prompt.modal.searchPrompts": "Rechercher des prompts...",
73
+ "prompt.modal.tags": "Tags",
74
+ "prompt.modal.noPrompts": "Aucun prompt disponible pour ce type de modèle",
75
+ "prompt.modal.favorites": "Favoris",
76
+ "prompt.modal.allPrompts": "Tous les prompts",
77
+ "prompt.modal.cancel": "Annuler",
78
+ "prompt.modal.generate": "Générer avec IA",
79
+ "prompt.modal.transform": "Transformer avec IA",
80
+ "prompt.modal.generating": "Génération en cours...",
81
+ "prompt.modal.transforming": "Transformation en cours...",
82
+ "prompt.modal.modelMgmtTitle": "Gestion des modèles IA",
83
+ "prompt.modal.modelMgmtSubtitle": "Activez ou désactivez les modèles selon vos besoins",
84
+ "prompt.modal.modelAvailableCount": "{available} modèles disponibles • {active} activés",
85
+ "prompt.modal.searchModel": "Rechercher un modèle...",
86
+ "prompt.modal.noModelMatch": "Aucun modèle ne correspond à votre recherche",
87
+ "prompt.modal.noModelAvailable": "Aucun modèle disponible",
88
+ "prompt.modal.closeModelMgmt": "Fermer",
89
+ "prompt.modal.clickSettingsHint": "Cliquez sur ⚙️ pour activer/désactiver les modèles",
90
+ "prompt.modal.showOnlyTagsFormat": "Répondez uniquement avec des tags séparés par des virgules.",
91
+ "prompt.modal.backToFormNoArrow": "Retour au formulaire",
92
+ "ai.setup": "Configurer l'IA",
93
+ "ai.generate": "Générer avec IA",
94
+ "ai.loading.elapsed": "{seconds}",
95
+ "ai.generationSuccess": "Génération IA réussie",
96
+ "ai.generationError": "Échec de la génération de texte",
97
+ "ai.analyze": "Analyser avec l'IA",
98
+ "ai.analyzing": "Analyse...",
99
+ "ai.analysisDoneCost": "Analyse terminée - Coût: {cost}",
100
+ "ai.image.generate": "Générer une image",
101
+ "ai.image.generating": "Génération...",
102
+ "ai.image.generatedSuccess": "Image générée avec succès",
103
+ "ai.image.savedSuccess": "Image sauvegardée",
104
+ "ai.image.saveError": "Erreur lors de la sauvegarde",
105
+ "ai.image.download": "Télécharger l'image",
106
+ "ai.image.saveToDb": "Sauvegarder en base",
107
+ "ai.context.description": "Données à analyser",
108
+ "ai.context.resultTitle": "Résultat de l'analyse",
109
+ "ai.context.saveFileNamePrompt": "Nom du fichier :",
110
+ "ai.context.fileNameBase": "analyse-{date}.txt",
111
+ "ai.context.fileHeader": "ANALYSE DES DONNÉES",
112
+ "ai.context.metadata": "MÉTADONNÉES",
113
+ "ai.context.tokensUsed": "Tokens utilisés",
114
+ "ai.context.requestId": "ID de requête",
115
+ "ai.context.cost": "Coût",
116
+ "ai.context.analyzeStructured": "Analyse ces données et réponds de manière structurée et claire.",
117
+ "ai.context.buttonAnalyze": "Analyser",
118
+ "ai.chips.placeholder": "Tapez et appuyez sur Entrée pour ajouter des tags...",
119
+ "ai.chips.generate": "Générer des tags avec l'IA",
120
+ "ai.chips.remove": "Supprimer",
121
+ "ai.chips.artifactTitle": "Tags générés par IA",
122
+ "ai.select.modelPlaceholder": "Sélectionner un modèle",
123
+ "ai.select.suggestionReady": "Suggestion IA prête",
124
+ "lb.keypicker.changeApiKey": "Changer de clé API",
125
+ "lb.keypicker.loadError": "Impossible de charger les clés API",
126
+ "lb.keypicker.switchError": "Échec du changement de clé",
127
+ "usage.toast.used": "{amount}$ utilisé"
128
+ }