codexmate 0.1.13 → 0.1.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codexmate",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Codex/Claude Code/OpenClaw 配置、会话与任务编排 CLI + Web 工具",
5
5
  "main": "cli.js",
6
6
  "bin": {
package/web-ui/app.js CHANGED
@@ -587,7 +587,11 @@ document.addEventListener('DOMContentLoaded', () => {
587
587
  return true;
588
588
  }
589
589
  })();
590
- void this.loadWebUiPreferences({ applyNavigation: applyPreferenceNavigation });
590
+ this.loadWebUiPreferences({ applyNavigation: applyPreferenceNavigation }).then(() => {
591
+ if (this.mainTab === 'prompts' && typeof this.loadPromptsTabContent === 'function') {
592
+ this.loadPromptsTabContent();
593
+ }
594
+ });
591
595
  }
592
596
  if (typeof this.t === 'function') {
593
597
  this.confirmDialogConfirmText = this.t('confirm.ok');
@@ -786,14 +790,7 @@ document.addEventListener('DOMContentLoaded', () => {
786
790
  return;
787
791
  }
788
792
  if (newTab === 'prompts') {
789
- if (this.promptsSubTab === 'claude-project' && !this.projectPathOptions.length && !this.projectPathOptionsLoading && typeof this.loadProjectPathOptions === 'function') {
790
- this.loadProjectPathOptions();
791
- }
792
- if (this.promptsSubTab === 'system') {
793
- if (typeof this.loadSystemPrompt === 'function') this.loadSystemPrompt();
794
- } else if (typeof this.loadPromptsContent === 'function') {
795
- this.loadPromptsContent();
796
- }
793
+ if (typeof this.loadPromptsTabContent === 'function') this.loadPromptsTabContent();
797
794
  }
798
795
  },
799
796
  promptsSubTab(newVal) {
@@ -805,11 +802,7 @@ document.addEventListener('DOMContentLoaded', () => {
805
802
  return;
806
803
  }
807
804
  if (this.mainTab === 'prompts') {
808
- if (this.promptsSubTab === 'system') {
809
- if (typeof this.loadSystemPrompt === 'function') this.loadSystemPrompt();
810
- } else if (typeof this.loadPromptsContent === 'function') {
811
- this.loadPromptsContent();
812
- }
805
+ if (typeof this.loadPromptsTabContent === 'function') this.loadPromptsTabContent();
813
806
  }
814
807
  },
815
808
  projectClaudeMdPath(newPath) {
@@ -980,17 +980,28 @@ export function createAgentsMethods(options = {}) {
980
980
  this.loadProjectPathOptions();
981
981
  }
982
982
  if (this.promptsSubTab === normalized) {
983
- if (normalized === 'system') this.loadSystemPrompt();
984
- else this.loadPromptsContent();
983
+ if (typeof this.loadPromptsTabContent === 'function') this.loadPromptsTabContent();
985
984
  return;
986
985
  }
986
+ this.__skipNextPromptsSubTabLoad = true;
987
987
  this.promptsSubTab = normalized;
988
- if (normalized === 'system') this.loadSystemPrompt();
988
+ if (typeof this.loadPromptsTabContent === 'function') this.loadPromptsTabContent();
989
989
  this.$nextTick(() => {
990
990
  document.querySelector('.main-panel')?.scrollTo({ top: 0, left: 0, behavior: 'auto' });
991
991
  });
992
992
  },
993
993
 
994
+ loadPromptsTabContent() {
995
+ if (this.promptsSubTab === 'system') {
996
+ if (typeof this.loadSystemPrompt === 'function') this.loadSystemPrompt();
997
+ } else {
998
+ if (this.promptsSubTab === 'claude-project' && !this.projectPathOptions.length && !this.projectPathOptionsLoading && typeof this.loadProjectPathOptions === 'function') {
999
+ this.loadProjectPathOptions();
1000
+ }
1001
+ if (typeof this.loadPromptsContent === 'function') this.loadPromptsContent();
1002
+ }
1003
+ },
1004
+
994
1005
  async loadPromptsContent() {
995
1006
  const requestToken = issueLatestRequestToken(this, '_agentsOpenRequestToken');
996
1007
  this.agentsLoading = true;
@@ -122,6 +122,8 @@ export function createPiConfigMethods({ api: apiClient }) {
122
122
  const providerId = this.derivePiProviderId(baseUrl);
123
123
  const modelId = (this.addingPiProviderModel || '').trim();
124
124
  const values = {
125
+ id: providerId,
126
+ name: providerId,
125
127
  baseUrl,
126
128
  api: this.addingPiProviderApi || 'openai-completions',
127
129
  apiKey: (this.addingPiProviderApiKey || '').trim(),
@@ -151,18 +153,12 @@ export function createPiConfigMethods({ api: apiClient }) {
151
153
  }
152
154
  },
153
155
  derivePiProviderId(baseUrl) {
154
- let base = '';
155
- try {
156
- base = new URL(baseUrl).hostname.replace(/^www\./, '');
157
- } catch (_) {
158
- base = '';
159
- }
160
- const candidate = (base || 'pi-provider').replace(/[^a-zA-Z0-9-]/g, '-')
161
- .replace(/-+/g, '-').replace(/^-|-$/g, '') || 'pi-provider';
162
- if (!this.piProviders[candidate]) return candidate;
163
- let suffix = 2;
164
- while (this.piProviders[`${candidate}-${suffix}`]) suffix += 1;
165
- return `${candidate}-${suffix}`;
156
+ let candidate = String(Date.now());
157
+ while (this.piProviders[candidate]) candidate = String(Number(candidate) + 1);
158
+ return candidate;
159
+ },
160
+ piProviderUrlTitle() {
161
+ return '';
166
162
  },
167
163
  startAddPiProvider() {
168
164
  if (!this.isToolConfigWriteAllowed('pi') || this.piSaving) return;
@@ -346,20 +342,7 @@ export function createPiConfigMethods({ api: apiClient }) {
346
342
  this.messageType = 'success';
347
343
  },
348
344
  piProviderName(providerId) {
349
- const provider = this.piProviders[providerId] || {};
350
- if (provider.title || provider.name) return provider.title || provider.name;
351
- const urlTitle = this.piProviderUrlTitle(provider);
352
- return urlTitle || providerId;
353
- },
354
- piProviderUrlTitle(provider) {
355
- const baseUrl = provider && provider.baseUrl ? String(provider.baseUrl) : '';
356
- if (!baseUrl) return '';
357
- try {
358
- const hostname = new URL(baseUrl).hostname;
359
- return hostname.replace(/^www\./, '');
360
- } catch (e) {
361
- return '';
362
- }
345
+ return String(providerId || '');
363
346
  },
364
347
  piProviderSummary(providerId) {
365
348
  const provider = this.piProviders[providerId] || {};
@@ -1,4 +1,4 @@
1
- export const PROVIDER_CONFIG_MODE_META = Object.freeze({
1
+ export const PROVIDER_CONFIG_MODE_META = Object.freeze({
2
2
  codex: Object.freeze({
3
3
  label: 'Codex',
4
4
  modelPlaceholder: '例如: gpt-5.3-codex',
@@ -148,4 +148,4 @@ export function createConfigModeComputed() {
148
148
  return '未选择';
149
149
  }
150
150
  };
151
- }
151
+ }
@@ -1,4 +1,4 @@
1
- <div id="app" class="container" v-cloak>
1
+ <div id="app" class="container" v-cloak>
2
2
  <div v-if="!sessionStandalone" class="mobile-brand-bar">
3
3
  <div class="mobile-brand-title">Codex Mate<span v-if="appVersion" class="brand-version"> v{{ appVersion }}</span></div>
4
4
  <button
@@ -569,4 +569,4 @@
569
569
  </div>
570
570
 
571
571
  <!-- 内容包裹器 - 稳定布局 -->
572
- <div class="content-wrapper">
572
+ <div class="content-wrapper">
@@ -168,4 +168,4 @@
168
168
  </div>
169
169
  </div>
170
170
  </div>
171
- </div>
171
+ </div>