@yesdgq/claude-buddy 1.1.2000 → 1.1.3010

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.
@@ -52,7 +52,11 @@
52
52
  :class="['cli-btn', { 'cli-btn-active': currentCli === cli.name }]"
53
53
  @click="selectCli(cli.name)"
54
54
  >
55
- <img :src="cli.icon" :alt="cli.name" class="cli-icon">
55
+ <img
56
+ :src="cli.icon"
57
+ :alt="cli.name"
58
+ :class="['cli-icon', { 'cli-icon-workbuddy': cli.name === 'WorkBuddy' }]"
59
+ >
56
60
  <span>{{ cli.label }}</span>
57
61
  </button>
58
62
  </div>
@@ -122,10 +126,10 @@
122
126
  </div>
123
127
  </div>
124
128
  </transition>
125
- </div>
126
-
127
- <!-- 版本更新提示 -->
128
- <div :class="['update-banner', { 'is-visible': updateInfo.visible }]" v-if="updateInfo.hasUpdate">
129
+ </div>
130
+
131
+ <!-- 版本更新提示 -->
132
+ <div :class="['update-banner', { 'is-visible': updateInfo.visible }]" v-if="updateInfo.hasUpdate">
129
133
  <i class="fa fa-bell update-icon"></i>
130
134
  <span class="update-text">
131
135
  {{ t.updateAvailable }}
@@ -136,10 +140,25 @@
136
140
  <span class="update-cmd" :title="t.clickToCopy" @click="copyUpdateCmd">npm i -g @yesdgq/claude-buddy@latest</span>
137
141
  <button class="update-close" @click="dismissUpdate" :title="t.dismiss">
138
142
  <i class="fa fa-times"></i>
139
- </button>
140
- </div>
141
-
142
- <!-- 加载状态 -->
143
+ </button>
144
+ </div>
145
+
146
+ <div class="config-file-list">
147
+ <button
148
+ v-for="fileItem in currentConfigFileItems"
149
+ :key="fileItem.key"
150
+ type="button"
151
+ class="config-file-item"
152
+ :title="t.openConfigFile"
153
+ @click="openConfigFile(fileItem)"
154
+ >
155
+ <span class="config-file-label">{{ t.configFileLabel }}</span>
156
+ <code>{{ fileItem.path }}</code>
157
+ <i class="fa fa-external-link"></i>
158
+ </button>
159
+ </div>
160
+
161
+ <!-- 加载状态 -->
143
162
  <div v-if="loading" class="loading-container">
144
163
  <i class="fa fa-spinner fa-spin"></i>
145
164
  <p>{{ funLoadingMessage }}</p>
@@ -149,7 +168,7 @@
149
168
  <!-- AUTH 配置列表 -->
150
169
  <div v-if="!loading" :class="{ 'auth-list-ready': authListReady }">
151
170
  <div v-for="(auth, index) in config.AUTH" :key="authKeys[index] || index"
152
- :class="['auth-card', getDragShiftClass(index), { 'auth-card-current': index === config.activeIndex, 'auth-card-dragging': draggingIndex === index, 'auth-card-drag-over': dragOverIndex === index }]"
171
+ :class="['auth-card', getDragShiftClass(index), { 'workbuddy-auth-card': currentCli === 'WorkBuddy', 'auth-card-current': currentCli !== 'WorkBuddy' && index === config.activeIndex, 'auth-card-dragging': draggingIndex === index, 'auth-card-drag-over': dragOverIndex === index }]"
153
172
  :style="getDragShiftStyle(index)"
154
173
  @dragover="handleDragOver(index, $event)"
155
174
  @dragleave="handleDragLeave($event)"
@@ -172,7 +191,7 @@
172
191
  @input="adjustInputWidth($event, index)"
173
192
  :ref="'nameInput' + index"
174
193
  >
175
- <span v-if="index === config.activeIndex" class="current-use-label">
194
+ <span v-if="currentCli !== 'WorkBuddy' && index === config.activeIndex" class="current-use-label">
176
195
  <span class="particle p1"></span>
177
196
  <span class="particle p2"></span>
178
197
  <span class="particle p3"></span>
@@ -184,8 +203,8 @@
184
203
  </div>
185
204
  <div class="actions">
186
205
  <!-- 启用按钮 (非当前使用的配置显示) -->
187
- <button
188
- v-if="index !== config.activeIndex"
206
+ <button
207
+ v-if="currentCli !== 'WorkBuddy' && index !== config.activeIndex"
189
208
  @click="setAsActive(index)"
