Roo-Code/packages/types
Hannes Rudolph 5d17f56db7
feat: add lock toggle to pin API config across all modes in workspace (#11295)
* feat: add lock toggle to pin API config across all modes in workspace

Add a lock/unlock toggle inside the API config selector popover (next to
the settings gear) that, when enabled, applies the selected API
configuration to all modes in the current workspace.

- Add lockApiConfigAcrossModes to ExtensionState and WebviewMessage types
- Store setting in workspaceState (per-workspace, not global)
- When locked, activateProviderProfile sets config for all modes
- Lock icon in ApiConfigSelector popover bottom bar next to gear
- Full i18n: English + 17 locale translations (all mention workspace scope)
- 9 new tests: 2 ClineProvider, 2 handler, 5 UI (77 total pass)

* refactor: replace write-fan-out with read-time override for lock API config

The original lock implementation used setModeConfig() fan-out to write the
locked config to ALL modes globally. Since the lock flag lives in workspace-
scoped workspaceState but modeApiConfigs are in global secrets, this caused
cross-workspace data destruction.

Replaced with read-time guards:
- handleModeSwitch: early return when lock is on (skip per-mode config load)
- createTaskWithHistoryItem: skip mode-based config restoration under lock
- activateProviderProfile: removed fan-out block
- lockApiConfigAcrossModes handler: simplified to flag + state post only
- Fixed pre-existing workspaceState mock gap in ClineProvider.spec.ts and
  ClineProvider.sticky-profile.spec.ts
2026-02-07 20:31:22 -07:00
..
npm chore: bump version to v1.110.0 (#11278) 2026-02-06 17:52:48 -08:00
scripts Fix publish-npm script (#7093) 2025-08-14 03:17:56 -07:00
src feat: add lock toggle to pin API config across all modes in workspace (#11295) 2026-02-07 20:31:22 -07:00
.gitignore Task metadata (#7092) 2025-08-14 03:14:17 -07:00
eslint.config.mjs Task metadata (#7092) 2025-08-14 03:14:17 -07:00
package.json feat: add AI SDK dependencies and message conversion utilities (#11047) 2026-01-28 14:05:53 -05:00
tsconfig.json Task metadata (#7092) 2025-08-14 03:14:17 -07:00
tsup.config.ts Bump @roo-code/types to v1.42.0 (#6610) 2025-08-02 13:27:59 -07:00
vitest.config.ts Convert jest tests to vitest and disable default watch mode for vitest (#4568) 2025-06-11 14:48:01 -07:00