Files
OpenHands/__tests__/hooks
4ec694e86b Add workspace mode for local conversations (#1293)
* Add workspace mode for local conversations

Selected local workspaces now default to direct repo/folder mode by passing workspaceMode=local_repo through the home launcher and conversation creation stack. The agent-server payload can now send worktree=false, so plain folders do not request git worktree setup by default. Conversations started without a selected workspace continue to request worktree=true.

Adds a pill-style workspace mode selector beside the selected workspace preview with current backend labels limited to Local Repo and Cloud Repo plus the New Worktree option. Stores workspace_mode in client metadata so the selected mode can be preserved alongside selected_workspace.

Coverage added for adapter payload defaults, service-level selected-workspace behavior, home launcher mode selection, and updated comments around worktree-mode grouping. Verified with focused vitest, typecheck, prettier check, and production build.

* Localize workspace mode selector labels via i18n

Replace the hardcoded "Local Repo" / "Cloud Repo" / "New Worktree"
strings with COMMON$WORKSPACE_MODE_* translation keys (all 15 supported
languages). getWorkspaceModeLabel becomes getWorkspaceModeI18nKey,
returning an I18nKey that the selector translates with useTranslation,
matching the getTaskStatusI18nKey convention.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: failing tests

---------

Co-authored-by: hieptl <hieptl.developer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 18:06:45 +00:00
..