[Update] Migrate to tauri-app(Web UI)

This commit is contained in:
Sakamoto Shiina
2024-07-25 01:01:22 +09:00
parent 25899b63da
commit ebd1a8d70d
342 changed files with 14616 additions and 13428 deletions

View File

@@ -0,0 +1,17 @@
import { store } from "@store";
export const useStdoutToPython = () => {
const asyncStdoutToPython = async (value) => {
// send to python
const backend_subprocess = store.backend_subprocess;
if (backend_subprocess) {
await backend_subprocess.write(JSON.stringify(value) + "\n").then(() => {
}).catch((err) => {
console.log(err);
});
} else {
console.error("Backend subprocess is not found.", backend_subprocess);
}
};
return { asyncStdoutToPython };
};