-
-
Notifications
You must be signed in to change notification settings - Fork 867
Description
Current Behavior
On a fresh install, opening the Wave Config interface (from the Wave AI -> '...' menu), and trying to use:
- Sidebar Widgets
- Wave AI Modes
- Tab Backgrounds
... doesn't work. Gives an error like: Failed to load Wave AI Modes: starting remote file stream: cannot stat file "/home/chris/.config/waveterm/waveai.json": stat /home/chris/.config/waveterm/waveai.json: no such file or directory
See screenshot.
loadFile() in waveconfig-model.ts calls FileReadCommand directly. If the
file doesn't exist, RemoteFileStreamCommand calls os.Stat(), gets ENOENT,
and throws. This lands in the catch block which sets an error message rather than
treating a missing file as an empty new file.
I've also attached a potential patch.
Expected Behavior
If the waveai.json (or whatever file) that the UI needs doesn't exist, either create it or at least give some mechanism for user to move forward.
Steps To Reproduce
Open 'Wave Config' widget from Wave AI panel after a fresh install and click on the three menu items mentioned.
Wave Version
0.14.4
Platform
Linux
OS Version/Distribution
Debian 12
Architecture
x64
Anything else?
If you 'touch ~/.config/waveterm/waveai.json', etc, the UI becomes usable.