mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +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">
|
||||
|
||||
Reference in New Issue
Block a user