diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8659a4d..9a05dab 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -14,8 +14,6 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ pkg-config \ libssl-dev \ ripgrep \ - tmux \ - vim \ jq \ sudo \ chromium \ @@ -28,10 +26,6 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ && apt-get install -y nodejs \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* -# Install yq manually -RUN curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq \ - && chmod +x /usr/local/bin/yq - # Ensure pre-installed tools are always in PATH even if CARGO_HOME is overridden at runtime ENV PATH=/usr/local/cargo/bin:$PATH @@ -39,3 +33,9 @@ ENV PATH=/usr/local/cargo/bin:$PATH RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \ && rustup component add rustfmt clippy llvm-tools-preview \ && cargo binstall -y cargo-audit cargo-llvm-cov + +# Install Chromium and dependencies for browser-based MCP +RUN apt-get update && apt-get install -y \ + chromium \ + chromium-common \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 83f40bf..087658b 100644 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -19,13 +19,6 @@ if [ -z "$CI" ] && [ -z "$GITHUB_ACTIONS" ]; then echo "[Devcontainer Setup] Claude CLI already installed: $(claude --version)" fi - echo "[Devcontainer Setup] Configuring tmux..." - cat > $HOME/.tmux.conf << 'EOF' -# Display pane number -bind-key p display-panes -set display-panes-time 10000 -EOF - echo "[Devcontainer Setup] Configuring claude alias..." echo 'alias claude="claude --allow-dangerously-skip-permissions"' >> $HOME/.bashrc echo 'alias claude="claude --allow-dangerously-skip-permissions"' >> $HOME/.zshrc @@ -53,8 +46,16 @@ EOF # Note: chrome_args will be dynamically determined by the app echo "[Devcontainer Setup] Configuring google-patent-cli..." mkdir -p "$HOME/.config/google-patent-cli" - cat > "$HOME/.config/google-patent-cli/config.toml" < ~/.config/google-patent-cli/config.toml << 'EOF' +# Chrome browser path browser_path = "/usr/bin/chromium" + +# Chrome arguments for Docker/DevContainer environment +chrome_args = [ + "--no-sandbox", + "--disable-setuid-sandbox", + "--disable-gpu" +] EOF # Run mise install @@ -79,14 +80,20 @@ EOF "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic", "API_TIMEOUT_MS": "3000000", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1", - "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5", - "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7", + "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.1", + "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5-turbo", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air" } } EOF fi + # Configure git to use gh for HTTPS auth + if command -v gh >/dev/null 2>&1; then + echo "[Devcontainer Setup] Configuring gh auth for git..." + gh auth setup-git + fi + echo "[Devcontainer Setup] Complete!" else echo "Running in CI environment, skipping development setup..." diff --git a/Cargo.toml b/Cargo.toml index f928f3c..76d2664 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "google-patent-cli" -version = "0.2.1" +version = "0.2.2" edition = "2024" rust-version = "1.93"