Skip to content

[Bug]:Wave Config menu - Failed to load files #3150

@enderwiggum

Description

@enderwiggum

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.

Image

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.

patch.txt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions