@anvaka/vue-llm 0.1.0 → 0.1.2

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.
@@ -25,7 +25,7 @@ class A {
25
25
  ], n = this.validateCapabilities({
26
26
  model: this.config.model,
27
27
  enableThinking: !1,
28
- temperature: 0.1,
28
+ temperature: t.temperature ?? 0.1,
29
29
  maxTokens: 10,
30
30
  stream: !1
31
31
  }), o = this.provider.prepareRequest(e, n), a = await this.provider.makeRequest(o);
@@ -66,7 +66,7 @@ class A {
66
66
  { role: "user", content: "ping" }
67
67
  ], s = this.validateCapabilities({
68
68
  model: this.config.model,
69
- temperature: 0.1,
69
+ temperature: this.config.temperature ?? 0.1,
70
70
  maxTokens: 10,
71
71
  stream: !1
72
72
  }), i = this.provider.prepareRequest(t, s), r = await this.provider.makeRequest(i);
@@ -218,8 +218,8 @@ class S {
218
218
  let a = "", h = null, u = 0;
219
219
  try {
220
220
  return await i.streamRequest(t, s, (l) => {
221
- var C, x, R;
222
- l.content && (a = l.fullContent, (C = e.setText) == null || C.call(e, a)), (x = l.usage) != null && x.tokens && (u += l.usage.tokens), l.finishReason && (h = l.finishReason), l.done && ((R = e.setStreamingState) == null || R.call(e, !1), e._activeRequestId = null);
221
+ var x, C, R;
222
+ l.content && (a = l.fullContent, (x = e.setText) == null || x.call(e, a)), (C = l.usage) != null && C.tokens && (u += l.usage.tokens), l.finishReason && (h = l.finishReason), l.done && ((R = e.setStreamingState) == null || R.call(e, !1), e._activeRequestId = null);
223
223
  }), (g = e.addLLMLog) == null || g.call(e, (this.operationName || "streaming-request") + "-response", { requestId: s.requestId }, { content: a, usage: { tokens: u } }), h === "length" ? ((d = e.setAttribute) == null || d.call(e, "_truncated", !0), (v = e.addLog) == null || v.call(e, "Response truncated. Increase Max Tokens.", "warn", { finish_reason: "length" })) : (b = e.setAttribute) == null || b.call(e, "_truncated", !1), await ((_ = e.persistNow) == null ? void 0 : _.call(e)), e;
224
224
  } catch (l) {
225
225
  throw (w = e.addLLMLog) == null || w.call(e, (this.operationName || "streaming-request") + "-error", { requestId: s.requestId }, null, l), (y = e.setStreamingState) == null || y.call(e, !1), e._activeRequestId = null, (k = e.setText) == null || k.call(e, `Error: ${l.message}`), (T = e.setAttribute) == null || T.call(e, "_truncated", !1), await ((q = e.persistNow) == null ? void 0 : q.call(e)), l;
@@ -8,7 +8,7 @@ class d extends c {
8
8
  const n = {
9
9
  model: t.model || this.config.model || "claude-3-sonnet-20240229",
10
10
  max_tokens: t.maxTokens || 1e3,
11
- temperature: t.temperature || 0.7,
11
+ temperature: t.temperature ?? 0.7,
12
12
  messages: e.filter((s) => s.role !== "system"),
13
13
  stream: t.stream || !1
14
14
  }, r = e.find((s) => s.role === "system");
@@ -6,7 +6,7 @@ class l extends u {
6
6
  return {
7
7
  model: t.model || this.config.model || "gpt-3.5-turbo",
8
8
  messages: e,
9
- temperature: t.temperature || 0.7,
9
+ temperature: t.temperature ?? 0.7,
10
10
  max_tokens: t.maxTokens || 1e3,
11
11
  stream: t.stream || !1
12
12
  };
@@ -7,7 +7,7 @@ class _ extends A {
7
7
  const n = this.processMessages(e, t), s = {
8
8
  contents: this.convertToGeminiFormat(n),
9
9
  generationConfig: {
10
- temperature: t.temperature || this.config.temperature || 0.7,
10
+ temperature: t.temperature ?? this.config.temperature ?? 0.7,
11
11
  maxOutputTokens: t.maxTokens || this.config.maxTokens || 1e3,
12
12
  topP: 0.8,
13
13
  topK: 10
@@ -9,7 +9,7 @@ class u extends c {
9
9
  const s = {
10
10
  model: t.model || this.config.model || "grok-beta",
11
11
  messages: this.processMessages(e, t),
12
- temperature: t.temperature || 0.7,
12
+ temperature: t.temperature ?? 0.7,
13
13
  max_tokens: t.maxTokens || 1e3,
14
14
  stream: t.stream || !1
15
15
  };
@@ -6,7 +6,7 @@ class c extends l {
6
6
  return {
7
7
  model: t.model || this.config.model || "llama2",
8
8
  messages: e,
9
- temperature: t.temperature || 0.7,
9
+ temperature: t.temperature ?? 0.7,
10
10
  max_tokens: t.maxTokens || 1e3,
11
11
  stream: t.stream || !1
12
12
  };
@@ -26,7 +26,7 @@ class l extends r {
26
26
  messages: this.processMessages(e, t),
27
27
  stream: t.stream || !1,
28
28
  think: t.enableThinking || !1,
29
- options: { temperature: t.temperature || 0.7, num_predict: t.maxTokens || 1e3 }
29
+ options: { temperature: t.temperature ?? 0.7, num_predict: t.maxTokens || 1e3 }
30
30
  };
31
31
  return t.enableThinking && this.capabilities.has("thinking") && (n.options.enable_thinking = !0), n;
32
32
  }
@@ -20,7 +20,7 @@ class k extends m {
20
20
  const i = e.model || this.config.model || "gpt-3.5-turbo", s = {
21
21
  model: i,
22
22
  messages: this.processMessages(t, e),
23
- temperature: e.temperature || 0.7,
23
+ temperature: e.temperature ?? 0.7,
24
24
  stream: e.stream || !1
25
25
  };
26
26
  return g(this, c, d).call(this, i) ? (s.max_completion_tokens = e.maxTokens || 1e3, s.temperature = 1) : s.max_tokens = e.maxTokens || 1e3, e.enableThinking && this.capabilities.has("thinking") && (s.reasoning_effort = e.reasoningEffort || "medium"), e.tools && this.capabilities.has("tools") && (s.tools = e.tools), s;
@@ -7,7 +7,7 @@ class f extends d {
7
7
  const i = {
8
8
  model: e.model || this.config.model,
9
9
  messages: this.processMessages(t, e),
10
- temperature: e.temperature || 0.7,
10
+ temperature: e.temperature ?? 0.7,
11
11
  max_tokens: e.maxTokens || 1e3,
12
12
  stream: e.stream || !1
13
13
  };
@@ -1,4 +1,4 @@
1
- import { ref as u, computed as L, watch as G, onMounted as Ne, onUnmounted as Je, createElementBlock as o, createCommentVNode as r, openBlock as n, createElementVNode as s, withModifiers as J, createTextVNode as R, toDisplayString as d, withDirectives as p, Fragment as S, renderList as z, unref as ie, vModelSelect as re, vModelText as I, vModelCheckbox as Re, normalizeClass as ue, createVNode as je, nextTick as qe } from "vue";
1
+ import { ref as u, computed as L, watch as G, onMounted as Ne, onUnmounted as Je, createElementBlock as o, createCommentVNode as r, openBlock as n, createElementVNode as s, withModifiers as J, createTextVNode as R, toDisplayString as d, withDirectives as y, Fragment as S, renderList as z, unref as re, vModelSelect as ue, vModelText as I, vModelCheckbox as Re, normalizeClass as Y, createVNode as je, nextTick as qe } from "vue";
2
2
  import { useLLM as Oe, createDefaultConfig as de } from "../useLLM.js";
3
3
  import { DEFAULT_CONFIGS as Be, createProvider as We } from "../../providers/factory.js";
4
4
  import Ge from "./StoredKeysManager.vue.js";
@@ -31,7 +31,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
31
31
  }, Ul = { class: "llm-provider-details-row" }, Al = ["onClick", "disabled"], El = { class: "llm-provider-details" }, Ll = ["onClick", "title"], Il = ["onClick", "title"], xl = ["onClick"], Vl = ["onClick"], $l = {
32
32
  key: 1,
33
33
  class: "llm-empty-state"
34
- }, Dl = { class: "llm-modal-footer" }, Fl = ["disabled"], Y = "judge-provider", Nl = {
34
+ }, Dl = { class: "llm-modal-footer" }, Fl = ["disabled"], H = "judge-provider", Nl = {
35
35
  __name: "LLMConfigModal",
36
36
  props: {
37
37
  isVisible: Boolean,
@@ -42,32 +42,32 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
42
42
  },
43
43
  emits: ["close", "configChanged"],
44
44
  setup(x, { emit: ve }) {
45
- const b = x, j = ve, V = Be, {
45
+ const g = x, j = ve, V = Be, {
46
46
  client: Jl,
47
47
  configStore: Rl,
48
48
  getEnabledConfigs: jl,
49
49
  getAllConfigs: ce,
50
- getActiveProviderId: H,
51
- setActiveProviderId: Q,
50
+ getActiveProviderId: Q,
51
+ setActiveProviderId: X,
52
52
  saveConfig: me,
53
53
  deleteConfig: fe,
54
54
  enableProvider: be,
55
55
  disableProvider: ge,
56
56
  getAvailableModels: pe,
57
- testConnection: X,
57
+ testConnection: Z,
58
58
  refresh: $,
59
- getStoredKey: Z,
60
- hasStoredKey: ee,
59
+ getStoredKey: ee,
60
+ hasStoredKey: le,
61
61
  getAllStoredKeys: ye,
62
62
  storeKey: ql
63
- } = Oe(), t = u(de("")), T = u([]), M = u(null), y = u(null), v = u(!1), m = u(null), K = u(!1), k = u(null), U = u([]), _ = u(!1), h = u(null), C = u(/* @__PURE__ */ new Map()), q = u(!1), le = u(0), P = u(null), A = L(
63
+ } = Oe(), t = u(de("")), T = u([]), M = u(null), k = u(null), v = u(!1), f = u(null), K = u(!1), c = u(null), U = u([]), _ = u(!1), h = u(null), C = u(/* @__PURE__ */ new Map()), q = u(!1), te = u(0), P = u(null), A = L(
64
64
  () => t.value.provider ? V[t.value.provider] : null
65
- ), f = u(/* @__PURE__ */ new Set()), ke = L(() => t.value.model && f.value.has("thinking")), D = L(() => {
65
+ ), b = u(/* @__PURE__ */ new Set()), ke = L(() => t.value.model && b.value.has("thinking")), D = L(() => {
66
66
  var e, i;
67
67
  if (!((e = t.value) != null && e.provider) || !((i = t.value) != null && i.model) || t.value.provider !== "openai") return !1;
68
68
  const l = String(t.value.model).toLowerCase();
69
- return f.value.has("thinking") || l.startsWith("o1") || l.startsWith("o2") || l.startsWith("o3") || l.startsWith("o-") || l.includes("gpt-5") || l === "gpt5" || l.includes("reasoning");
70
- }), he = L(() => le.value > 0), te = L(() => {
69
+ return b.value.has("thinking") || l.startsWith("o1") || l.startsWith("o2") || l.startsWith("o3") || l.startsWith("o-") || l.includes("gpt-5") || l === "gpt5" || l.includes("reasoning");
70
+ }), he = L(() => te.value > 0), se = L(() => {
71
71
  var l;
72
72
  return !(!t.value.name || !t.value.provider || !t.value.baseUrl || (l = A.value) != null && l.requiresApiKey && !t.value.apiKey);
73
73
  }), Ce = (l) => {
@@ -82,23 +82,23 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
82
82
  "llm-test-default": !e || e === "default"
83
83
  };
84
84
  }, F = () => {
85
- if (T.value = ce(), M.value = H() || "", b.showJudge)
85
+ if (T.value = ce(), M.value = Q() || "", g.showJudge)
86
86
  try {
87
- y.value = localStorage.getItem("llm:" + Y) || null;
87
+ k.value = localStorage.getItem("llm:" + H) || null;
88
88
  } catch {
89
- y.value = null;
89
+ k.value = null;
90
90
  }
91
91
  }, O = () => {
92
92
  const l = ye();
93
- le.value = Object.keys(l).length;
93
+ te.value = Object.keys(l).length;
94
94
  }, Pe = async () => {
95
95
  const l = A.value;
96
96
  if (l) {
97
- t.value.baseUrl = l.baseUrl, t.value.model = "", t.value.enableThinking = !1, f.value.clear(), m.value || (t.value.name = "");
98
- const e = Z(t.value.provider);
97
+ t.value.baseUrl = l.baseUrl, t.value.model = "", t.value.enableThinking = !1, b.value.clear(), f.value || (t.value.name = "");
98
+ const e = ee(t.value.provider);
99
99
  e && !t.value.apiKey && (t.value.apiKey = e), await B();
100
100
  }
101
- k.value = null, h.value = null;
101
+ c.value = null, h.value = null;
102
102
  }, B = async () => {
103
103
  if (!t.value.provider || !t.value.baseUrl) {
104
104
  U.value = [], h.value = null;
@@ -115,14 +115,14 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
115
115
  }
116
116
  }, W = async () => {
117
117
  if (!t.value.provider || !t.value.model) {
118
- f.value.clear();
118
+ b.value.clear();
119
119
  return;
120
120
  }
121
121
  try {
122
122
  const l = { ...t.value }, e = We(l.provider, l);
123
- await e.initialize(), f.value = new Set(e.capabilities), f.value.has("thinking") || (t.value.enableThinking = !1);
123
+ await e.initialize(), b.value = new Set(e.capabilities), b.value.has("thinking") || (t.value.enableThinking = !1);
124
124
  } catch (l) {
125
- console.warn("Failed to detect model capabilities:", l), f.value.clear();
125
+ console.warn("Failed to detect model capabilities:", l), b.value.clear();
126
126
  }
127
127
  }, we = () => `provider_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, Se = () => {
128
128
  if (!t.value.provider) return "";
@@ -132,52 +132,52 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
132
132
  if (!t.value.provider || !t.value.model) return "";
133
133
  const l = V[t.value.provider], e = (l == null ? void 0 : l.name) || "Provider";
134
134
  let i = t.value.model;
135
- return i.includes("/") && (i = i.split("/").pop()), i = i.replace(/-(instruct|chat|base|completion)$/i, "").replace(/^(gpt-|claude-|llama-|gemini-)/i, "").replace(/-vision$/, "").replace(/-\d+b?$/i, ""), i = i.split("-").map((c) => c.charAt(0).toUpperCase() + c.slice(1)).join(" ").substring(0, 20), `${e} ${i}`.trim();
135
+ return i.includes("/") && (i = i.split("/").pop()), i = i.replace(/-(instruct|chat|base|completion)$/i, "").replace(/^(gpt-|claude-|llama-|gemini-)/i, "").replace(/-vision$/, "").replace(/-\d+b?$/i, ""), i = i.split("-").map((m) => m.charAt(0).toUpperCase() + m.slice(1)).join(" ").substring(0, 20), `${e} ${i}`.trim();
136
136
  }, Me = async () => {
137
- if (te.value) {
138
- K.value = !0, k.value = null;
137
+ if (se.value) {
138
+ K.value = !0, c.value = null;
139
139
  try {
140
- await X(t.value);
141
- const l = v.value && m.value ? m.value : we();
142
- me(l, t.value) ? (H() || (Q(l), M.value = l), await $(), k.value = {
140
+ await Z(t.value);
141
+ const l = v.value && f.value ? f.value : we();
142
+ me(l, t.value) ? (Q() || (X(l), M.value = l), await $(), c.value = {
143
143
  success: !0,
144
144
  message: v.value ? "Provider updated!" : "Provider added!"
145
- }, F(), w(), E(), setTimeout(() => j("close"), 1500)) : k.value = { success: !1, message: "Failed to save configuration." };
145
+ }, F(), w(), E(), setTimeout(() => j("close"), 1500)) : c.value = { success: !1, message: "Failed to save configuration." };
146
146
  } catch (l) {
147
- console.error("LLM connection test failed:", l), k.value = { success: !1, message: `Connection failed: ${l.message}` };
147
+ console.error("LLM connection test failed:", l), c.value = { success: !1, message: `Connection failed: ${l.message}` };
148
148
  } finally {
149
149
  K.value = !1;
150
150
  }
151
151
  }
152
152
  }, Ke = (l) => {
153
- Q(l) && (M.value = l, $(), E());
153
+ X(l) && (M.value = l, $(), E());
154
154
  }, Ue = async (l) => {
155
155
  C.value.set(l.id, "testing");
156
156
  try {
157
- await X(l), C.value.set(l.id, "success"), setTimeout(() => C.value.set(l.id, "default"), 3e3);
157
+ await Z(l), C.value.set(l.id, "success"), setTimeout(() => C.value.set(l.id, "default"), 3e3);
158
158
  } catch (e) {
159
159
  console.error("LLM connection test failed:", e), C.value.set(l.id, "failed"), setTimeout(() => C.value.set(l.id, "default"), 5e3);
160
160
  }
161
- }, se = (l) => {
161
+ }, ae = (l) => {
162
162
  var e;
163
- t.value = { ...l }, v.value = !0, m.value = l.id, k.value = null, B().then(() => {
163
+ t.value = { ...l }, v.value = !0, f.value = l.id, c.value = null, B().then(() => {
164
164
  t.value.model && W();
165
- }), (e = b.editTarget) != null && e.focusField && qe(() => {
166
- var i, c;
167
- b.editTarget.focusField === "maxTokens" && (P != null && P.value) && (P.value.focus(), (c = (i = P.value).select) == null || c.call(i));
165
+ }), (e = g.editTarget) != null && e.focusField && qe(() => {
166
+ var i, m;
167
+ g.editTarget.focusField === "maxTokens" && (P != null && P.value) && (P.value.focus(), (m = (i = P.value).select) == null || m.call(i));
168
168
  });
169
169
  }, Ae = () => {
170
- w(), v.value = !0, m.value = null;
170
+ w(), v.value = !0, f.value = null;
171
171
  }, Ee = () => w(), Le = (l) => {
172
- confirm("Are you sure you want to delete this provider?") && fe(l) && (F(), l === m.value && w(), $(), E());
172
+ confirm("Are you sure you want to delete this provider?") && fe(l) && (F(), l === f.value && w(), $(), E());
173
173
  }, Ie = (l) => {
174
174
  (l.enabled !== !1 ? ge(l.id) : be(l.id)) && (F(), $(), E());
175
175
  }, w = () => {
176
- t.value = de(""), v.value = !1, m.value = null, k.value = null, U.value = [], h.value = null, f.value.clear();
176
+ t.value = de(""), v.value = !1, f.value = null, c.value = null, U.value = [], h.value = null, b.value.clear();
177
177
  }, N = () => {
178
178
  w(), j("close");
179
- }, ae = (l) => {
180
- b.isVisible && l.key === "Escape" && (l.preventDefault(), N());
179
+ }, oe = (l) => {
180
+ g.isVisible && l.key === "Escape" && (l.preventDefault(), N());
181
181
  }, E = () => {
182
182
  j("configChanged");
183
183
  try {
@@ -185,47 +185,47 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
185
185
  } catch {
186
186
  }
187
187
  };
188
- G(() => b.isVisible, (l) => {
188
+ G(() => g.isVisible, (l) => {
189
189
  var e;
190
- if (l && (F(), O(), w(), (e = b.editTarget) != null && e.name && T.value.length > 0)) {
191
- const i = T.value.find((c) => c.name === b.editTarget.name);
192
- i && se(i);
190
+ if (l && (F(), O(), w(), (e = g.editTarget) != null && e.name && T.value.length > 0)) {
191
+ const i = T.value.find((m) => m.name === g.editTarget.name);
192
+ i && ae(i);
193
193
  }
194
194
  }), G(() => t.value.model, (l) => {
195
195
  if (l) {
196
- if (W(), !m.value) {
196
+ if (W(), !f.value) {
197
197
  const e = Te();
198
198
  e && (t.value.name = e);
199
199
  }
200
200
  D.value && (t.value.temperature = 1);
201
201
  } else
202
- f.value.clear(), t.value.enableThinking = !1;
202
+ b.value.clear(), t.value.enableThinking = !1;
203
203
  }), G(() => t.value.temperature, (l) => {
204
204
  D.value && l !== 1 && (t.value.temperature = 1);
205
205
  });
206
206
  const xe = () => {
207
207
  q.value = !0;
208
- }, oe = () => {
208
+ }, ne = () => {
209
209
  q.value = !1;
210
210
  }, Ve = () => {
211
211
  O();
212
- }, $e = () => t.value.provider === "custom" ? "Enter your API key (optional)" : ee(t.value.provider) ? "Using stored key (or enter new)" : "Enter your API key", De = () => {
213
- const l = Z(t.value.provider);
212
+ }, $e = () => t.value.provider === "custom" ? "Enter your API key (optional)" : le(t.value.provider) ? "Using stored key (or enter new)" : "Enter your API key", De = () => {
213
+ const l = ee(t.value.provider);
214
214
  l && (t.value.apiKey = l);
215
215
  }, Fe = (l) => {
216
- if (!b.showJudge) return;
217
- const e = l.id === y.value ? null : l.id;
216
+ if (!g.showJudge) return;
217
+ const e = l.id === k.value ? null : l.id;
218
218
  try {
219
- e ? localStorage.setItem("llm:" + Y, e) : localStorage.removeItem("llm:" + Y), y.value = e, E();
219
+ e ? localStorage.setItem("llm:" + H, e) : localStorage.removeItem("llm:" + H), k.value = e, E();
220
220
  } catch {
221
221
  }
222
222
  };
223
223
  return Ne(() => {
224
- document.addEventListener("keydown", ae), O();
224
+ document.addEventListener("keydown", oe), O();
225
225
  }), Je(() => {
226
- document.removeEventListener("keydown", ae);
226
+ document.removeEventListener("keydown", oe);
227
227
  }), (l, e) => {
228
- var i, c, ne;
228
+ var i, m, ie;
229
229
  return x.isVisible ? (n(), o("div", {
230
230
  key: 0,
231
231
  class: "llm-modal-overlay",
@@ -239,7 +239,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
239
239
  s("div", Ye, [
240
240
  s("h2", null, [
241
241
  e[12] || (e[12] = R(" Manage LLM Providers ", -1)),
242
- v.value ? (n(), o("span", He, d(m.value ? " - Edit" : " - Add"), 1)) : r("", !0)
242
+ v.value ? (n(), o("span", He, d(f.value ? " - Edit" : " - Add"), 1)) : r("", !0)
243
243
  ]),
244
244
  s("button", {
245
245
  class: "llm-btn llm-btn--ghost llm-btn--sm llm-close-btn",
@@ -250,22 +250,22 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
250
250
  v.value ? (n(), o("div", Xe, [
251
251
  s("div", Ze, [
252
252
  e[22] || (e[22] = s("label", { class: "llm-field-label" }, "Provider Type:", -1)),
253
- p(s("select", {
253
+ y(s("select", {
254
254
  "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value.provider = a),
255
255
  onChange: Pe,
256
256
  class: "llm-form-control"
257
257
  }, [
258
258
  e[13] || (e[13] = s("option", { value: "" }, "Select a provider...", -1)),
259
- (n(!0), o(S, null, z(ie(V), (a, g) => (n(), o("option", {
260
- key: g,
261
- value: g
259
+ (n(!0), o(S, null, z(re(V), (a, p) => (n(), o("option", {
260
+ key: p,
261
+ value: p
262
262
  }, d(a.name), 9, el))), 128))
263
263
  ], 544), [
264
- [re, t.value.provider]
264
+ [ue, t.value.provider]
265
265
  ]),
266
266
  t.value.provider ? (n(), o(S, { key: 0 }, [
267
267
  e[14] || (e[14] = s("label", { class: "llm-field-label" }, "Provider Name:", -1)),
268
- p(s("input", {
268
+ y(s("input", {
269
269
  "onUpdate:modelValue": e[1] || (e[1] = (a) => t.value.name = a),
270
270
  type: "text",
271
271
  placeholder: Se(),
@@ -277,7 +277,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
277
277
  ], 64)) : r("", !0),
278
278
  t.value.provider ? (n(), o(S, { key: 1 }, [
279
279
  e[18] || (e[18] = s("label", { class: "llm-field-label" }, "Base URL:", -1)),
280
- p(s("input", {
280
+ y(s("input", {
281
281
  "onUpdate:modelValue": e[2] || (e[2] = (a) => t.value.baseUrl = a),
282
282
  type: "url",
283
283
  placeholder: (i = A.value) == null ? void 0 : i.baseUrl,
@@ -286,20 +286,20 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
286
286
  }, null, 8, tl), [
287
287
  [I, t.value.baseUrl]
288
288
  ]),
289
- (c = A.value) != null && c.requiresApiKey || t.value.provider === "custom" ? (n(), o(S, { key: 0 }, [
289
+ (m = A.value) != null && m.requiresApiKey || t.value.provider === "custom" ? (n(), o(S, { key: 0 }, [
290
290
  e[16] || (e[16] = s("label", { class: "llm-field-label" }, "API Key:", -1)),
291
291
  s("div", sl, [
292
292
  s("div", al, [
293
- p(s("input", {
293
+ y(s("input", {
294
294
  "onUpdate:modelValue": e[3] || (e[3] = (a) => t.value.apiKey = a),
295
295
  type: "password",
296
296
  placeholder: $e(),
297
297
  class: "llm-form-control",
298
- required: (ne = A.value) == null ? void 0 : ne.requiresApiKey
298
+ required: (ie = A.value) == null ? void 0 : ie.requiresApiKey
299
299
  }, null, 8, ol), [
300
300
  [I, t.value.apiKey]
301
301
  ]),
302
- ie(ee)(t.value.provider) ? (n(), o("button", {
302
+ re(le)(t.value.provider) ? (n(), o("button", {
303
303
  key: 0,
304
304
  type: "button",
305
305
  class: "llm-btn llm-btn--ghost llm-btn--sm",
@@ -315,7 +315,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
315
315
  ], 64)) : r("", !0),
316
316
  e[19] || (e[19] = s("label", { class: "llm-field-label" }, "Model:", -1)),
317
317
  s("div", rl, [
318
- p(s("select", {
318
+ y(s("select", {
319
319
  "onUpdate:modelValue": e[4] || (e[4] = (a) => t.value.model = a),
320
320
  disabled: _.value,
321
321
  class: "llm-form-control"
@@ -326,7 +326,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
326
326
  value: a
327
327
  }, d(a), 9, vl))), 128))
328
328
  ], 8, ul), [
329
- [re, t.value.model]
329
+ [ue, t.value.model]
330
330
  ]),
331
331
  s("button", {
332
332
  class: "llm-btn llm-btn--ghost llm-btn--sm llm-refresh-btn",
@@ -337,7 +337,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
337
337
  h.value ? (n(), o("div", ml, d(h.value), 1)) : r("", !0),
338
338
  ke.value ? (n(), o("div", fl, [
339
339
  s("label", bl, [
340
- p(s("input", {
340
+ y(s("input", {
341
341
  type: "checkbox",
342
342
  "onUpdate:modelValue": e[5] || (e[5] = (a) => t.value.enableThinking = a),
343
343
  class: "llm-checkbox"
@@ -350,7 +350,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
350
350
  ]),
351
351
  e[20] || (e[20] = s("label", { class: "llm-field-label" }, "Temperature:", -1)),
352
352
  s("div", gl, [
353
- p(s("input", {
353
+ y(s("input", {
354
354
  "onUpdate:modelValue": e[6] || (e[6] = (a) => t.value.temperature = a),
355
355
  type: "number",
356
356
  min: "0",
@@ -369,7 +369,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
369
369
  D.value ? (n(), o("small", kl, " This model uses a fixed temperature of 1. ")) : (n(), o("small", yl, " Controls randomness: 0 = deterministic, 2 = very creative "))
370
370
  ]),
371
371
  e[21] || (e[21] = s("label", { class: "llm-field-label" }, "Max Tokens:", -1)),
372
- p(s("input", {
372
+ y(s("input", {
373
373
  "onUpdate:modelValue": e[7] || (e[7] = (a) => t.value.maxTokens = a),
374
374
  type: "number",
375
375
  min: "1",
@@ -386,17 +386,21 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
386
386
  ]
387
387
  ])
388
388
  ], 64)) : r("", !0)
389
- ])
389
+ ]),
390
+ c.value ? (n(), o("div", {
391
+ key: 0,
392
+ class: Y(["llm-test-result", c.value.success ? "llm-test-result--success" : "llm-test-result--error"])
393
+ }, d(c.value.message), 3)) : r("", !0)
390
394
  ])) : (n(), o("div", hl, [
391
395
  T.value.length > 0 ? (n(), o("div", Cl, [
392
396
  e[23] || (e[23] = s("h3", null, "Configured Providers", -1)),
393
397
  (n(!0), o(S, null, z(T.value, (a) => (n(), o("div", {
394
398
  key: a.id,
395
- class: ue(["llm-provider-item", {
399
+ class: Y(["llm-provider-item", {
396
400
  active: a.id === M.value,
397
401
  disabled: a.enabled === !1
398
402
  }]),
399
- onClick: (g) => a.enabled !== !1 ? Ke(a.id) : null
403
+ onClick: (p) => a.enabled !== !1 ? Ke(a.id) : null
400
404
  }, [
401
405
  s("div", Pl, [
402
406
  s("div", wl, [
@@ -405,12 +409,12 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
405
409
  a.enabled === !1 ? (n(), o("span", Tl, "Disabled")) : r("", !0)
406
410
  ]),
407
411
  a.id === M.value ? (n(), o("span", Ml, "Active")) : r("", !0),
408
- x.showJudge && a.id === y.value ? (n(), o("span", Kl, "Judge")) : r("", !0)
412
+ x.showJudge && a.id === k.value ? (n(), o("span", Kl, "Judge")) : r("", !0)
409
413
  ]),
410
414
  s("div", Ul, [
411
415
  s("button", {
412
- class: ue(["llm-test-status-btn", _e(a.id)]),
413
- onClick: J((g) => Ue(a), ["stop"]),
416
+ class: Y(["llm-test-status-btn", _e(a.id)]),
417
+ onClick: J((p) => Ue(a), ["stop"]),
414
418
  disabled: K.value
415
419
  }, d(Ce(a.id)), 11, Al),
416
420
  s("div", El, d(a.provider) + " • " + d(a.baseUrl), 1)
@@ -424,21 +428,21 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
424
428
  x.showJudge && a.enabled !== !1 ? (n(), o("button", {
425
429
  key: 0,
426
430
  class: "llm-btn llm-btn--ghost llm-btn--sm",
427
- onClick: (g) => Fe(a),
428
- title: a.id === y.value ? "Unset as judge" : "Set as judge"
429
- }, d(a.id === y.value ? "Unmark Judge" : "Mark Judge"), 9, Ll)) : r("", !0),
431
+ onClick: (p) => Fe(a),
432
+ title: a.id === k.value ? "Unset as judge" : "Set as judge"
433
+ }, d(a.id === k.value ? "Unmark Judge" : "Mark Judge"), 9, Ll)) : r("", !0),
430
434
  s("button", {
431
435
  class: "llm-btn llm-btn--ghost llm-btn--sm",
432
- onClick: (g) => Ie(a),
436
+ onClick: (p) => Ie(a),
433
437
  title: a.enabled === !1 ? "Enable provider" : "Disable provider"
434
438
  }, d(a.enabled === !1 ? "Enable" : "Disable"), 9, Il),
435
439
  s("button", {
436
440
  class: "llm-btn llm-btn--ghost llm-btn--sm",
437
- onClick: (g) => se(a)
441
+ onClick: (p) => ae(a)
438
442
  }, " Edit ", 8, xl),
439
443
  s("button", {
440
444
  class: "llm-btn llm-btn--sm llm-btn--danger",
441
- onClick: (g) => Le(a.id)
445
+ onClick: (p) => Le(a.id)
442
446
  }, " Delete ", 8, Vl)
443
447
  ])
444
448
  ], 10, _l))), 128))
@@ -451,7 +455,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
451
455
  q.value ? (n(), o("div", {
452
456
  key: 2,
453
457
  class: "llm-keys-manager-overlay",
454
- onClick: oe
458
+ onClick: ne
455
459
  }, [
456
460
  s("div", {
457
461
  class: "llm-keys-manager-content",
@@ -459,7 +463,7 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
459
463
  }, ["stop"]))
460
464
  }, [
461
465
  je(Ge, {
462
- onClose: oe,
466
+ onClose: ne,
463
467
  onKeysUpdated: Ve
464
468
  })
465
469
  ])
@@ -485,14 +489,14 @@ const Ye = { class: "llm-modal-header" }, He = { key: 0 }, Qe = { class: "llm-mo
485
489
  key: 2,
486
490
  class: "llm-btn llm-btn--primary",
487
491
  onClick: Me,
488
- disabled: !te.value || K.value
492
+ disabled: !se.value || K.value
489
493
  }, d(K.value ? "Testing..." : "Save"), 9, Fl)) : r("", !0)
490
494
  ])
491
495
  ])
492
496
  ])) : r("", !0);
493
497
  };
494
498
  }
495
- }, Hl = /* @__PURE__ */ ze(Nl, [["__scopeId", "data-v-a26b0717"]]);
499
+ }, Hl = /* @__PURE__ */ ze(Nl, [["__scopeId", "data-v-0835d20f"]]);
496
500
  export {
497
501
  Hl as default
498
502
  };
package/dist/vue-llm.css CHANGED
@@ -1 +1 @@
1
- .llm-provider-selector[data-v-9fd186c2]{font-size:var(--llm-font-size-sm, .85rem)}.llm-provider-select[data-v-9fd186c2]{padding:var(--llm-spacing-xs, .25rem) var(--llm-spacing-sm, .5rem);border:1px solid var(--llm-border, #444);border-radius:var(--llm-radius-sm, 4px);background:var(--llm-bg, #111);color:var(--llm-text, #ddd);font-family:inherit;font-size:inherit;cursor:pointer;min-width:120px;max-width:180px}.llm-provider-select[data-v-9fd186c2]:focus{outline:none;border-color:var(--llm-accent, #6c7cff)}.llm-provider-select[data-v-9fd186c2]:hover{border-color:var(--llm-border-hover, #666)}.config-option[data-v-9fd186c2]{font-style:italic;border-top:1px solid var(--llm-border, #444)}.llm-stored-keys-manager[data-v-dd3230e5]{background:var(--llm-bg, #181a1f);border-radius:var(--llm-radius-md, 8px);max-height:80vh;display:flex;flex-direction:column;color:var(--llm-text, #e6e8ea)}.llm-manager-header[data-v-dd3230e5]{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--llm-border, #33383f);flex-shrink:0}.llm-manager-header h3[data-v-dd3230e5]{margin:0;font-size:1.25rem;font-weight:600;color:var(--llm-text, #e6e8ea)}.llm-close-btn[data-v-dd3230e5]{font-size:1.5rem;line-height:1}.llm-close-btn[data-v-dd3230e5]:hover{opacity:.7}.llm-manager-body[data-v-dd3230e5]{flex:1;overflow:hidden;min-height:0;display:flex;flex-direction:column}.llm-scrollable-content[data-v-dd3230e5]{flex:1;overflow-y:auto;padding:1.5rem;min-height:0}.llm-empty-keys[data-v-dd3230e5]{text-align:center;padding:2rem 1rem;color:var(--llm-text-dim, #9aa0a6)}.llm-empty-keys p[data-v-dd3230e5]{margin:0 0 .5rem;font-size:1rem;font-weight:500}.llm-empty-keys small[data-v-dd3230e5]{font-size:.9rem;opacity:.7}.llm-keys-list[data-v-dd3230e5]{margin-bottom:1rem}.llm-key-item[data-v-dd3230e5]{border:1px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-sm, 6px);margin-bottom:.75rem;background:var(--llm-bg-soft, #1f2228);overflow:hidden}.llm-key-header[data-v-dd3230e5]{display:flex;justify-content:space-between;align-items:flex-start;padding:.75rem}.llm-provider-info[data-v-dd3230e5]{flex:1;display:flex;flex-direction:column;gap:.5rem}.llm-provider-header[data-v-dd3230e5]{display:flex;justify-content:space-between;align-items:center}.llm-provider-name[data-v-dd3230e5]{font-weight:600;font-size:.9rem;color:var(--llm-text, #e6e8ea)}.llm-service-endpoint[data-v-dd3230e5]{margin-top:.25rem}.llm-service-endpoint small[data-v-dd3230e5]{color:var(--llm-text-dim, #9aa0a6);font-family:SF Mono,Monaco,Inconsolata,Roboto Mono,monospace;font-size:.75rem}.llm-provider-select[data-v-dd3230e5]{font-weight:600;font-size:.9rem;min-width:200px}.llm-key-input-row[data-v-dd3230e5]{display:flex;gap:.5rem;align-items:center}.llm-key-input-inline[data-v-dd3230e5]{flex:1;font-family:SF Mono,Monaco,Inconsolata,Roboto Mono,monospace;font-size:.8rem;padding:.4rem .6rem}.llm-stored-date[data-v-dd3230e5]{font-size:.75rem;color:var(--llm-text-dim, #9aa0a6)}.llm-manager-footer[data-v-dd3230e5]{display:flex;align-items:center;gap:.5rem;padding:1.5rem;border-top:1px solid var(--llm-border, #33383f);flex-shrink:0}.llm-footer-spacer[data-v-dd3230e5]{flex:1}.llm-btn[data-v-dd3230e5]{padding:.5rem 1rem;border-radius:var(--llm-radius-sm, 4px);border:1px solid var(--llm-border, #33383f);background:var(--llm-bg-soft, #1f2228);color:var(--llm-text, #e6e8ea);cursor:pointer;font-size:var(--llm-font-size-sm, .85rem);transition:all .15s ease}.llm-btn[data-v-dd3230e5]:hover:not(:disabled){border-color:var(--llm-border-hover, #4b525c);background:var(--llm-bg-mute, #242830)}.llm-btn--sm[data-v-dd3230e5]{padding:.25rem .5rem;font-size:var(--llm-font-size-xs, .75rem)}.llm-btn--secondary[data-v-dd3230e5]{background:var(--llm-bg-mute, #242830);border-color:var(--llm-accent, #6366f1);color:var(--llm-accent, #6366f1)}.llm-btn--ghost[data-v-dd3230e5]{background:transparent;border-color:transparent}.llm-btn--ghost[data-v-dd3230e5]:hover:not(:disabled){background:var(--llm-bg-mute, #242830)}.llm-btn--danger[data-v-dd3230e5]{background:var(--llm-error, #ef4444);border-color:var(--llm-error, #ef4444);color:#fff}.llm-form-control[data-v-dd3230e5]{width:100%;padding:.5rem .75rem;border:1px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-sm, 4px);background:var(--llm-bg, #181a1f);color:var(--llm-text, #e6e8ea);font-size:var(--llm-font-size-sm, .85rem)}.llm-form-control[data-v-dd3230e5]:focus{outline:none;border-color:var(--llm-accent, #6366f1)}@media(max-width:768px){.llm-manager-header[data-v-dd3230e5],.llm-manager-footer[data-v-dd3230e5],.llm-scrollable-content[data-v-dd3230e5]{padding:1rem}.llm-key-header[data-v-dd3230e5]{flex-direction:column;align-items:stretch;gap:1rem;padding:.75rem}.llm-key-input-row[data-v-dd3230e5]{flex-direction:column;align-items:stretch}.llm-provider-select[data-v-dd3230e5]{min-width:auto}}@media(max-width:480px){.llm-manager-header h3[data-v-dd3230e5]{font-size:1.1rem}}.llm-modal-overlay[data-v-a26b0717]{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000}.llm-modal[data-v-a26b0717]{background:var(--llm-bg, #181a1f);border:2px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-md, 8px);width:90%;max-width:700px;max-height:90%;position:relative;display:flex;flex-direction:column;color:var(--llm-text, #e6e8ea)}.llm-modal-header[data-v-a26b0717]{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--llm-border, #33383f);flex-shrink:0}.llm-modal-header h2[data-v-a26b0717]{margin:0;color:var(--llm-text, #e6e8ea);font-size:1.25rem}.llm-close-btn[data-v-a26b0717]{font-size:1.5rem;line-height:1}.llm-close-btn[data-v-a26b0717]:hover{opacity:.7}.llm-modal-body[data-v-a26b0717]{padding:1.5rem;flex:1;overflow-y:auto;min-height:0}.llm-btn[data-v-a26b0717]{padding:.5rem 1rem;border-radius:var(--llm-radius-sm, 4px);border:1px solid var(--llm-border, #33383f);background:var(--llm-bg-soft, #1f2228);color:var(--llm-text, #e6e8ea);cursor:pointer;font-size:var(--llm-font-size-sm, .85rem);transition:all .15s ease}.llm-btn[data-v-a26b0717]:hover:not(:disabled){border-color:var(--llm-border-hover, #4b525c);background:var(--llm-bg-mute, #242830)}.llm-btn[data-v-a26b0717]:disabled{opacity:.5;cursor:not-allowed}.llm-btn--sm[data-v-a26b0717]{padding:.25rem .5rem;font-size:var(--llm-font-size-xs, .75rem)}.llm-btn--primary[data-v-a26b0717]{background:var(--llm-accent, #6366f1);border-color:var(--llm-accent, #6366f1);color:var(--llm-bg, #181a1f)}.llm-btn--primary[data-v-a26b0717]:hover:not(:disabled){filter:brightness(1.1)}.llm-btn--secondary[data-v-a26b0717]{background:var(--llm-bg-mute, #242830);border-color:var(--llm-accent, #6366f1);color:var(--llm-accent, #6366f1)}.llm-btn--ghost[data-v-a26b0717]{background:transparent;border-color:transparent}.llm-btn--ghost[data-v-a26b0717]:hover:not(:disabled){background:var(--llm-bg-mute, #242830)}.llm-btn--danger[data-v-a26b0717]{background:var(--llm-error, #ef4444);border-color:var(--llm-error, #ef4444);color:#fff}.llm-btn--danger[data-v-a26b0717]:hover:not(:disabled){filter:brightness(1.1)}.llm-form-control[data-v-a26b0717]{width:100%;padding:.5rem .75rem;border:1px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-sm, 4px);background:var(--llm-bg, #181a1f);color:var(--llm-text, #e6e8ea);font-size:var(--llm-font-size-sm, .85rem)}.llm-form-control[data-v-a26b0717]:focus{outline:none;border-color:var(--llm-accent, #6366f1)}.llm-form-control[data-v-a26b0717]:disabled{opacity:.6;cursor:not-allowed}.llm-provider-list[data-v-a26b0717]{margin-bottom:2rem;padding-bottom:1.5rem}.llm-provider-list[data-v-a26b0717]:not(:last-child){border-bottom:1px solid var(--llm-border, #33383f)}.llm-provider-list h3[data-v-a26b0717]{margin:0 0 1rem;color:var(--llm-text, #e6e8ea);font-size:1rem}.llm-provider-item[data-v-a26b0717]{display:flex;justify-content:space-between;align-items:center;padding:1rem;border:1px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-sm, 4px);margin-bottom:.5rem;background:var(--llm-bg-soft, #1f2228);cursor:pointer;transition:all .15s ease;position:relative}.llm-provider-item[data-v-a26b0717]:hover{background:var(--llm-bg-mute, #242830);border-color:var(--llm-border-hover, #4b525c)}.llm-provider-item.active[data-v-a26b0717]{border-color:var(--llm-accent, #6366f1);background:var(--llm-bg, #181a1f);box-shadow:0 0 0 1px var(--llm-border, #33383f)}.llm-provider-item.disabled[data-v-a26b0717]{opacity:.6;cursor:not-allowed}.llm-provider-info[data-v-a26b0717]{flex:1}.llm-provider-name-row[data-v-a26b0717]{display:flex;align-items:center;margin-bottom:.25rem}.llm-provider-name[data-v-a26b0717]{font-weight:500;color:var(--llm-text, #e6e8ea);font-size:.95rem}.llm-active-badge[data-v-a26b0717],.llm-judge-badge[data-v-a26b0717]{position:absolute;top:-12px;background:var(--llm-accent, #6366f1);color:var(--llm-bg, #181a1f);font-size:.6rem;font-weight:700;padding:.2rem .5rem;border-radius:3px;text-transform:uppercase;letter-spacing:.5px;z-index:1}.llm-active-badge[data-v-a26b0717]{left:16px}.llm-judge-badge[data-v-a26b0717]{left:80px}.llm-disabled-badge[data-v-a26b0717]{background:var(--llm-border, #33383f);color:var(--llm-text, #e6e8ea);font-size:.65rem;font-weight:500;padding:.1rem .4rem;border-radius:2px;margin-left:.5rem;text-transform:uppercase}.llm-provider-details-row[data-v-a26b0717]{display:flex;align-items:center;gap:.75rem}.llm-test-status-btn[data-v-a26b0717]{background:none;border:1px solid var(--llm-border, #33383f);color:var(--llm-text, #e6e8ea);font-size:.7rem;font-weight:500;padding:.25rem .5rem;border-radius:3px;cursor:pointer;transition:all .15s ease;min-width:60px;text-align:center}.llm-test-status-btn.llm-test-default[data-v-a26b0717]:hover:not(:disabled){background:var(--llm-bg-mute, #242830);border-color:var(--llm-accent, #6366f1)}.llm-test-status-btn.llm-test-testing[data-v-a26b0717]{border-color:var(--llm-border-hover, #4b525c)}.llm-test-status-btn.llm-test-success[data-v-a26b0717]{border-color:var(--llm-success, #10b981);color:var(--llm-success, #10b981)}.llm-test-status-btn.llm-test-failed[data-v-a26b0717]{border-color:var(--llm-error, #ef4444);color:var(--llm-error, #ef4444)}.llm-provider-details[data-v-a26b0717]{font-size:.8rem;color:var(--llm-text-dim, #9aa0a6);flex:1}.llm-provider-actions[data-v-a26b0717]{display:flex;gap:.5rem;align-items:center}.llm-form-grid[data-v-a26b0717]{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center}.llm-field-label[data-v-a26b0717]{margin-bottom:0;white-space:nowrap;color:var(--llm-text, #e6e8ea);font-size:var(--llm-font-size-sm, .85rem)}.llm-api-key-field[data-v-a26b0717]{display:flex;flex-direction:column}.llm-api-key-input-row[data-v-a26b0717]{display:flex;gap:.5rem;align-items:stretch}.llm-api-key-input-row .llm-form-control[data-v-a26b0717]{flex:1}.llm-api-key-field .llm-security-note[data-v-a26b0717]{margin-top:.5rem}.llm-model-selector[data-v-a26b0717]{display:flex;gap:.5rem;align-items:stretch;flex-wrap:wrap}.llm-model-selector .llm-form-control[data-v-a26b0717]{flex:1}.llm-refresh-btn[data-v-a26b0717]{min-width:4rem;flex-shrink:0}.llm-model-error[data-v-a26b0717]{width:100%;font-size:.75rem;color:var(--llm-error, #ef4444)}.llm-thinking-toggle[data-v-a26b0717]{display:block;width:100%;margin-top:.5rem}.llm-temperature-field[data-v-a26b0717]{display:flex;flex-direction:column}.llm-field-note[data-v-a26b0717]{display:block;margin-top:.5rem;font-size:.75rem;color:var(--llm-text-dim, #9aa0a6);font-style:italic}.llm-checkbox-label[data-v-a26b0717]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-weight:500;color:var(--llm-text, #e6e8ea);font-size:var(--llm-font-size-sm, .85rem)}.llm-checkbox[data-v-a26b0717]{width:1rem;height:1rem;cursor:pointer}.llm-security-note[data-v-a26b0717]{display:block;font-size:.75rem;color:var(--llm-text-dim, #9aa0a6)}.llm-modal-footer[data-v-a26b0717]{display:flex;align-items:center;gap:.5rem;padding:1.5rem;border-top:1px solid var(--llm-border, #33383f);flex-shrink:0}.llm-footer-spacer[data-v-a26b0717]{flex:1}.llm-empty-state[data-v-a26b0717]{text-align:center;padding:2rem;color:var(--llm-text-dim, #9aa0a6)}.llm-empty-state p[data-v-a26b0717]{margin:.5rem 0;font-size:.9rem}.llm-keys-manager-overlay[data-v-a26b0717]{position:fixed;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:1001}.llm-keys-manager-content[data-v-a26b0717]{width:90%;max-width:600px;max-height:80vh;border:2px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-md, 8px);overflow:hidden}@media(max-width:768px){.llm-modal[data-v-a26b0717]{width:95%;margin:1rem}.llm-modal-body[data-v-a26b0717],.llm-modal-header[data-v-a26b0717],.llm-modal-footer[data-v-a26b0717]{padding:1rem}.llm-provider-item[data-v-a26b0717]{flex-direction:column;align-items:stretch;gap:.75rem;padding:.75rem}.llm-provider-actions[data-v-a26b0717]{width:100%;justify-content:flex-end}.llm-form-grid[data-v-a26b0717]{grid-template-columns:1fr;gap:.5rem}.llm-field-label[data-v-a26b0717]{padding-top:0;margin-top:.5rem}.llm-active-badge[data-v-a26b0717],.llm-judge-badge[data-v-a26b0717]{top:-8px;font-size:.55rem;padding:.15rem .4rem}.llm-judge-badge[data-v-a26b0717]{left:66px}}@media(max-width:480px){.llm-modal[data-v-a26b0717]{width:98%;margin:.5rem}.llm-modal-body[data-v-a26b0717],.llm-modal-header[data-v-a26b0717],.llm-modal-footer[data-v-a26b0717]{padding:.75rem}}
1
+ .llm-provider-selector[data-v-9fd186c2]{font-size:var(--llm-font-size-sm, .85rem)}.llm-provider-select[data-v-9fd186c2]{padding:var(--llm-spacing-xs, .25rem) var(--llm-spacing-sm, .5rem);border:1px solid var(--llm-border, #444);border-radius:var(--llm-radius-sm, 4px);background:var(--llm-bg, #111);color:var(--llm-text, #ddd);font-family:inherit;font-size:inherit;cursor:pointer;min-width:120px;max-width:180px}.llm-provider-select[data-v-9fd186c2]:focus{outline:none;border-color:var(--llm-accent, #6c7cff)}.llm-provider-select[data-v-9fd186c2]:hover{border-color:var(--llm-border-hover, #666)}.config-option[data-v-9fd186c2]{font-style:italic;border-top:1px solid var(--llm-border, #444)}.llm-stored-keys-manager[data-v-dd3230e5]{background:var(--llm-bg, #181a1f);border-radius:var(--llm-radius-md, 8px);max-height:80vh;display:flex;flex-direction:column;color:var(--llm-text, #e6e8ea)}.llm-manager-header[data-v-dd3230e5]{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--llm-border, #33383f);flex-shrink:0}.llm-manager-header h3[data-v-dd3230e5]{margin:0;font-size:1.25rem;font-weight:600;color:var(--llm-text, #e6e8ea)}.llm-close-btn[data-v-dd3230e5]{font-size:1.5rem;line-height:1}.llm-close-btn[data-v-dd3230e5]:hover{opacity:.7}.llm-manager-body[data-v-dd3230e5]{flex:1;overflow:hidden;min-height:0;display:flex;flex-direction:column}.llm-scrollable-content[data-v-dd3230e5]{flex:1;overflow-y:auto;padding:1.5rem;min-height:0}.llm-empty-keys[data-v-dd3230e5]{text-align:center;padding:2rem 1rem;color:var(--llm-text-dim, #9aa0a6)}.llm-empty-keys p[data-v-dd3230e5]{margin:0 0 .5rem;font-size:1rem;font-weight:500}.llm-empty-keys small[data-v-dd3230e5]{font-size:.9rem;opacity:.7}.llm-keys-list[data-v-dd3230e5]{margin-bottom:1rem}.llm-key-item[data-v-dd3230e5]{border:1px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-sm, 6px);margin-bottom:.75rem;background:var(--llm-bg-soft, #1f2228);overflow:hidden}.llm-key-header[data-v-dd3230e5]{display:flex;justify-content:space-between;align-items:flex-start;padding:.75rem}.llm-provider-info[data-v-dd3230e5]{flex:1;display:flex;flex-direction:column;gap:.5rem}.llm-provider-header[data-v-dd3230e5]{display:flex;justify-content:space-between;align-items:center}.llm-provider-name[data-v-dd3230e5]{font-weight:600;font-size:.9rem;color:var(--llm-text, #e6e8ea)}.llm-service-endpoint[data-v-dd3230e5]{margin-top:.25rem}.llm-service-endpoint small[data-v-dd3230e5]{color:var(--llm-text-dim, #9aa0a6);font-family:SF Mono,Monaco,Inconsolata,Roboto Mono,monospace;font-size:.75rem}.llm-provider-select[data-v-dd3230e5]{font-weight:600;font-size:.9rem;min-width:200px}.llm-key-input-row[data-v-dd3230e5]{display:flex;gap:.5rem;align-items:center}.llm-key-input-inline[data-v-dd3230e5]{flex:1;font-family:SF Mono,Monaco,Inconsolata,Roboto Mono,monospace;font-size:.8rem;padding:.4rem .6rem}.llm-stored-date[data-v-dd3230e5]{font-size:.75rem;color:var(--llm-text-dim, #9aa0a6)}.llm-manager-footer[data-v-dd3230e5]{display:flex;align-items:center;gap:.5rem;padding:1.5rem;border-top:1px solid var(--llm-border, #33383f);flex-shrink:0}.llm-footer-spacer[data-v-dd3230e5]{flex:1}.llm-btn[data-v-dd3230e5]{padding:.5rem 1rem;border-radius:var(--llm-radius-sm, 4px);border:1px solid var(--llm-border, #33383f);background:var(--llm-bg-soft, #1f2228);color:var(--llm-text, #e6e8ea);cursor:pointer;font-size:var(--llm-font-size-sm, .85rem);transition:all .15s ease}.llm-btn[data-v-dd3230e5]:hover:not(:disabled){border-color:var(--llm-border-hover, #4b525c);background:var(--llm-bg-mute, #242830)}.llm-btn--sm[data-v-dd3230e5]{padding:.25rem .5rem;font-size:var(--llm-font-size-xs, .75rem)}.llm-btn--secondary[data-v-dd3230e5]{background:var(--llm-bg-mute, #242830);border-color:var(--llm-accent, #6366f1);color:var(--llm-accent, #6366f1)}.llm-btn--ghost[data-v-dd3230e5]{background:transparent;border-color:transparent}.llm-btn--ghost[data-v-dd3230e5]:hover:not(:disabled){background:var(--llm-bg-mute, #242830)}.llm-btn--danger[data-v-dd3230e5]{background:var(--llm-error, #ef4444);border-color:var(--llm-error, #ef4444);color:#fff}.llm-form-control[data-v-dd3230e5]{width:100%;padding:.5rem .75rem;border:1px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-sm, 4px);background:var(--llm-bg, #181a1f);color:var(--llm-text, #e6e8ea);font-size:var(--llm-font-size-sm, .85rem)}.llm-form-control[data-v-dd3230e5]:focus{outline:none;border-color:var(--llm-accent, #6366f1)}@media(max-width:768px){.llm-manager-header[data-v-dd3230e5],.llm-manager-footer[data-v-dd3230e5],.llm-scrollable-content[data-v-dd3230e5]{padding:1rem}.llm-key-header[data-v-dd3230e5]{flex-direction:column;align-items:stretch;gap:1rem;padding:.75rem}.llm-key-input-row[data-v-dd3230e5]{flex-direction:column;align-items:stretch}.llm-provider-select[data-v-dd3230e5]{min-width:auto}}@media(max-width:480px){.llm-manager-header h3[data-v-dd3230e5]{font-size:1.1rem}}.llm-modal-overlay[data-v-0835d20f]{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000}.llm-modal[data-v-0835d20f]{background:var(--llm-bg, #181a1f);border:2px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-md, 8px);width:90%;max-width:700px;max-height:90%;position:relative;display:flex;flex-direction:column;color:var(--llm-text, #e6e8ea)}.llm-modal-header[data-v-0835d20f]{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--llm-border, #33383f);flex-shrink:0}.llm-modal-header h2[data-v-0835d20f]{margin:0;color:var(--llm-text, #e6e8ea);font-size:1.25rem}.llm-close-btn[data-v-0835d20f]{font-size:1.5rem;line-height:1}.llm-close-btn[data-v-0835d20f]:hover{opacity:.7}.llm-modal-body[data-v-0835d20f]{padding:1.5rem;flex:1;overflow-y:auto;min-height:0}.llm-btn[data-v-0835d20f]{padding:.5rem 1rem;border-radius:var(--llm-radius-sm, 4px);border:1px solid var(--llm-border, #33383f);background:var(--llm-bg-soft, #1f2228);color:var(--llm-text, #e6e8ea);cursor:pointer;font-size:var(--llm-font-size-sm, .85rem);transition:all .15s ease}.llm-btn[data-v-0835d20f]:hover:not(:disabled){border-color:var(--llm-border-hover, #4b525c);background:var(--llm-bg-mute, #242830)}.llm-btn[data-v-0835d20f]:disabled{opacity:.5;cursor:not-allowed}.llm-btn--sm[data-v-0835d20f]{padding:.25rem .5rem;font-size:var(--llm-font-size-xs, .75rem)}.llm-btn--primary[data-v-0835d20f]{background:var(--llm-accent, #6366f1);border-color:var(--llm-accent, #6366f1);color:var(--llm-bg, #181a1f)}.llm-btn--primary[data-v-0835d20f]:hover:not(:disabled){filter:brightness(1.1)}.llm-btn--secondary[data-v-0835d20f]{background:var(--llm-bg-mute, #242830);border-color:var(--llm-accent, #6366f1);color:var(--llm-accent, #6366f1)}.llm-btn--ghost[data-v-0835d20f]{background:transparent;border-color:transparent}.llm-btn--ghost[data-v-0835d20f]:hover:not(:disabled){background:var(--llm-bg-mute, #242830)}.llm-btn--danger[data-v-0835d20f]{background:var(--llm-error, #ef4444);border-color:var(--llm-error, #ef4444);color:#fff}.llm-btn--danger[data-v-0835d20f]:hover:not(:disabled){filter:brightness(1.1)}.llm-form-control[data-v-0835d20f]{width:100%;padding:.5rem .75rem;border:1px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-sm, 4px);background:var(--llm-bg, #181a1f);color:var(--llm-text, #e6e8ea);font-size:var(--llm-font-size-sm, .85rem)}.llm-form-control[data-v-0835d20f]:focus{outline:none;border-color:var(--llm-accent, #6366f1)}.llm-form-control[data-v-0835d20f]:disabled{opacity:.6;cursor:not-allowed}.llm-provider-list[data-v-0835d20f]{margin-bottom:2rem;padding-bottom:1.5rem}.llm-provider-list[data-v-0835d20f]:not(:last-child){border-bottom:1px solid var(--llm-border, #33383f)}.llm-provider-list h3[data-v-0835d20f]{margin:0 0 1rem;color:var(--llm-text, #e6e8ea);font-size:1rem}.llm-provider-item[data-v-0835d20f]{display:flex;justify-content:space-between;align-items:center;padding:1rem;border:1px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-sm, 4px);margin-bottom:.5rem;background:var(--llm-bg-soft, #1f2228);cursor:pointer;transition:all .15s ease;position:relative}.llm-provider-item[data-v-0835d20f]:hover{background:var(--llm-bg-mute, #242830);border-color:var(--llm-border-hover, #4b525c)}.llm-provider-item.active[data-v-0835d20f]{border-color:var(--llm-accent, #6366f1);background:var(--llm-bg, #181a1f);box-shadow:0 0 0 1px var(--llm-border, #33383f)}.llm-provider-item.disabled[data-v-0835d20f]{opacity:.6;cursor:not-allowed}.llm-provider-info[data-v-0835d20f]{flex:1}.llm-provider-name-row[data-v-0835d20f]{display:flex;align-items:center;margin-bottom:.25rem}.llm-provider-name[data-v-0835d20f]{font-weight:500;color:var(--llm-text, #e6e8ea);font-size:.95rem}.llm-active-badge[data-v-0835d20f],.llm-judge-badge[data-v-0835d20f]{position:absolute;top:-12px;background:var(--llm-accent, #6366f1);color:var(--llm-bg, #181a1f);font-size:.6rem;font-weight:700;padding:.2rem .5rem;border-radius:3px;text-transform:uppercase;letter-spacing:.5px;z-index:1}.llm-active-badge[data-v-0835d20f]{left:16px}.llm-judge-badge[data-v-0835d20f]{left:80px}.llm-disabled-badge[data-v-0835d20f]{background:var(--llm-border, #33383f);color:var(--llm-text, #e6e8ea);font-size:.65rem;font-weight:500;padding:.1rem .4rem;border-radius:2px;margin-left:.5rem;text-transform:uppercase}.llm-provider-details-row[data-v-0835d20f]{display:flex;align-items:center;gap:.75rem}.llm-test-status-btn[data-v-0835d20f]{background:none;border:1px solid var(--llm-border, #33383f);color:var(--llm-text, #e6e8ea);font-size:.7rem;font-weight:500;padding:.25rem .5rem;border-radius:3px;cursor:pointer;transition:all .15s ease;min-width:60px;text-align:center}.llm-test-status-btn.llm-test-default[data-v-0835d20f]:hover:not(:disabled){background:var(--llm-bg-mute, #242830);border-color:var(--llm-accent, #6366f1)}.llm-test-status-btn.llm-test-testing[data-v-0835d20f]{border-color:var(--llm-border-hover, #4b525c)}.llm-test-status-btn.llm-test-success[data-v-0835d20f]{border-color:var(--llm-success, #10b981);color:var(--llm-success, #10b981)}.llm-test-status-btn.llm-test-failed[data-v-0835d20f]{border-color:var(--llm-error, #ef4444);color:var(--llm-error, #ef4444)}.llm-provider-details[data-v-0835d20f]{font-size:.8rem;color:var(--llm-text-dim, #9aa0a6);flex:1}.llm-provider-actions[data-v-0835d20f]{display:flex;gap:.5rem;align-items:center}.llm-form-grid[data-v-0835d20f]{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center}.llm-field-label[data-v-0835d20f]{margin-bottom:0;white-space:nowrap;color:var(--llm-text, #e6e8ea);font-size:var(--llm-font-size-sm, .85rem)}.llm-api-key-field[data-v-0835d20f]{display:flex;flex-direction:column}.llm-api-key-input-row[data-v-0835d20f]{display:flex;gap:.5rem;align-items:stretch}.llm-api-key-input-row .llm-form-control[data-v-0835d20f]{flex:1}.llm-api-key-field .llm-security-note[data-v-0835d20f]{margin-top:.5rem}.llm-model-selector[data-v-0835d20f]{display:flex;gap:.5rem;align-items:stretch;flex-wrap:wrap}.llm-model-selector .llm-form-control[data-v-0835d20f]{flex:1}.llm-refresh-btn[data-v-0835d20f]{min-width:4rem;flex-shrink:0}.llm-model-error[data-v-0835d20f]{width:100%;font-size:.75rem;color:var(--llm-error, #ef4444)}.llm-thinking-toggle[data-v-0835d20f]{display:block;width:100%;margin-top:.5rem}.llm-temperature-field[data-v-0835d20f]{display:flex;flex-direction:column}.llm-field-note[data-v-0835d20f]{display:block;margin-top:.5rem;font-size:.75rem;color:var(--llm-text-dim, #9aa0a6);font-style:italic}.llm-checkbox-label[data-v-0835d20f]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-weight:500;color:var(--llm-text, #e6e8ea);font-size:var(--llm-font-size-sm, .85rem)}.llm-checkbox[data-v-0835d20f]{width:1rem;height:1rem;cursor:pointer}.llm-security-note[data-v-0835d20f]{display:block;font-size:.75rem;color:var(--llm-text-dim, #9aa0a6)}.llm-modal-footer[data-v-0835d20f]{display:flex;align-items:center;gap:.5rem;padding:1.5rem;border-top:1px solid var(--llm-border, #33383f);flex-shrink:0}.llm-footer-spacer[data-v-0835d20f]{flex:1}.llm-empty-state[data-v-0835d20f]{text-align:center;padding:2rem;color:var(--llm-text-dim, #9aa0a6)}.llm-empty-state p[data-v-0835d20f]{margin:.5rem 0;font-size:.9rem}.llm-keys-manager-overlay[data-v-0835d20f]{position:fixed;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:1001}.llm-keys-manager-content[data-v-0835d20f]{width:90%;max-width:600px;max-height:80vh;border:2px solid var(--llm-border, #33383f);border-radius:var(--llm-radius-md, 8px);overflow:hidden}.llm-test-result[data-v-0835d20f]{margin-top:1rem;padding:.75rem 1rem;border-radius:var(--llm-radius-sm, 4px);font-size:var(--llm-font-size-sm, .85rem)}.llm-test-result--success[data-v-0835d20f]{background:color-mix(in srgb,var(--llm-success, #10b981) 15%,transparent);border:1px solid var(--llm-success, #10b981);color:var(--llm-success, #10b981)}.llm-test-result--error[data-v-0835d20f]{background:color-mix(in srgb,var(--llm-error, #ef4444) 15%,transparent);border:1px solid var(--llm-error, #ef4444);color:var(--llm-error, #ef4444)}@media(max-width:768px){.llm-modal[data-v-0835d20f]{width:95%;margin:1rem}.llm-modal-body[data-v-0835d20f],.llm-modal-header[data-v-0835d20f],.llm-modal-footer[data-v-0835d20f]{padding:1rem}.llm-provider-item[data-v-0835d20f]{flex-direction:column;align-items:stretch;gap:.75rem;padding:.75rem}.llm-provider-actions[data-v-0835d20f]{width:100%;justify-content:flex-end}.llm-form-grid[data-v-0835d20f]{grid-template-columns:1fr;gap:.5rem}.llm-field-label[data-v-0835d20f]{padding-top:0;margin-top:.5rem}.llm-active-badge[data-v-0835d20f],.llm-judge-badge[data-v-0835d20f]{top:-8px;font-size:.55rem;padding:.15rem .4rem}.llm-judge-badge[data-v-0835d20f]{left:66px}}@media(max-width:480px){.llm-modal[data-v-0835d20f]{width:98%;margin:.5rem}.llm-modal-body[data-v-0835d20f],.llm-modal-header[data-v-0835d20f],.llm-modal-footer[data-v-0835d20f]{padding:.75rem}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anvaka/vue-llm",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Browser-only LLM client with provider adapters and Vue 3 components",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,8 +24,8 @@
24
24
  "default": "./dist/providers/index.js"
25
25
  },
26
26
  "./styles/variables.css": "./src/styles/variables.css",
27
- "./styles/components.css": "./src/styles/components.css"
28
-
27
+ "./styles/components.css": "./src/styles/components.css",
28
+ "./dist/vue-llm.css": "./dist/vue-llm.css"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "vue": ">=3.3.0"