From 1c34967ea2e116662ae63723c7fcc7534c467373 Mon Sep 17 00:00:00 2001 From: GitHub Copilot CLI Date: Mon, 13 Apr 2026 01:23:07 +0900 Subject: [PATCH] Install markitdown PDF dependencies for command reliability Use markitdown[all] in setup/startup and track extras installation marker so /to-markdown can process PDFs without hanging on missing converter dependencies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .devcontainer/setup.sh | 14 ++++++++++++++ .devcontainer/startup.sh | 17 +++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 616369e..ac5975f 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -110,6 +110,20 @@ else echo " ✅ uv 既にインストール済み: $(uv --version 2>/dev/null || echo 'version unknown')" fi +MARKITDOWN_EXTRAS_MARKER="/home/vscode/.local/share/uv/tools/markitdown/.ecc-all-extras" +if command -v uv &> /dev/null; then + if ! command -v markitdown &> /dev/null || [[ ! -f "$MARKITDOWN_EXTRAS_MARKER" ]]; then + echo "📄 markitdown[all] をインストール中..." + if uv tool install --upgrade "markitdown[all]"; then + mkdir -p "$(dirname "$MARKITDOWN_EXTRAS_MARKER")" + touch "$MARKITDOWN_EXTRAS_MARKER" + echo " ✅ markitdown[all] インストール完了" + else + echo " ⚠️ markitdown[all] インストールに失敗しました" + fi + fi +fi + # ECC の設定適用 echo " ECC設定を適用中..." diff --git a/.devcontainer/startup.sh b/.devcontainer/startup.sh index fa00abc..6db2f9c 100755 --- a/.devcontainer/startup.sh +++ b/.devcontainer/startup.sh @@ -222,12 +222,17 @@ if ! command -v uv >/dev/null 2>&1; then fi fi -if command -v uv >/dev/null 2>&1 && ! command -v markitdown >/dev/null 2>&1; then - echo "📦 markitdown を uv でインストール中..." - if uv tool install markitdown >/tmp/markitdown-install.log 2>&1; then - echo "✅ markitdown インストール完了" - else - echo "⚠️ markitdown インストール失敗 (ログ: /tmp/markitdown-install.log)" +MARKITDOWN_EXTRAS_MARKER="/home/vscode/.local/share/uv/tools/markitdown/.ecc-all-extras" +if command -v uv >/dev/null 2>&1; then + if ! command -v markitdown >/dev/null 2>&1 || [ ! -f "$MARKITDOWN_EXTRAS_MARKER" ]; then + echo "📦 markitdown[all] を uv でインストール中..." + if uv tool install --upgrade "markitdown[all]" >/tmp/markitdown-install.log 2>&1; then + mkdir -p "$(dirname "$MARKITDOWN_EXTRAS_MARKER")" + touch "$MARKITDOWN_EXTRAS_MARKER" + echo "✅ markitdown[all] インストール完了" + else + echo "⚠️ markitdown[all] インストール失敗 (ログ: /tmp/markitdown-install.log)" + fi fi fi