Otto-AA/aw-watcher-vscode

Opening image (png) creates errors

Otto-AA opened this issue · 2 comments

Opening an image file (tested with png) creates the following errors:

  • [ActivityWatch] error while creating event
  • [ActivityWatch] Couldn't get current file name
  • [ActivityWatch] Couldn't get current language

Therefore images don't appear in the event list.

It seems unsupported by now to get the current file name / language if it is not an editor: microsoft/vscode#15178
microsoft/vscode#33869

Workaround added in this commit.