-
Notifications
You must be signed in to change notification settings - Fork 8
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: passing data back and forth between Tauri client and Python #22
Conversation
@gjreda I noticed that after running |
@cguedes good catch! yes, we should ignore them from the repo since they will be specific to each of our local machines. |
@cguedes perhaps you could be the reviewer here? |
@gjreda I'm having this error when using python via sidecar. I've run ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gjreda after merging main into this branch and installing all the dependencies again (yarn install
, poetry install
and yarn python
) the app is now working fine 🎉
![image](https://private-user-images.githubusercontent.com/174127/240240358-37cc084f-edd1-4486-bb7a-c72b52883b4a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MzAxNzgsIm5iZiI6MTcyMTkyOTg3OCwicGF0aCI6Ii8xNzQxMjcvMjQwMjQwMzU4LTM3Y2MwODRmLWVkZDEtNDQ4Ni1iYjdhLWM3MmI1Mjg4M2I0YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyNVQxNzUxMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNDE3NDZjZTg5ZmU4MjNmZTE4ZWM3ZWEwOGViYzEzZWQzMmRjOGNmNGMzMWE3MTM0OTllYTRlZTBiMGI1ZmEyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.G5KUwCSdxlQrurmzfI2_x7RsMsG5Z9-3n5HY23pRUV4)
@sergioramos I think you can merge this PoC into main (before #25 that is still in progress).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw Command.sidecar
in code, got curious and left some comments.
const aiReply = await invoke<string>('interact_with_ai', { | ||
selection, | ||
}); | ||
const command = Command.sidecar('bin/python/main', ['--text', `${selection}`]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | ||
const command = Command.sidecar('bin/python/main', ['--text', `${selection}`]); | ||
const output = await command.execute(); | ||
if (output.stderr) throw new Error(output.stderr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More idiomatic to check output.code
for errors here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw Command.sidecar
in code, got curious and left some comments.
This updates the sidecar PoC. It does the following:
It's fun to see it working!