Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add an 'open' utility to Phoenix #344

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AtkinsSJ
Copy link
Collaborator

No description provided.

On self-hosted installs, several of these apps are not (currently)
available, meaning that `get_app()` would fail and we would get null
values in the suggested_apps array. Since the `/open_file` API endpoint
selects the first result, it could therefore think that there were no
available apps, when actually there were.

For example, source code files can be opened either in `code` or
`editor`. `code` is not available on self-hosted, so the first entry
would be null. This change removes that, so `editor` is rightly
selected.

Also, we have this `file_extension` variable, so let's use it. :^)
`open FILE|URL` opens the given file in the user's preferred app.

On Node, we rely on the system's built-in utility rather than attempt to
write our own code for figuring out what the preferred application is.

This is currently still WIP, mainly because `puter.ui.launchApp()` can't
grant access to files, so using `open` on Puter launches the app
without the file open.

The other issue is that we (aka I) need to make the app-launching code
from the CommandProviders available to coreutils and elsewhere, so that
they don't have to duplicate all the logic.
@HeyPuter HeyPuter deleted a comment from Marcos323232 Apr 25, 2024
@AtkinsSJ AtkinsSJ marked this pull request as draft May 3, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant