add files.read IPC, fix pane chrome layout, raise context panel max

Register files.read command for reading file content by relative path.
Remove top padding on context panel container and mainAxisSize.min
from ClidePaneChrome so the header sits flush and the pane fills
available height.  Context panel max raised from 420px to 1000px.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-04-23 21:25:36 +02:00
co-authored by Claude
parent b236ec439f
commit 47c2def656
4 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -892,7 +892,7 @@ class _ContextSlot extends StatelessWidget {
return Container(
color: tokens.panelBackground,
alignment: Alignment.topLeft,
padding: const EdgeInsets.fromLTRB(0, 2, 2, 0),
padding: const EdgeInsets.only(right: 2),
child: active.build(context),
);
}
+1 -1
View File
@@ -30,7 +30,7 @@ LayoutPresetContribution classicPreset() => const LayoutPresetContribution(
position: SlotPosition.right,
defaultSize: 420,
minSize: 220,
maxSize: 420,
maxSize: 1000,
),
LayoutSlot(
slot: Slots.statusbar,
+14
View File
@@ -8,6 +8,7 @@ import '../files/ignore.dart';
import '../files/listing.dart';
import '../files/watcher.dart';
import '../ipc/envelope.dart';
import '../ipc/schema_v1.dart';
import '../panes/event_sink.dart';
import 'dispatcher.dart';
@@ -63,6 +64,19 @@ void registerFilesCommands(DaemonDispatcher d, FilesService files) {
},
));
d.register('files.read', (req) async {
final path = req.args['path'] as String?;
if (path == null || path.isEmpty) {
return IpcResponse.err(id: req.id, error: IpcError(code: IpcExitCode.toolError, kind: IpcErrorKind.toolError, message: 'files.read requires a path'));
}
final file = File('${files.root.absolute.path}/$path');
if (!file.existsSync()) {
return IpcResponse.err(id: req.id, error: IpcError(code: IpcExitCode.toolError, kind: IpcErrorKind.toolError, message: 'file not found: $path'));
}
final content = file.readAsStringSync();
return IpcResponse.ok(id: req.id, data: {'path': path, 'content': content});
});
d.register('files.ls', (req) async {
final dir = (req.args['path'] as String?) ?? '';
final entries = await listDir(
-1
View File
@@ -51,7 +51,6 @@ class ClidePaneChrome extends StatelessWidget {
return ColoredBox(
color: tokens.panelBackground,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_Header(
title: title,