Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
7a61b31
πŸ€– refactor: dedupe memory sweep recordUsage callbacks
mux-bot[bot] Jul 8, 2026
f598dd1
πŸ€– refactor: dedupe memory scope-full cap check into helper
mux-bot[bot] Jul 9, 2026
03ac192
refactor: dedupe blockquote line formatting in bash monitor wake prompt
mux-bot[bot] Jul 9, 2026
71fd046
refactor: dedupe tool_search removal in prepareToolSearch
mux-bot[bot] Jul 9, 2026
e381bfa
refactor: dedupe anthropic cache-create token extraction in usageHelpers
mux-bot[bot] Jul 10, 2026
1c8fc70
refactor: dedupe capability-model thinking policy resolution
mux-bot[bot] Jul 10, 2026
b684088
refactor: dedupe queue entry clear-callback projection in MessageQueue
mux-bot[bot] Jul 11, 2026
e164673
refactor: dedupe OpenAI-origin model check in cacheStrategy
mux-bot[bot] Jul 12, 2026
147573f
refactor: dedupe tool-call-execution-start emit in StreamManager
mux-bot[bot] Jul 13, 2026
0ae0377
refactor: dedupe model-parameter extras merge in aiService
mux-bot[bot] Jul 13, 2026
a9976ae
refactor: unify legacy tool_search part rename helper in toolCatalog
mux-bot[bot] Jul 14, 2026
abd3604
refactor: drop duplicated context-cap rationale comment in codexOAuth
mux-bot[bot] Jul 14, 2026
d71e427
refactor: dedupe flat-section pinned block resolution in pinnedReorder
mux-bot[bot] Jul 15, 2026
8a6c327
refactor: dedupe JSON-wrapped tool-output unwrap in workflowRunMessages
mux-bot[bot] Jul 15, 2026
fe20570
refactor: hoist errorType local in finalizeWorkspaceTurnFromStreamError
mux-bot[bot] Jul 15, 2026
d8f93d1
refactor: extract buildSkillDescriptor helper for skill discovery
mux-bot[bot] Jul 15, 2026
510f073
refactor: hoist duplicated Date.parse(createdAt) in bash monitor deli…
mux-bot[bot] Jul 16, 2026
247f306
refactor: extract awaitPendingLoad helper in DevToolsService
mux-bot[bot] Jul 16, 2026
52d228d
refactor: dedupe MCP OAuth redirect URI resolution in router
mux-bot[bot] Jul 18, 2026
487e1ed
refactor: extract getTotalTokens helper for total-token sums
mux-bot[bot] Jul 20, 2026
baa2429
refactor: hoist duplicated dedupeKeys snapshot in removeByDedupeKeyPr…
mux-bot[bot] Jul 20, 2026
87be079
refactor: dedupe settled workspace-turn reconciliation guard
mux-bot[bot] Jul 21, 2026
d98ae3a
refactor: dedupe fire-and-forget archive-all catch in TaskGroupListItem
mux-bot[bot] Jul 21, 2026
993d2c1
refactor: extract someDescendantAgentTaskWorkspace helper for sticky-…
mux-bot[bot] Jul 21, 2026
ce7988b
refactor: drop duplicated Kimi K3 max-effort rationale in providerOpt…
mux-bot[bot] Jul 22, 2026
8056d14
refactor: drop redundant structuredOutput guard at subagent report ca…
mux-bot[bot] Jul 22, 2026
eaee220
refactor: extract isZipMediaType helper for staged attachment media-t…
mux-bot[bot] Jul 23, 2026
9740f7e
refactor: hoist duplicated goal-bypass attachment check in ChatInput
mux-bot[bot] Jul 24, 2026
1262a6e
refactor: dedupe anchored Anthropic model-id regex construction
mux-bot[bot] Jul 24, 2026
5da6406
refactor: dedupe MCP header telemetry flag derivation in router
mux-bot[bot] Jul 25, 2026
83824a7
refactor: extract _child_dirs helper for job folder discovery
mux-bot[bot] Jul 25, 2026
f4672d8
refactor: drop redundant "exec" fallback duplication for normalizeAge…
mux-bot[bot] Jul 27, 2026
3472325
refactor: name the digest truncation bounds in the timeline mapper
mux-bot[bot] Jul 28, 2026
59fb7dc
refactor: dedupe defensive unknown-field reads in the timeline mapper
mux-bot[bot] Jul 29, 2026
7a8349b
refactor: share the mobile-touch media query constant
mux-bot[bot] Jul 29, 2026
c2708eb
refactor: share the docked toast overlay placement class
mux-bot[bot] Jul 29, 2026
627daae
refactor: share the primary mouse button guard
mux-bot[bot] Jul 29, 2026
12f34da
refactor: name ModelSelector row selection/highlight state
mux-bot[bot] Jul 30, 2026
72423ed
refactor: share the workspace footer pill class
mux-bot[bot] Jul 30, 2026
2be9030
refactor: share the safe inactive-animation pause install
mux-bot[bot] Aug 1, 2026
24e8e64
refactor: share the bash monitor wake message predicate
mux-bot[bot] Aug 1, 2026
9b7f864
refactor: dedupe monitor disposition branch in terminate()
mux-bot[bot] Aug 1, 2026
5f04e2c
refactor: extract parseSubagentReportFromMessage helper
mux-bot[bot] Aug 2, 2026
4314442
refactor: drop stale userOverridable references from experiments UI
mux-bot[bot] Aug 3, 2026
7338765
refactor: reuse isTaskAwaitMessage predicate in transcript projection
mux-bot[bot] Aug 3, 2026
5509c8f
refactor: dedupe non-blank string coercion in taskReportLinking
mux-bot[bot] Aug 4, 2026
d5e0894
refactor: drop redundant agentType re-check in task_await rows
mux-bot[bot] Aug 5, 2026
9101593
refactor: hoist duplicated isGrok45Model check in xAI model creation
mux-bot[bot] Aug 6, 2026
33de97e
refactor: share the bash-monitor-wake metadata type guard
mux-bot[bot] Aug 6, 2026
1193ff1
refactor: share the persisted tool-error message extraction
mux-bot[bot] Aug 7, 2026
f99cd1c
refactor: share the terminal-attention message text join
mux-bot[bot] Aug 7, 2026
89f2b74
refactor: share the agent-plugin error diagnostic push
mux-bot[bot] Aug 7, 2026
4cbe98d
refactor: extract projectSelectOptions helper for creation project pi…
mux-bot[bot] Aug 8, 2026
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
17 changes: 8 additions & 9 deletions benchmarks/terminal_bench/prepare_leaderboard_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ def get_model_from_config(config_path: Path) -> str | None:
return None


