check ptyc/bin/ptyc relative to cwd for status indicator

The tool status indicator now checks the repo-local ptyc binary
before falling back to PATH lookup, matching the resolution logic
in main.dart.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 00:54:58 +02:00
co-authored by Claude Opus 4.6
parent d0df794e69
commit 2561329836
+4 -1
View File
@@ -23,7 +23,8 @@ class _ToolStatusItemState extends State<ToolStatusItem> {
}
Future<void> _check() async {
final ptycResult = await _which('ptyc');
final cwd = Directory.current.path;
final ptycResult = _exists('$cwd/ptyc/bin/ptyc') || await _which('ptyc');
final pqlResult = await _which('pql');
if (!mounted) return;
setState(() {
@@ -33,6 +34,8 @@ class _ToolStatusItemState extends State<ToolStatusItem> {
});
}
bool _exists(String path) => File(path).existsSync();
Future<bool> _which(String name) async {
try {
final r = await Process.run('which', [name]);