eca icon indicating copy to clipboard operation
eca copied to clipboard

Allow add file (read-only) outside of workspace

Open jilen opened this issue 1 year ago • 8 comments

Useful for add file from git submodule, or other library source file.

jilen avatar Aug 19 '25 03:08 jilen

Interesting, makes sense, I wonder how we should present those files in context completion, any suggestions?

ericdallo avatar Aug 19 '25 11:08 ericdallo

I'm finding hard how the UX would be for this one, we can't just return all system files for completion and there is no option for manual add contexts not in completion.

It seems Cursor has the same problem, so the workaround for now is to add the folder as a workspace to ECA be aware of it.

ericdallo avatar Aug 21 '25 20:08 ericdallo

Maybe just return child items in the folder if prefix is /, ./ , ../, ~/ ...

jilen avatar Aug 25 '25 02:08 jilen

hum, maybe, will take a look if with that would work

ericdallo avatar Aug 25 '25 12:08 ericdallo

Some ideas for a Emacs user interface:

  • Use find-file/project-find-file or a custom function
  • Add files from dired

For other editors

  • Use some file picker where you can select 1 or many files

r0man avatar Aug 26 '25 08:08 r0man

I think the problem here is that:

  • clients request server for what available contexts exists and they should be able to complete/choose via chat/queryContext
  • server return the contexts checking for workspace root.

otherwise we may have too much login on clients and not centralized, so would be nice to fix that somehow in the query, like user type ~/ or ../ and server realizes that and return that folder in completion

ericdallo avatar Aug 26 '25 14:08 ericdallo

Ok, I think I have something work for this in server with minor changes in client and seems to fix the problem

ericdallo avatar Aug 26 '25 18:08 ericdallo

Done! LMK if that is enough for you @jilen

ericdallo avatar Aug 26 '25 19:08 ericdallo