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:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user