190
209
  :disabled="config.AUTH.length === 1 && isEmptyConfig(auth)"
191
210
  class="btn-activate"
@@ -244,29 +263,32 @@
244
263
  </div>
245
264
  </div>
246
265
 
247
- <div v-if="currentCli === 'Codex'" class="codex-env-section">
266
+ <div
267
+ v-if="currentCli === 'Codex' || currentCli === 'WorkBuddy'"
268
+ :class="currentCli === 'WorkBuddy' ? 'workbuddy-env-section' : 'codex-env-section'"
269
+ >
248
270
  <div class="default-model-header">
249
271
  <label>
250
272
  <i class="fa fa-cubes"></i>
251
- {{ t.envVariables }}
273
+ {{ currentCli === 'WorkBuddy' ? t.workbuddyModelSectionTitle : t.modelManagement }}
252
274
  </label>
253
275
  </div>
254
276
  <div class="default-model-row">
255
277
  <label class="default-model-inline-label">
256
- {{ t.defaultModelTitle }}
278
+ {{ currentCli === 'WorkBuddy' ? t.workbuddyModelName : t.defaultModelTitle }}
257
279
  </label>
258
280
  <div class="default-model-input-wrap">
259
281
  <input
260
282
  v-model="auth.DEFAULT_MODEL"
261
283
  type="text"
262
- :placeholder="t.defaultModelPlaceholder"
284
+ :placeholder="currentCli === 'WorkBuddy' ? t.workbuddyModelPlaceholder : t.defaultModelPlaceholder"
263
285
  >
264
286
  </div>
265
287
  </div>
266
288
  </div>
267
289
 
268
290
  <!-- 模型管理 -->
269
- <div v-if="currentCli !== 'Codex'" class="models-section" :class="{ 'is-expanded': showModelSections[index] }">
291
+ <div v-if="currentCli !== 'Codex' && currentCli !== 'WorkBuddy'" class="models-section" :class="{ 'is-expanded': showModelSections[index] }">
270
292
  <div class="models-header">
271
293
  <label>
272
294
  <i class="fa fa-cogs"></i>
@@ -312,8 +334,8 @@
312
334
  </div>
313
335
  </div>
314
336
 
315
- <!-- 环境变量配置 -->
316
- <div v-if="currentCli !== 'Codex'" class="env-section" :class="{ 'is-expanded': showEnvSections[index] }">
337
+ <!-- 环境变量配置 -->
338
+ <div class="env-section" :class="{ 'is-expanded': showEnvSections[index] }">
317
339
  <div class="env-header">
318
340
  <label>
319
341
  <i class="fa fa-cogs"></i>
@@ -326,31 +348,23 @@
326
348
  <i :class="showEnvSections[index] ? 'fa fa-chevron-up' : 'fa fa-chevron-down'"></i>
327
349
  {{ showEnvSections[index] ? t.collapse : t.expand }}
328
350
  </button>
329
- </div>
330
-
331
- <div v-if="showEnvSections[index]" class="env-list">
332
- <div v-for="(env, envIndex) in auth.ENV" :key="envIndex" class="env-item">
333
- <input
334
- v-model="env.key"
335
- type="text"
336
- :placeholder="t.variableNamePlaceholder"
337
- >
338
- <span class="separator">=</span>
339
- <input
340
- v-model="env.value"
341
- type="text"
342
- :placeholder="t.variableValuePlaceholder"
343
- >
344
- <button
345
- @click="deleteEnv(index, envIndex)"
346
- :title="t.deleteThisEnvVar"
347
- >
348
- <i class="fa fa-times"></i>
349
- </button>
350
- </div>
351
-
352
- <button
353
- @click="addEnv(index)"
351
+ </div>
352
+
353
+ <div v-if="showEnvSections[index]" class="env-list">
354
+ <env-node-editor
355
+ v-for="(env, envIndex) in auth.ENV"
356
+ :key="env.id"
357
+ :node="env"
358
+ :index="envIndex"
359
+ :depth="0"
360
+ :labels="t"
361
+ :can-delete="true"
362
+ :confirm-delete="confirmDeleteEnvNode"
363
+ @delete-node="deleteEnv(index, envIndex, $event)"
364
+ ></env-node-editor>
365
+
366
+ <button
367
+ @click="addEnv(index)"
354
368
  class="btn-add-env"
355
369
  >
356
370
  <i class="fa fa-plus"></i>