def _child_dirs(path: Path) -> list[Path]:
"""List the immediate subdirectories of a directory, skipping plain files."""
return [child for child in path.iterdir() if child.is_dir()]


def _is_job_folder(path: Path) -> bool:
"""Check if a directory looks like a job folder (contains trial dirs with config.json)."""
if not path.is_dir():
Expand Down Expand Up @@ -249,20 +254,14 @@ def find_job_folders(artifacts_dir: Path) -> list[Path]:
# Check for direct jobs/ folder
direct_jobs = artifacts_dir / "jobs"
if direct_jobs.exists():
for item in direct_jobs.iterdir():
if item.is_dir():
job_folders.append(item)
job_folders.extend(_child_dirs(direct_jobs))
return job_folders

# Check for per-artifact structure
for artifact_dir in artifacts_dir.iterdir():
if not artifact_dir.is_dir():
continue
for artifact_dir in _child_dirs(artifacts_dir):
jobs_dir = artifact_dir / "jobs"
if jobs_dir.exists():
for item in jobs_dir.iterdir():
if item.is_dir():
job_folders.append(item)
job_folders.extend(_child_dirs(jobs_dir))

return job_folders

Expand Down
4 changes: 2 additions & 2 deletions src/browser/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import {
LEFT_SIDEBAR_DEFAULT_WIDTH_PX,
LEFT_SIDEBAR_MAX_WIDTH_PX,
LEFT_SIDEBAR_MIN_WIDTH_PX,
MOBILE_TOUCH_MEDIA_QUERY,
} from "@/constants/layout";
import { buildCoreSources, type BuildSourcesParams } from "./utils/commands/sources";

