mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
feat: enhance CLI discussion agent and multi-CLI planning with JSON string support; improve error handling and internationalization
This commit is contained in:
@@ -746,8 +746,7 @@
|
||||
}
|
||||
|
||||
.file-browser-loading,
|
||||
.file-browser-empty,
|
||||
.file-browser-error {
|
||||
.file-browser-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -758,9 +757,28 @@
|
||||
}
|
||||
|
||||
.file-browser-error {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
min-height: 200px;
|
||||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.file-browser-error p {
|
||||
margin: 0;
|
||||
color: hsl(var(--destructive));
|
||||
}
|
||||
|
||||
.file-browser-hint {
|
||||
color: hsl(var(--muted-foreground));
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.file-browser-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -278,6 +278,8 @@ const i18n = {
|
||||
'cli.fileBrowserUp': 'Parent Directory',
|
||||
'cli.fileBrowserHome': 'Home',
|
||||
'cli.fileBrowserShowHidden': 'Show hidden files',
|
||||
'cli.fileBrowserApiError': 'Server restart required to enable file browser',
|
||||
'cli.fileBrowserManualHint': 'Type the full path above and click Select (e.g., C:\\Users\\name\\.gemini)',
|
||||
|
||||
// CodexLens Configuration
|
||||
'codexlens.config': 'CodexLens Configuration',
|
||||
@@ -2517,6 +2519,8 @@ const i18n = {
|
||||
'cli.fileBrowserUp': '上级目录',
|
||||
'cli.fileBrowserHome': '主目录',
|
||||
'cli.fileBrowserShowHidden': '显示隐藏文件',
|
||||
'cli.fileBrowserApiError': '需要重启服务器以启用文件浏览器',
|
||||
'cli.fileBrowserManualHint': '请在上方输入完整路径后点击选择(如 C:\\Users\\用户名\\.gemini)',
|
||||
|
||||
// CodexLens 配置
|
||||
'codexlens.config': 'CodexLens 配置',
|
||||
|
||||
@@ -659,7 +659,17 @@ async function loadFileBrowserDirectory(path) {
|
||||
} catch (err) {
|
||||
console.error('Failed to load directory:', err);
|
||||
if (listContainer) {
|
||||
listContainer.innerHTML = '<div class="file-browser-error">Failed to load directory</div>';
|
||||
listContainer.innerHTML = '<div class="file-browser-error">' +
|
||||
'<p>' + t('cli.fileBrowserApiError') + '</p>' +
|
||||
'<p class="file-browser-hint">' + t('cli.fileBrowserManualHint') + '</p>' +
|
||||
'</div>';
|
||||
}
|
||||
// Enable manual path entry mode - enable select button when path is typed
|
||||
var selectBtn = document.getElementById('fileBrowserSelectBtn');
|
||||
var pathInput = document.getElementById('fileBrowserPathInput');
|
||||
if (selectBtn && pathInput) {
|
||||
selectBtn.disabled = false;
|
||||
pathInput.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -744,8 +754,17 @@ function initFileBrowserEvents() {
|
||||
var selectBtn = document.getElementById('fileBrowserSelectBtn');
|
||||
if (selectBtn) {
|
||||
selectBtn.onclick = function() {
|
||||
// First try selected path from list, then fall back to path input
|
||||
var path = selectBtn.getAttribute('data-selected-path');
|
||||
closeFileBrowserModal(path);
|
||||
if (!path) {
|
||||
var pathInput = document.getElementById('fileBrowserPathInput');
|
||||
if (pathInput && pathInput.value.trim()) {
|
||||
path = pathInput.value.trim();
|
||||
}
|
||||
}
|
||||
if (path) {
|
||||
closeFileBrowserModal(path);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user