mirror of
https://github.com/nexu-io/open-design.git
synced 2026-07-07 23:09:34 +08:00
fix(toolbar): CLI selector in chat footer, settings gear in header, drop dropdown settings
按同事要求:CLI/agent 选择器移回 chat 底部、header 放设置 gear、删 AvatarMenu 下拉里的设置项、去掉项目说明 sliders。
This commit is contained in:
@@ -475,20 +475,6 @@ export function AvatarMenu({
|
||||
|
||||
<div style={{ height: 1, background: 'var(--border-soft)', margin: '4px 6px' }} />
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className="avatar-item"
|
||||
onClick={() => {
|
||||
setOpen(false);
|
||||
onOpenSettings();
|
||||
}}
|
||||
>
|
||||
<span className="avatar-item-icon" aria-hidden>
|
||||
<RemixIcon name="settings-line" size={15} />
|
||||
</span>
|
||||
<span>{t('avatar.settings')}</span>
|
||||
<span className="avatar-item-meta">{isMacPlatform() ? '⌘,' : 'Ctrl+,'}</span>
|
||||
</button>
|
||||
|
||||
{onBack ? (
|
||||
<>
|
||||
|
||||
@@ -4274,6 +4274,25 @@ export function ProjectView({
|
||||
const hasProjectInstructions = projectInstructions.length > 0;
|
||||
const projectInstructionsPreview = compactInlinePreview(projectInstructions);
|
||||
|
||||
// CLI / agent selector lives below the chat conversation (composer footer),
|
||||
// not in the top-right header.
|
||||
const executionControls = (
|
||||
<AvatarMenu
|
||||
config={config}
|
||||
agents={agents}
|
||||
daemonLive={daemonLive}
|
||||
onModeChange={onModeChange}
|
||||
onAgentChange={onAgentChange}
|
||||
onAgentModelChange={onAgentModelChange}
|
||||
onApiModelChange={onApiModelChange}
|
||||
providerModelsCache={providerModelsCache}
|
||||
onOpenSettings={onOpenSettings}
|
||||
onRefreshAgents={onRefreshAgents}
|
||||
onBack={onBack}
|
||||
placement="up"
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="app">
|
||||
<CritiqueTheaterMount
|
||||
@@ -4285,43 +4304,24 @@ export function ProjectView({
|
||||
onBack={onBack}
|
||||
backLabel={t('project.backToProjects')}
|
||||
fileActionsBefore={(
|
||||
<div
|
||||
className="app-chrome-file-actions-before workspace-tabs-file-actions"
|
||||
data-app-chrome-file-actions="true"
|
||||
/>
|
||||
)}
|
||||
actions={(
|
||||
<>
|
||||
<HandoffButton projectId={project.id} />
|
||||
<button
|
||||
type="button"
|
||||
className="settings-icon-btn"
|
||||
data-testid="project-settings-trigger"
|
||||
title={t('project.customInstructions')}
|
||||
aria-label={t('project.customInstructions')}
|
||||
aria-expanded={instructionsMode !== 'closed'}
|
||||
onClick={() => {
|
||||
setInstructionsDraft(project.customInstructions ?? '');
|
||||
setInstructionsMode(hasProjectInstructions ? 'review' : 'edit');
|
||||
}}
|
||||
onClick={() => onOpenSettings('execution')}
|
||||
title={t('chat.cliSettingsTitle')}
|
||||
aria-label={t('chat.cliSettingsAria')}
|
||||
>
|
||||
<Icon name="sliders" size={16} />
|
||||
<Icon name="settings" size={16} />
|
||||
</button>
|
||||
<HandoffButton projectId={project.id} />
|
||||
<AvatarMenu
|
||||
config={config}
|
||||
agents={agents}
|
||||
daemonLive={daemonLive}
|
||||
onModeChange={onModeChange}
|
||||
onAgentChange={onAgentChange}
|
||||
onAgentModelChange={onAgentModelChange}
|
||||
onApiModelChange={onApiModelChange}
|
||||
providerModelsCache={providerModelsCache}
|
||||
onOpenSettings={onOpenSettings}
|
||||
onRefreshAgents={onRefreshAgents}
|
||||
onBack={onBack}
|
||||
<div
|
||||
className="app-chrome-file-actions-before workspace-tabs-file-actions"
|
||||
data-app-chrome-file-actions="true"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
actions={null}
|
||||
>
|
||||
<div className="app-project-title">
|
||||
<span className="app-project-title-line">
|
||||
@@ -4527,6 +4527,7 @@ export function ProjectView({
|
||||
onProjectChange({ ...project, skillId });
|
||||
}}
|
||||
activePluginSnapshot={activePluginSnapshot}
|
||||
composerFooterAccessory={executionControls}
|
||||
currentDesignSystemId={project.designSystemId}
|
||||
onActiveDesignSystemChange={(updatedProject) => {
|
||||
onProjectChange(updatedProject);
|
||||
|
||||
Reference in New Issue
Block a user