CI / Build (push) Waiting to run
CI / Test (push) Waiting to run
Release / Test release commit (push) Waiting to run
Release / Build macOS Apple Silicon (push) Blocked by required conditions
Release / Build Linux ARM64 (push) Blocked by required conditions
Release / Build Linux x86_64 (push) Blocked by required conditions
Release / Build Windows x86_64 CLI (push) Blocked by required conditions
Release / Upload GitHub release assets (push) Blocked by required conditions
Release / Publish npm packages (push) Blocked by required conditions
29 lines
662 B
TypeScript
29 lines
662 B
TypeScript
import { useEffect, useState } from "react";
|
|
import { ChatShell } from "@/components/ChatShell";
|
|
import { getCwd } from "@/lib/tauri";
|
|
|
|
export default function App() {
|
|
const [cwd, setCwd] = useState<string>("");
|
|
|
|
useEffect(() => {
|
|
void (async () => {
|
|
try {
|
|
const c = await getCwd();
|
|
setCwd(c);
|
|
} catch {
|
|
setCwd("");
|
|
}
|
|
})();
|
|
}, []);
|
|
|
|
if (!cwd) {
|
|
return (
|
|
<div className="vignette scanlines grain flex h-screen w-screen items-center justify-center bg-[var(--color-bg)] font-mono text-xs text-[var(--color-fg-dim)]">
|
|
loading…
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return <ChatShell cwd={cwd} />;
|
|
}
|