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 +1 -1
- package/web-ui/app.js +7 -14
- package/web-ui/modules/app.methods.agents.mjs +14 -3
- package/web-ui/modules/app.methods.pi-config.mjs +9 -26
- package/web-ui/modules/config-mode.computed.mjs +2 -2
- package/web-ui/partials/index/layout-header.html +2 -2
- package/web-ui/partials/index/panel-config-pi.html +1 -1
package/package.json
CHANGED
package/web-ui/app.js
CHANGED
|
@@ -587,7 +587,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
587
587
|
return true;
|
|
588
588
|
}
|
|
589
589
|
})();
|
|
590
|
-
|
|
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 (
|
|
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.
|
|
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 (
|
|
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 (
|
|
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
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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">
|