mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
Refactor execution modes and CLI integration across agents
- Updated code-developer, tdd-developer, and test-fix-agent to streamline execution modes based on task.meta.execution_config.method. - Removed legacy command handling and introduced CLI handoff for 'cli' execution method. - Enhanced buildCliHandoffPrompt to include task JSON path and improved context handling. - Updated task-generate-agent and task-generate-tdd to reflect new execution method mappings and removed command field from implementation_approach. - Improved CLI settings validation in CliSettingsModal with format and length checks. - Added localization for new CLI settings messages in English and Chinese. - Enhanced GPU selector to use localized strings for GPU types. - Introduced TypeScript LSP setup documentation for better user guidance.
This commit is contained in:
@@ -116,6 +116,16 @@ export function CliSettingsModal({ open, onClose, cliSettings }: CliSettingsModa
|
||||
|
||||
if (!name.trim()) {
|
||||
newErrors.name = formatMessage({ id: 'apiSettings.validation.nameRequired' });
|
||||
} else {
|
||||
// Validate name format: must start with letter, followed by letters/numbers/hyphens/underscores
|
||||
const namePattern = /^[a-zA-Z][a-zA-Z0-9_-]*$/;
|
||||
if (!namePattern.test(name.trim())) {
|
||||
newErrors.name = formatMessage({ id: 'apiSettings.cliSettings.nameFormatHint' });
|
||||
}
|
||||
// Validate name length
|
||||
if (name.trim().length > 32) {
|
||||
newErrors.name = formatMessage({ id: 'apiSettings.cliSettings.nameTooLong' }, { max: 32 });
|
||||
}
|
||||
}
|
||||
|
||||
if (mode === 'provider-based') {
|
||||
@@ -219,7 +229,11 @@ export function CliSettingsModal({ open, onClose, cliSettings }: CliSettingsModa
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
placeholder={formatMessage({ id: 'apiSettings.cliSettings.namePlaceholder' })}
|
||||
className={errors.name ? 'border-destructive' : ''}
|
||||
maxLength={32}
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{formatMessage({ id: 'apiSettings.cliSettings.nameFormatHint' })}
|
||||
</p>
|
||||
{errors.name && <p className="text-sm text-destructive">{errors.name}</p>}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ function DeviceCard({ device, isSelected, onSelect, isSelecting }: DeviceCardPro
|
||||
)}
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{formatMessage({ id: 'codexlens.gpu.type' })}: {device.type === 'discrete' ? '独立显卡' : '集成显卡'}
|
||||
{formatMessage({ id: 'codexlens.gpu.type' })}: {formatMessage({ id: device.type === 'discrete' ? 'codexlens.gpu.discrete' : 'codexlens.gpu.integrated' })}
|
||||
</p>
|
||||
{device.memory?.total && (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
|
||||
@@ -289,6 +289,8 @@
|
||||
"descriptionPlaceholder": "Optional description for this configuration",
|
||||
"selectProvider": "Select a provider",
|
||||
"includeCoAuthoredBy": "Include co-authored-by in commits",
|
||||
"nameFormatHint": "Letters, numbers, hyphens, underscores only. Used as: ccw cli --tool [name]",
|
||||
"nameTooLong": "Name must be {max} characters or less",
|
||||
"validation": {
|
||||
"providerRequired": "Please select a provider",
|
||||
"authOrBaseUrlRequired": "Please enter auth token or base URL"
|
||||
|
||||
@@ -142,6 +142,8 @@
|
||||
"notAvailable": "GPU functionality not available",
|
||||
"unknownDevice": "Unknown device",
|
||||
"type": "Type",
|
||||
"discrete": "Discrete GPU",
|
||||
"integrated": "Integrated GPU",
|
||||
"driver": "Driver Version",
|
||||
"memory": "Memory"
|
||||
},
|
||||
|
||||
@@ -289,6 +289,8 @@
|
||||
"descriptionPlaceholder": "此配置的可选描述",
|
||||
"selectProvider": "选择提供商",
|
||||
"includeCoAuthoredBy": "在提交中包含 co-authored-by",
|
||||
"nameFormatHint": "仅限字母、数字、连字符和下划线。用作:ccw cli --tool [名称]",
|
||||
"nameTooLong": "名称必须在 {max} 个字符以内",
|
||||
"validation": {
|
||||
"providerRequired": "请选择提供商",
|
||||
"authOrBaseUrlRequired": "请输入认证令牌或基础 URL"
|
||||
|
||||
@@ -142,6 +142,8 @@
|
||||
"notAvailable": "GPU 功能不可用",
|
||||
"unknownDevice": "未知设备",
|
||||
"type": "类型",
|
||||
"discrete": "独立显卡",
|
||||
"integrated": "集成显卡",
|
||||
"driver": "驱动版本",
|
||||
"memory": "显存"
|
||||
},
|
||||
|
||||
@@ -446,9 +446,9 @@ export function SettingsPage() {
|
||||
{/* System Theme Toggle (Backward Compatibility) */}
|
||||
<div className="flex items-center justify-between pt-4 border-t border-border">
|
||||
<div>
|
||||
<p className="font-medium text-foreground">系统跟随</p>
|
||||
<p className="font-medium text-foreground">{formatMessage({ id: 'settings.appearance.systemFollow' })}</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
使用系统的深色/浅色模式设置
|
||||
{formatMessage({ id: 'settings.appearance.systemFollowDesc' })}
|
||||
</p>
|
||||
</div>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user