Expand Down Expand Up @@ -231,8 +232,7 @@ function AppInner() {
// because the sidebar width is controlled by CSS and shouldn't rewrite the user's desktop
// width preference.
const isMobileTouch =
typeof window !== "undefined" &&
window.matchMedia("(max-width: 768px) and (pointer: coarse)").matches;
typeof window !== "undefined" && window.matchMedia(MOBILE_TOUCH_MEDIA_QUERY).matches;
if (isMobileTouch) {
return Number.POSITIVE_INFINITY;
}
Expand Down
6 changes: 4 additions & 2 deletions src/browser/components/ChatPane/ChatPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
mergeConsecutiveStreamErrors,
computeBashOutputGroupInfos,
shouldBypassDeferredMessages,
isBashMonitorWakeMessage,
} from "@/browser/utils/messages/messageUtils";
import { computeTaskReportLinking } from "@/browser/utils/messages/taskReportLinking";
import { BashCollapsedSummaryModeProvider } from "@/browser/features/Tools/BashCollapsedSummaryModeContext";
Expand Down Expand Up @@ -104,6 +105,7 @@ import {
useBackgroundBashError,
} from "@/browser/contexts/BackgroundBashContext";
import { hasWorkspaceRepository } from "@/browser/utils/workspaceCapabilities";
import { isPrimaryMouseButton } from "@/browser/utils/events";
import {
buildEditingStateFromDisplayed,
canEditDisplayedUserMessage,
Expand Down Expand Up @@ -728,7 +730,7 @@ const ChatPaneContent: React.FC<ChatPaneContentProps> = (props) => {
);

const handleComposerDockMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {
if (event.defaultPrevented || event.button !== 0) {
if (event.defaultPrevented || !isPrimaryMouseButton(event)) {
return;
}
const control = resolveComposerControlFocusTarget(event.target, composerDockRef.current);
Expand Down Expand Up @@ -779,7 +781,7 @@ const ChatPaneContent: React.FC<ChatPaneContentProps> = (props) => {
const userHistoryIds: string[] = [];
for (const message of deferredMessages) {
// Monitor wake events should not interrupt navigation between human prompts.
if (message.type === "user" && message.bashMonitorWake == null) {
if (message.type === "user" && !isBashMonitorWakeMessage(message)) {
userHistoryIds.push(message.historyId);
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/browser/components/ChatPane/WorkspaceFooterBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ function WorkspaceBranchControls(props: {
);
}

// Shared by the footer's interactive pills (repository link, "Last prompt") so they keep reading as
// one affordance family: restyling one silently drifting from the other is the failure mode here.
const FOOTER_PILL_CLASS =
"text-muted hover:bg-hover hover:text-foreground focus-visible:ring-accent flex h-5 shrink-0 items-center gap-1 rounded-md px-1.5 transition-colors focus-visible:ring-1";

function FooterRepositoryLabel(props: { workspaceId: string; projectLabel: string }) {
const workspacePR = useWorkspacePR(props.workspaceId);

Expand All @@ -161,7 +166,7 @@ function FooterRepositoryLabel(props: { workspaceId: string; projectLabel: strin
target="_blank"
rel="noopener noreferrer"
data-testid="workspace-footer-repository"
className="text-muted hover:bg-hover hover:text-foreground focus-visible:ring-accent flex h-5 shrink-0 items-center gap-1 rounded-md px-1.5 transition-colors focus-visible:ring-1"
className={FOOTER_PILL_CLASS}
>
<Github className="h-3 w-3 shrink-0" aria-hidden="true" />
<span className="font-mono">{slug}</span>
Expand Down Expand Up @@ -238,7 +243,8 @@ function FooterLastPrompt(props: { workspaceId: string }) {
<PopoverTrigger asChild>
<button
type="button"
className="text-muted hover:bg-hover hover:text-foreground focus-visible:ring-accent flex h-5 shrink-0 cursor-pointer items-center gap-1 rounded-md border-0 bg-transparent px-1.5 transition-colors focus-visible:ring-1"
// The extra classes are <button> resets; the pill styling itself is shared.
className={cn(FOOTER_PILL_CLASS, "cursor-pointer border-0 bg-transparent")}
data-testid="workspace-footer-last-prompt"
onKeyDown={stopKeyboardPropagation}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from "react";
import { useAPI } from "@/browser/contexts/API";

const wrapperClassName =
"pointer-events-none absolute right-[15px] bottom-full left-[15px] z-[1000] mb-2 [&>*]:pointer-events-auto";
import { CHAT_DOCK_TOAST_OVERLAY_CLASS } from "@/constants/layout";

/**
* Connection status banner that uses the same *overlay placement* as ChatInputToast.
Expand Down Expand Up @@ -55,7 +53,7 @@ export const ConnectionStatusToast: React.FC<ConnectionStatusToastProps> = ({ wr

if (!wrap) return content;

return <div className={wrapperClassName}>{content}</div>;
return <div className={CHAT_DOCK_TOAST_OVERLAY_CLASS}>{content}</div>;
}

if (apiState.status === "error") {
Expand All @@ -75,7 +73,7 @@ export const ConnectionStatusToast: React.FC<ConnectionStatusToastProps> = ({ wr

if (!wrap) return content;

return <div className={wrapperClassName}>{content}</div>;
return <div className={CHAT_DOCK_TOAST_OVERLAY_CLASS}>{content}</div>;
}

return null;
Expand Down
17 changes: 9 additions & 8 deletions src/browser/components/ModelSelector/ModelSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,33 +406,34 @@ export const ModelSelector = forwardRef<ModelSelectorRef, ModelSelectorProps>(
const modelProvider = getModelProvider(model);
const showProviderLabel =
modelProvider.length > 0 && duplicateModelNames.has(modelName);
// Name the row's selection/highlight state once so the option class, ARIA state,
// and accent styling below can't drift apart (mirrors AgentModePicker).
const isHighlighted = index === highlightedIndex;
const isSelected = value === model;

return (
<div
key={model}
data-highlighted={index === highlightedIndex}
data-highlighted={isHighlighted}
onMouseEnter={() => setHighlightedIndex(index)}
className={composerPickerOptionClass(
{
isHighlighted: index === highlightedIndex,
isSelected: value === model,
},
{ isHighlighted, isSelected },
"py-1",
hiddenSet.has(model) && "opacity-50"
)}
onClick={() => handleSelectModel(model)}
role="option"
aria-selected={value === model}
aria-selected={isSelected}
>
<ProviderIcon
provider={modelProvider}
className={cn(
"h-3 w-3 shrink-0",
value === model ? "text-accent" : "text-muted"
isSelected ? "text-accent" : "text-muted"
)}
/>
<span className="flex min-w-0 flex-1 items-baseline gap-1">
<span className={cn("min-w-0 truncate", value === model && "text-accent")}>
<span className={cn("min-w-0 truncate", isSelected && "text-accent")}>
{formatModelDisplayName(modelName)}
</span>
{showProviderLabel && (
Expand Down
14 changes: 8 additions & 6 deletions src/browser/components/ProjectSidebar/TaskGroupListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ function getAggregateVisualState(props: TaskGroupListItemProps): VisualState {

export function TaskGroupListItem(props: TaskGroupListItemProps) {
const contextMenu = useContextMenuPosition();
// Variant-group archive is fire-and-forget from the row.
const archiveAll = (buttonElement: HTMLElement) => {
props.onArchiveAll?.(buttonElement).catch(() => {
// The sidebar owner surfaces archive failures through its shared error UI.
});
};
const hasRunningWork = props.runningCount > 0;
const aggregateState = getAggregateVisualState(props);
const statusDescriptionId = `task-group-status-${props.groupId}`;
Expand Down Expand Up @@ -104,9 +110,7 @@ export function TaskGroupListItem(props: TaskGroupListItemProps) {
if (props.onArchiveAll && matchesKeybind(event, KEYBINDS.ARCHIVE_WORKSPACE)) {
event.preventDefault();
stopKeyboardPropagation(event);
props.onArchiveAll(event.currentTarget).catch(() => {
// The sidebar owner surfaces archive failures through its shared error UI.
});
archiveAll(event.currentTarget);
return;
}
if (event.target !== event.currentTarget) {
Expand Down Expand Up @@ -191,9 +195,7 @@ export function TaskGroupListItem(props: TaskGroupListItemProps) {
variant="destructive"
onClick={(event) => {
contextMenu.close();
props.onArchiveAll?.(event.currentTarget).catch(() => {
// The sidebar owner surfaces archive failures through its shared error UI.
});
archiveAll(event.currentTarget);
}}
/>
</PositionedMenu>
Expand Down
10 changes: 6 additions & 4 deletions src/browser/components/WorkspaceMenuBar/WorkspaceMenuBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ import { forkWorkspace } from "@/browser/utils/chatCommands";
import { SCRATCH_PROJECT_CONFIG_KEY, SCRATCH_PROJECT_NAME } from "@/common/constants/scratch";
import { hasWorkspaceRepository } from "@/browser/utils/workspaceCapabilities";
import { stopKeyboardPropagation } from "@/browser/utils/events";
import { WORKSPACE_MENU_BAR_LEFT_SIDEBAR_COLLAPSED_PADDING_PX } from "@/constants/layout";
import {
MOBILE_TOUCH_MEDIA_QUERY,
WORKSPACE_MENU_BAR_LEFT_SIDEBAR_COLLAPSED_PADDING_PX,
} from "@/constants/layout";
import type { AgentSkillDescriptor, AgentSkillIssue } from "@/common/types/agentSkill";

interface WorkspaceMenuBarProps {
Expand Down Expand Up @@ -163,7 +166,7 @@ export const WorkspaceMenuBar: React.FC<WorkspaceMenuBarProps> = ({

const handleOpenTerminal = useCallback(() => {
// On mobile touch devices, always use popout since the right sidebar is hidden
const isMobileTouch = window.matchMedia("(max-width: 768px) and (pointer: coarse)").matches;
const isMobileTouch = window.matchMedia(MOBILE_TOUCH_MEDIA_QUERY).matches;
if (onOpenTerminal && !isMobileTouch) {
onOpenTerminal();
} else {
Expand All @@ -173,8 +176,7 @@ export const WorkspaceMenuBar: React.FC<WorkspaceMenuBarProps> = ({
}, [workspaceId, openTerminalPopout, runtimeConfig, onOpenTerminal]);

const isTouchMobileScreen =
typeof window !== "undefined" &&
window.matchMedia("(max-width: 768px) and (pointer: coarse)").matches;
typeof window !== "undefined" && window.matchMedia(MOBILE_TOUCH_MEDIA_QUERY).matches;

const isDevcontainerWorkspace = isDevcontainerRuntime(runtimeConfig);
const isRuntimeRunning = isDevcontainerWorkspace && runtimeStatus === "running";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function WorkspaceModeAISync(props: { workspaceId: string }): null {
const modelKey = getModelKey(workspaceId);
const thinkingKey = getThinkingLevelKey(workspaceId);

const normalizedAgentId = normalizeAgentId(agentId, "exec");
const normalizedAgentId = normalizeAgentId(agentId);

const isExplicitAgentSwitch =
prevAgentIdRef.current !== null &&
Expand Down
3 changes: 2 additions & 1 deletion src/browser/components/WorkspaceShell/WorkspaceShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
LEFT_SIDEBAR_DEFAULT_WIDTH_PX,
LEFT_SIDEBAR_MAX_WIDTH_PX,
LEFT_SIDEBAR_MIN_WIDTH_PX,
MOBILE_TOUCH_MEDIA_QUERY,
} from "@/constants/layout";
import { ChatPane } from "../ChatPane/ChatPane";

Expand Down Expand Up @@ -157,7 +158,7 @@ export const WorkspaceShell: React.FC<WorkspaceShellProps> = (props) => {
const handleOpenTerminal = useCallback(
(options?: TerminalSessionCreateOptions) => {
// On mobile touch devices, always use popout since the right sidebar is hidden
const isMobileTouch = window.matchMedia("(max-width: 768px) and (pointer: coarse)").matches;
const isMobileTouch = window.matchMedia(MOBILE_TOUCH_MEDIA_QUERY).matches;
if (isMobileTouch) {
void openTerminalPopout(props.workspaceId, props.runtimeConfig, options);
} else {
Expand Down
6 changes: 2 additions & 4 deletions src/browser/features/ChatInput/ChatInputToast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { ReactNode } from "react";
import { AlertTriangle, Check } from "lucide-react";
import React, { useEffect, useCallback } from "react";
import { cn } from "@/common/lib/utils";
import { CHAT_DOCK_TOAST_OVERLAY_CLASS } from "@/constants/layout";

const toastTypeStyles: Record<"success" | "error", string> = {
success: "bg-toast-success-bg border border-accent-dark text-toast-success-text",
Expand Down Expand Up @@ -31,9 +32,6 @@ export const SolutionLabel: React.FC<{ children: ReactNode }> = ({ children }) =
<div className="text-muted-light mb-1 text-[10px] uppercase">{children}</div>
);

const wrapperClassName =
"pointer-events-none absolute right-[15px] bottom-full left-[15px] z-[1000] mb-2 [&>*]:pointer-events-auto";

export const ChatInputToast: React.FC<ChatInputToastProps> = ({
toast,
onDismiss,
Expand Down Expand Up @@ -149,5 +147,5 @@ export const ChatInputToast: React.FC<ChatInputToastProps> = ({

if (!wrap) return content;

return <div className={wrapperClassName}>{content}</div>;
return <div className={CHAT_DOCK_TOAST_OVERLAY_CLASS}>{content}</div>;
};
7 changes: 2 additions & 5 deletions src/browser/features/ChatInput/CreationControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
import { GitBranch, Loader2, Wand2 } from "lucide-react";
import type { ProjectConfig } from "@/common/types/project";
import { formatProjectHierarchyLabel } from "@/common/utils/subProjects";
import { CreationProjectSelect } from "./CreationProjectSelect";
import { CreationProjectSelect, projectSelectOptions } from "./CreationProjectSelect";
import { RuntimeConfigInput } from "@/browser/components/RuntimeConfigInput/RuntimeConfigInput";
import { usePerfRenderMarker } from "@/browser/utils/perf/PerfRenderMarker";
import { cn } from "@/common/lib/utils";
Expand Down Expand Up @@ -746,10 +746,7 @@ function CreationControlsContent(props: CreationControlsProps) {
<CreationProjectSelect
selected={selected}
selectedLabel={formatProjectHierarchyLabel(selected, props.userProjects)}
options={Array.from(props.userProjects.keys()).map((path) => ({
value: path,
label: formatProjectHierarchyLabel(path, props.userProjects),
}))}
options={projectSelectOptions(props.userProjects)}
onChange={props.onSelectedProjectPathChange}
/>
);
Expand Down
23 changes: 22 additions & 1 deletion src/browser/features/ChatInput/CreationProjectSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,33 @@ import {
SelectValue,
} from "@/browser/components/SelectPrimitive/SelectPrimitive";
import { Tooltip, TooltipTrigger, TooltipContent } from "@/browser/components/Tooltip/Tooltip";
import type { ProjectConfig } from "@/common/types/project";
import { formatProjectHierarchyLabel } from "@/common/utils/subProjects";

export interface CreationProjectOption {
value: string;
label: string;
}

/**
* Every user project as picker options, labeled with the same hierarchy label
* the trigger uses so sub-projects read as "parent/child" in both places.
* Shared so callers that prepend extra entries (e.g. Scratch) stay consistent.
*/
export function projectSelectOptions(
userProjects: Map<string, ProjectConfig>
): CreationProjectOption[] {
return Array.from(userProjects.keys()).map((path) => ({
value: path,
label: formatProjectHierarchyLabel(path, userProjects),
}));
}

interface CreationProjectSelectProps {
selected: string;
selectedLabel: string;
tooltip?: string;
options: Array<{ value: string; label: string }>;
options: CreationProjectOption[];
onChange: (value: string) => void;
}

Expand Down
Loading
Loading