Merge pull request #6 from delibae/docs/windows-setup-guide

fix: Windows build fixes and session resume crash
This commit is contained in:
Hanjin Bae 2026-03-06 19:21:57 +09:00 • committed by GitHub
commit 2fc0b1b169
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 64 additions and 9 deletions

View file

@ -9,10 +9,30 @@ Contributions are welcome! This guide covers the development environment, workfl
- [Node.js](https://nodejs.org/) 22+
- [pnpm](https://pnpm.io/) 10+
- [Rust](https://rustup.rs/) (stable)
- Platform-specific native dependencies:
- Platform-specific native dependencies (required by [Tectonic](https://tectonic-typesetting.github.io/)):
- **macOS:** `brew install icu4c harfbuzz pkg-config`
- **Linux:** `apt install libicu-dev libgraphite2-dev libharfbuzz-dev libfreetype-dev libfontconfig-dev libwebkit2gtk-4.1-dev libappindicator3-dev`
- **Windows:** `vcpkg install harfbuzz[graphite2] freetype icu fontconfig` (with `TECTONIC_DEP_BACKEND=vcpkg`)
- **Windows:** Visual Studio Build Tools (C++ workload) + vcpkg — see detailed steps below
#### Windows Setup (PowerShell)
```powershell
# 1. Install Visual Studio Build Tools (if not already installed)
winget install Microsoft.VisualStudio.2022.BuildTools --override "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
# 2. Install vcpkg
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
C:\vcpkg\bootstrap-vcpkg.bat
# 3. Set environment variables (persistent)
[Environment]::SetEnvironmentVariable("VCPKG_ROOT", "C:\vcpkg", "User")
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
[Environment]::SetEnvironmentVariable("PATH", "$path;C:\vcpkg", "User")
[Environment]::SetEnvironmentVariable("TECTONIC_DEP_BACKEND", "vcpkg", "User")
# 4. Restart PowerShell, then install native libraries (~10-20 min)
vcpkg install harfbuzz[graphite2]:x64-windows freetype:x64-windows icu:x64-windows fontconfig:x64-windows
```
### Setup

View file

@ -135,7 +135,10 @@ Download the latest build from [GitHub Releases](https://github.com/delibae/clau
- [Node.js](https://nodejs.org/) 22+
- [pnpm](https://pnpm.io/) 10+
- [Rust](https://rustup.rs/) (stable)
- macOS: `brew install icu4c harfbuzz pkg-config`
- Platform-specific native dependencies (required by [Tectonic](https://tectonic-typesetting.github.io/)):
- **macOS:** `brew install icu4c harfbuzz pkg-config`
- **Linux:** `apt install libicu-dev libgraphite2-dev libharfbuzz-dev libfreetype-dev libfontconfig-dev libwebkit2gtk-4.1-dev libappindicator3-dev`
- **Windows:** See [Windows Setup](#windows-setup) below
### Setup
@ -145,6 +148,36 @@ cd claude-prism
pnpm install
```
### Windows Setup
Windows requires [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) (C++ workload) and [vcpkg](https://github.com/microsoft/vcpkg) for native dependencies. Run the following in **PowerShell**:
```powershell
# 1. Install Visual Studio Build Tools (if not already installed)
winget install Microsoft.VisualStudio.2022.BuildTools --override "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
# 2. Install vcpkg
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
C:\vcpkg\bootstrap-vcpkg.bat
# 3. Set environment variables (persistent)
[Environment]::SetEnvironmentVariable("VCPKG_ROOT", "C:\vcpkg", "User")
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
[Environment]::SetEnvironmentVariable("PATH", "$path;C:\vcpkg", "User")
[Environment]::SetEnvironmentVariable("TECTONIC_DEP_BACKEND", "vcpkg", "User")
[Environment]::SetEnvironmentVariable("CXXFLAGS", "/std:c++17", "User")
# 4. Restart PowerShell, then install native libraries (use x64-windows-static-md triplet)
vcpkg install harfbuzz[graphite2]:x64-windows-static-md freetype:x64-windows-static-md icu:x64-windows-static-md fontconfig:x64-windows-static-md
# 5. Build and run
cd claude-prism
pnpm install
pnpm dev:desktop
```
> **Note:** Step 4 may take 10–20 minutes on first run (building ICU, HarfBuzz, etc.).
### Run
```bash

View file

@ -1,8 +1,10 @@
# Tectonic build configuration for macOS (Homebrew)
# ICU is keg-only in Homebrew, so pkg-config can't find it without this path.
# HarfBuzz headers need the parent include directory for #include <harfbuzz/hb.h>.
# Tectonic build configuration
# ICU 78+ requires C++17.
# On Linux, system packages are in standard paths — these extra paths are harmless.
# These defaults are for macOS (Homebrew). force=false means they are
# ignored when the env var is already set (e.g. on Windows/Linux).
#
# Windows: set CXXFLAGS=/std:c++17 as a user environment variable.
# Linux: system packages are in standard paths — no extra flags needed.
[env]
PKG_CONFIG_PATH = { value = "/opt/homebrew/opt/icu4c/lib/pkgconfig", force = false }
CXXFLAGS = { value = "-I/opt/homebrew/include -std=c++17", force = false }

View file

@ -39,7 +39,7 @@ const StreamingIndicator: FC = memo(() => {
// ─── Chat Messages (main component) ───
export const ChatMessages: FC = () => {
const messages = useClaudeChatStore((s) => s.messages);
const messages = useClaudeChatStore((s) => s.messages) ?? [];
const isStreaming = useClaudeChatStore((s) => s.isStreaming);
const viewportRef = useRef<HTMLDivElement>(null);
const shouldAutoScrollRef = useRef(true);

View file

@ -296,7 +296,7 @@ const AskUserQuestionWidget: FC<{ input: any; result?: ContentBlock }> = ({ inpu
const TodoWriteWidget: FC<{ input: any; result?: ContentBlock }> = ({ input, result }) => {
const [expanded, setExpanded] = useState(true);
const todos: any[] = input?.todos || [];
const todos: any[] = Array.isArray(input?.todos) ? input.todos : [];
const statusIcon = (status: string) => {
switch (status) {