Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,6 @@
gap: $size-gap-2;
}

&__label-with-tooltip {
display: inline-flex;
align-items: center;
gap: $size-gap-1;
min-width: 0;
}

&__label-tooltip-icon {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--bf-appearance-token-color-text-muted);
cursor: help;
}

&__label-tooltip-icon:hover {
color: var(--bf-appearance-token-color-text-secondary);
}

&__inline-label {
display: inline-flex;
align-items: center;
gap: $size-gap-1;
min-width: 0;
}

&__inline-info {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--bf-appearance-token-color-text-muted);
cursor: help;
flex-shrink: 0;
}

&__inline-info:hover {
color: var(--bf-appearance-token-color-text-secondary);
}

&__policy-tooltip {
max-width: min(320px, calc(100vw - 32px));
display: grid;
gap: 4px;
line-height: var(--bf-appearance-token-line-height-relaxed);
}

&__policy-tooltip strong {
color: var(--bf-appearance-token-color-text-primary);
font-weight: var(--bf-appearance-token-font-weight-medium);
}

&__policy-tooltip strong:not(:first-child) {
margin-top: 4px;
}

/** Computer use: authorized status label (Granted / 已授权) */
&__perm-status--granted {
color: var(--bf-appearance-token-color-text-muted);
Expand Down
65 changes: 20 additions & 45 deletions src/web-ui/src/infrastructure/config/components/SessionConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
ConfigPageLoading,
Modal,
Select,
Tooltip,
confirmDanger,
type SelectOption,
} from '@/component-library';
Expand Down Expand Up @@ -487,34 +486,15 @@ const SessionSettingsPanels: React.FC<SessionSettingsPanelsProps> = ({ variant }
{
value: 'safe_only',
label: tTools('config.subagentBatchPolicy.safeOnly'),
description: tTools('config.subagentBatchPolicy.safeOnlyDesc'),
},
{
value: 'force_parallel',
label: tTools('config.subagentBatchPolicy.forceParallel'),
description: tTools('config.subagentBatchPolicy.forceParallelDesc'),
},
];

const subagentBatchPolicyLabel = (
<span className="bitfun-func-agent-config__label-with-tooltip">
<span>{tTools('config.subagentBatchPolicy.label')}</span>
<Tooltip
content={
<span className="bitfun-func-agent-config__policy-tooltip">
<strong>{tTools('config.subagentBatchPolicy.safeOnly')}</strong>
<span>{tTools('config.subagentBatchPolicy.safeOnlyDesc')}</span>
<strong>{tTools('config.subagentBatchPolicy.forceParallel')}</strong>
<span>{tTools('config.subagentBatchPolicy.forceParallelDesc')}</span>
</span>
}
placement="top"
>
<span className="bitfun-func-agent-config__label-tooltip-icon" aria-label={tTools('config.subagentBatchPolicy.tooltipLabel')}>
<Info size={14} />
</span>
</Tooltip>
</span>
);

const selectedCompanionPetPackage = settings?.agent_companion_pet
? companionPets.find(pet => pet.packagePath === settings.agent_companion_pet?.packagePath) ?? null
: null;
Expand Down Expand Up @@ -920,6 +900,15 @@ const SessionSettingsPanels: React.FC<SessionSettingsPanelsProps> = ({ variant }
const computerUseScreenLabel = computerUseStatusLoading
? t('loading.text')
: computerUseScreen ? t('computerUse.granted') : t('computerUse.notGranted');
const computerUsePlatformMessage = computerUsePlatformNote
? platform === 'macos'
? t('computerUse.platformNotes.macos')
: platform === 'windows'
? t('computerUse.platformNotes.windows')
: platform === 'linux'
? t('computerUse.platformNotes.linux')
: t('computerUse.platformNotes.generic')
: null;
// A ready browser is not a failure state: BitFun attaches to it the moment
// something needs it, so say that rather than the bare "not connected".
const browserStatusLabel = browserCdpAvailable
Expand Down Expand Up @@ -1254,21 +1243,7 @@ const SessionSettingsPanels: React.FC<SessionSettingsPanelsProps> = ({ variant }
description={t('toolExecution.sectionDescription')}
>
<ConfigPageRow
label={(
<span className="bitfun-func-agent-config__inline-label">
<span>{tTools('config.executionTimeout')}</span>
<Tooltip content={tTools('config.executionTimeoutHint')} placement="top">
<span
className="bitfun-func-agent-config__inline-info"
role="button"
tabIndex={0}
aria-label={tTools('config.executionTimeoutHint')}
>
<Info size={14} />
</span>
</Tooltip>
</span>
)}
label={tTools('config.executionTimeout')}
description={tTools('config.executionTimeoutDesc')}
align="center"
>
Expand All @@ -1285,7 +1260,11 @@ const SessionSettingsPanels: React.FC<SessionSettingsPanelsProps> = ({ variant }
/>
</div>
</ConfigPageRow>
<ConfigPageRow label={subagentBatchPolicyLabel} description={tTools('config.subagentBatchPolicy.desc')} align="center">
<ConfigPageRow
label={tTools('config.subagentBatchPolicy.label')}
description={tTools('config.subagentBatchPolicy.desc')}
align="center"
>
<div className="bitfun-func-agent-config__row-control" data-bf-component="session-config" data-bf-part="control">
<Select
value={subagentBatchExecutionPolicy}
Expand All @@ -1297,11 +1276,7 @@ const SessionSettingsPanels: React.FC<SessionSettingsPanelsProps> = ({ variant }
</div>
</ConfigPageRow>
<ConfigPageRow
label={(
<span className="bitfun-func-agent-config__inline-label">
<span>{tTools('config.subagentMaxConcurrency')}</span>
</span>
)}
label={tTools('config.subagentMaxConcurrency')}
description={tTools('config.subagentMaxConcurrencyDesc')}
align="center"
>
Expand Down Expand Up @@ -1454,7 +1429,7 @@ const SessionSettingsPanels: React.FC<SessionSettingsPanelsProps> = ({ variant }
)}
</div>
</ConfigPageRow>
{computerUsePlatformNote && (
{computerUsePlatformMessage && (
<div
className="bitfun-func-agent-config__platform-note"
data-bf-component="session-config"
Expand All @@ -1469,7 +1444,7 @@ const SessionSettingsPanels: React.FC<SessionSettingsPanelsProps> = ({ variant }
<Info size={14} style={{ flexShrink: 0, marginTop: 2, opacity: 0.7 }} />
<p className="bitfun-config-page-row__description" style={{ margin: 0 }}>
<strong>{t('computerUse.platformNote')}: </strong>
{computerUsePlatformNote}
{computerUsePlatformMessage}
</p>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
--config-page-content-bottom-padding: 48px;
/* Vertical gap between top-level sections (ConfigPageSection blocks) inside ConfigPageContent. */
--config-page-section-gap: 32px;
/* Keep supporting copy readable and aligned across settings sections and rows. */
--config-page-description-max-width: 60ch;
container-type: inline-size;
container-name: config-panel;
}
Expand Down Expand Up @@ -96,9 +98,11 @@

.bitfun-config-page-section__description {
margin: var(--bf-appearance-token-size-gap-1) 0 0;
max-inline-size: var(--config-page-description-max-width);
font-size: var(--bf-appearance-token-font-size-xs);
color: var(--bf-appearance-token-color-text-secondary);
line-height: var(--bf-appearance-token-line-height-relaxed);
text-wrap: pretty;
}

.bitfun-config-page-section__extra {
Expand Down Expand Up @@ -178,9 +182,11 @@

.bitfun-config-page-row__description {
margin: var(--bf-appearance-token-size-gap-1) 0 0;
max-inline-size: var(--config-page-description-max-width);
font-size: var(--bf-appearance-token-font-size-xs);
color: var(--bf-appearance-token-color-text-secondary);
line-height: var(--bf-appearance-token-line-height-relaxed);
text-wrap: pretty;
}

.bitfun-config-page-row__control {
Expand Down Expand Up @@ -208,9 +214,17 @@
> div:has(> .bitfun-number-input) {
width: 100%;
min-width: 0;

> .select,
> .bitfun-input-wrapper,
> .bitfun-number-input {
width: 100%;
min-width: 0;
}
}

> .bitfun-number-input .bitfun-number-input__input {
> .bitfun-number-input .bitfun-number-input__input,
> div:has(> .bitfun-number-input) > .bitfun-number-input .bitfun-number-input__input {
text-align: left;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/web-ui/src/locales/en-US/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"models": "AI models, API keys, providers, proxy, and session title.",
"worktrees": "Defaults for isolated Git worktrees and parallel sessions.",
"sessionPersonalization": "Agent companion.",
"sessionPermissions": "Accelerated workspace search, tool confirmation, Computer use, browser, and debug.",
"sessionPermissions": "Tool permissions, execution, desktop control, and browser access.",
"quickActions": "One-click AI actions after coding. Built-in and customizable prompts.",
"voiceInput": "Local microphone input and speech-to-text model.",
"review": "Review strategy, coverage depth, capacity, cost, and latency controls.",
Expand Down
24 changes: 12 additions & 12 deletions src/web-ui/src/locales/en-US/settings/agentic-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@
"config": {
"autoExecute": "Auto Execute",
"autoExecuteDesc": "Skip user confirmation before tool execution.",
"subagentMaxConcurrency": "Subagent Concurrency Limit",
"subagentMaxConcurrencyDesc": "How many subagents may run in parallel at the same time.",
"subagentMaxConcurrency": "Concurrent task limit",
"subagentMaxConcurrencyDesc": "Maximum number of tasks that can run at the same time.",
"confirmTimeout": "Confirm Timeout",
"confirmTimeoutDesc": "Maximum time (seconds) to wait for user confirmation of tool calls.",
"confirmTimeoutHint": "Set 0 to disable confirmation timeout.",
"executionTimeout": "Execution Timeout",
"executionTimeoutDesc": "Maximum time (seconds) for tool execution.",
"executionTimeoutHint": "Set 0 to disable execution timeout. Subagents and command execution tools manage their own execution limits and are not capped by this setting.",
"executionTimeout": "Tool timeout",
"executionTimeoutDesc": "Maximum time for a single tool operation. Set 0 for no limit.",
"executionTimeoutHint": "Set 0 for no limit.",
"subagentBatchPolicy": {
"label": "Subagent Batch Scheduling",
"desc": "Choose how multiple subagent launches from the same model response are scheduled.",
"tooltipLabel": "Subagent batch scheduling details",
"safeOnly": "Safe only",
"safeOnlyDesc": "Parallelize only subagent launches whose target is marked read-only.",
"forceParallel": "Force parallel",
"forceParallelDesc": "Run multiple subagent launches from the same response in parallel, still respecting subagent capacity limits."
"label": "Task concurrency",
"desc": "Choose how multiple tasks run when they start together.",
"tooltipLabel": "Task concurrency details",
"safeOnly": "Safe parallel",
"safeOnlyDesc": "Run tasks together only when they do not modify content.",
"forceParallel": "Prefer parallel",
"forceParallelDesc": "Run multiple tasks together whenever possible."
},
"seconds": "sec"
},
Expand Down
Loading
Loading