Skip to content

Conversation

WantChane
Copy link
Contributor

Zoxide integration for Flow Launcher, written in Python.

Copy link
Contributor

@cibere cibere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a readme to your plugin's repository explaining how to use the plugin?

@WantChane
Copy link
Contributor Author

Could you please add a readme to your plugin's repository explaining how to use the plugin?

Thanks for the reminder! I've added a README.md file that explains the plugin's usage and setup instructions. Please let me know if you'd like any additional details included.

@WantChane WantChane requested a review from cibere July 13, 2025 11:54
Jack251970
Jack251970 previously approved these changes Jul 15, 2025
@Jack251970
Copy link
Member

@WantChane Please update your plugin's download url to v1.1.0

@Jack251970
Copy link
Member

@cibere It works well for me

@WantChane
Copy link
Contributor Author

@WantChane Please update your plugin's download url to v1.1.0 请更新您的插件的下载 URL 到 v1.1.0

Well, I have updated the download link

@Jack251970
Copy link
Member

@cibere Could you please check why the GitHub Action failed?

Traceback (most recent call last):
  File "C:\Users\runneradmin\AppData\Roaming\FlowLauncher\Plugins\ZoxidePy\main.py", line 5, in <module>
    from pyflowlauncher import Plugin, send_results
ModuleNotFoundError: No module named 'pyflowlauncher'

@cibere
Copy link
Contributor

cibere commented Jul 16, 2025

@cibere Could you please check why the GitHub Action failed?


Traceback (most recent call last):

  File "C:\Users\runneradmin\AppData\Roaming\FlowLauncher\Plugins\ZoxidePy\main.py", line 5, in <module>

    from pyflowlauncher import Plugin, send_results

ModuleNotFoundError: No module named 'pyflowlauncher'

the github action hasn't been updated in accordance to Elven's python plugin path PR

Jack251970
Jack251970 previously approved these changes Jul 16, 2025
cibere
cibere previously approved these changes Jul 16, 2025
@Jack251970
Copy link
Member

It looks like we must fix the GitHub Action before merging

@Jack251970
Copy link
Member

@jjw24 Could you please take a look of this check issue? Even after #541 fix, the check still failed. Thanks!

@jjw24
Copy link
Member

jjw24 commented Aug 6, 2025

This is a different fail now. It's where the plugin expects zoxide.exe to exist, typically installed by user already. Not sure how we solve this scenario for testing purposes yet.

@Jack251970
Copy link
Member

@WantChane Could you please check if you can resolve this check failure on your side? Thanks!

Run python ./ci/src/test-python.py 
Found untested plugin: ZoxidePy (Version: 1.1.0)
Setting up Flow Launcher environment...
Downloading plugin ZoxidePy from https://github.com/WantChane/Flow.Launcher.Plugin.ZoxidePy/releases/download/v1.1.0/Flow.Launcher.Plugin.ZoxidePy.zip
Extracting...
Adding plugin ZoxidePy to Flow Launcher's settings file...
Running plugin test for ZoxidePy ...
#################### Input ####################
['python', '-S', '-c', "import sys; sys.path.append(r'C:\\Users\\runneradmin\\AppData\\Roaming\\FlowLauncher\\Plugins\\ZoxidePy'); sys.path.append(r'C:\\Users\\runneradmin\\AppData\\Roaming\\FlowLauncher\\Plugins\\ZoxidePy\\lib'); sys.path.append(r'C:\\Users\\runneradmin\\AppData\\Roaming\\FlowLauncher\\Plugins\\ZoxidePy\\lib\\win32\\lib'); sys.path.append(r'C:\\Users\\runneradmin\\AppData\\Roaming\\FlowLauncher\\Plugins\\ZoxidePy\\lib\\win32'); sys.path.append(r'C:\\Users\\runneradmin\\AppData\\Roaming\\FlowLauncher\\Plugins\\ZoxidePy\\plugin'); import runpy; runpy.run_path(r'C:\\Users\\runneradmin\\AppData\\Roaming\\FlowLauncher\\Plugins\\ZoxidePy\\main.py', None, '__main__')", '{"method": "query", "parameters": [""], "Settings": "{\\"zoxide_path\\": \\"zoxide.exe\\"}"}']
#################### ZoxidePy test FAILED! ####################

Plugin has returned a non-zero exit code: 1
#################### Trace ####################
Unable to find FLOW_PROGRAM_DIRECTORY environment variable. Icons will not be loaded.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<frozen runpy>", line 291, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\runneradmin\AppData\Roaming\FlowLauncher\Plugins\ZoxidePy\main.py", line 16, in <module>
    zoxide = Zoxide(plugin)
             ^^^^^^^^^^^^^^
  File "C:\Users\runneradmin\AppData\Roaming\FlowLauncher\Plugins\ZoxidePy\src\zoxide.py", line 22, in __init__
    self.zoxide_path = self._get_zoxide_path(plugin)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\runneradmin\AppData\Roaming\FlowLauncher\Plugins\ZoxidePy\src\zoxide.py", line 35, in _get_zoxide_path
    raise ZoxideNotFound(zoxide_path)
src.error.ZoxideNotFound: Zoxide not found at path: zoxide.exe

Test for ZoxidePy finished in 1.19 seconds.

******************** Test Run Summary: ********************

Total plugins tested: 1, Passed: 0, Failed: 1
Error: Process completed with exit code 1.

@jjw24
Copy link
Member

jjw24 commented Aug 6, 2025

@WantChane @Jack251970 what I think we can do in this instance is when zoxide.exe is not found, instead of raising the error, create a single result to let the user know and perhaps the action of the result when user presses enter will take them to the Zoxide download url.

WantChane added a commit to WantChane/Flow.Launcher.Plugin.ZoxidePy that referenced this pull request Aug 6, 2025
WantChane added a commit to WantChane/Flow.Launcher.Plugin.ZoxidePy that referenced this pull request Aug 6, 2025
@WantChane WantChane dismissed stale reviews from cibere and Jack251970 via 4a651ae August 6, 2025 16:04
@WantChane
Copy link
Contributor Author

@Jack251970 I adopted @jjw24's solution. Now when zoxide.exe is not found, the user will be prompted to download and install it.

@WantChane
Copy link
Contributor Author

@WantChane @Jack251970 what I think we can do in this instance is when zoxide.exe is not found, instead of raising the error, create a single result to let the user know and perhaps the action of the result when user presses enter will take them to the Zoxide download url. 我认为在这种情况下,我们可以做的是当 zoxide.exe 找不到时,而不是引发错误,创建一个单一的结果,让用户知道,也许当用户按下回车键时,结果的操作会将他们带到 Zoxide 下载 URL。

Thanks! In v1.2.0, ZoxidePy will do as you said

@Jack251970 Jack251970 enabled auto-merge August 6, 2025 17:20
Copy link
Member

@Jack251970 Jack251970 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@Jack251970 Jack251970 merged commit d477ffc into Flow-Launcher:plugin_api_v2 Aug 6, 2025
6 checks passed
@WantChane WantChane deleted the WantChane-patch-1 branch August 6, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants