diff --git a/lib/builtin/claude/src/extension.dart b/lib/builtin/claude/src/extension.dart index d6efc788..93023957 100644 --- a/lib/builtin/claude/src/extension.dart +++ b/lib/builtin/claude/src/extension.dart @@ -23,10 +23,15 @@ import 'package:flutter/widgets.dart'; /// D-6 contract (T-391): a failed command returns an ERROR envelope (non-zero /// CLI exit), never `ok` with an `error` field a script can't detect. -IpcResponse _userErr(String msg, {String? hint}) => - IpcResponse.err(id: '', error: IpcError(code: IpcExitCode.userError, kind: IpcErrorKind.userError, message: msg, hint: hint)); +IpcResponse _userErr(String msg, {String? hint}) => IpcResponse.err( + id: '', + error: IpcError(code: IpcExitCode.userError, kind: IpcErrorKind.userError, message: msg, hint: hint), +); -IpcResponse _notFound(String msg) => IpcResponse.err(id: '', error: IpcError(code: IpcExitCode.notFound, kind: IpcErrorKind.notFound, message: msg)); +IpcResponse _notFound(String msg) => IpcResponse.err( + id: '', + error: IpcError(code: IpcExitCode.notFound, kind: IpcErrorKind.notFound, message: msg), +); class ClaudeExtension extends ClideExtension { @override diff --git a/test/kernel/src/extensions_manager_test.dart b/test/kernel/src/extensions_manager_test.dart index da248e83..f724dddc 100644 --- a/test/kernel/src/extensions_manager_test.dart +++ b/test/kernel/src/extensions_manager_test.dart @@ -321,13 +321,23 @@ void main() { group('lifecycle hardening (T-377)', () { test('a throw mid-contribution unwinds everything already mounted', () async { // The tab mounts first, then the duplicate command id throws. - f.services.commands.register(CommandContribution(id: 'taken', command: 'taken.cmd', run: (_) async => IpcResponse.ok(id: ''))); + f.services.commands.register( + CommandContribution( + id: 'taken', + command: 'taken.cmd', + run: (_) async => IpcResponse.ok(id: ''), + ), + ); f.services.extensions.register( _Ext( id: 'half-mounts', contributions: [ TabContribution(id: 'half.view', slot: Slots.workspace, title: 'T', build: (_) => const SizedBox.shrink()), - CommandContribution(id: 'half.cmd', command: 'taken.cmd', run: (_) async => IpcResponse.ok(id: '')), + CommandContribution( + id: 'half.cmd', + command: 'taken.cmd', + run: (_) async => IpcResponse.ok(id: ''), + ), ], ), );