If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /Users/kazu42/.claude/projects/-Users-kazu42-dev-mdpreview/6fbf0e48-4cf6-4207-b545-40bf991fe514.jsonl
If this plan can be broken down into multiple independent tasks, consider using the TeamCreate tool to create a team and parallelize the work.
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /Users/kazu42/.claude/projects/-Users-kazu42-dev-mdpreview/6fbf0e48-4cf6-4207-b545-40bf991fe514.jsonl
If this plan can be broken down into multiple independent tasks, consider using the TeamCreate tool to create a team and parallelize the work.
User
5. リンクバリデーション
修正ファイル
MarkdownWebView.swift:
extractLocalLinks(in:baseURL:) static メソッド追加
markdownからローカルファイルリンクを正規表現で抽出
FileManager.fileExists で存在確認
壊れたリンクのパスリストを返す
evaluateRender 後に markBrokenLinks([...]) をJS呼出し
template.html:
js
function markBrokenLinks(brokenPaths) {
// <a> 要素にマッチしたらclass 'broken-link' 追加
}
➜ mdpreview git:(main) brew upgrade --cask kazu-42/tap/mdpreview
==> Auto-updating Homebrew...
Adjust how often this is run with $HOMEBREW_AUTO_UPDATE_SECS or disable with
$HOMEBREW_NO_AUTO_UPDATE=1. Hide these hints with $HOMEBREW_NO_ENV_HINTS=1 (see man brew).
==> Auto-updated Homebrew!
Updated 2 taps (kazu-42/tap and homebrew/core).
You have 1 outdated formula and 1 outdated cask installed.
==> Fetching downloads for: kazu-42/tap/mdpreview
✘ Cask mdpreview (1.4.0) Verifying 2.2MB/ 2.2MB
Error: Cask reports different checksum: 6b4139fb636c82da58724155051aef90534cccbaffe933ef37049c53511c86c8
SHA-256 checksum of downloaded file: eae095f87233a917768c363dba2aedb64d78c78700db522b2ed79ca08cffea1d
==> Upgrading 1 outdated package:
kazu-42/tap/mdpreview 1.3.0 -> 1.4.0
==> Upgrading mdpreview
==> Purging files for version 1.4.0 of Cask mdpreview
Error: kazu-42/tap/mdpreview: SHA-256 mismatch
Expected: 6b4139fb636c82da58724155051aef90534cccbaffe933ef37049c53511c86c8
Actual: eae095f87233a917768c363dba2aedb64d78c78700db522b2ed79ca08cffea1d
File: /Users/kazu42/Library/Caches/Homebrew/downloads/87702095b4fd9d3a285905ded1b904a4fa5dbf06a67861228b803be139ff48d3--MDPreview-1.4.0.dmg
To retry an incomplete download, remove the file above.
open -a "MDPreview" README.md # アプリでファイルを開く
open -a "Safari" https://example.com
2. アプリ付属のCLIツール
MDPreviewのような場合:
bash
mdpreview README.md
mdpreview .
3. osascript(AppleScript / JavaScript)
bash
# アプリのメニューを操作
osascript -e 'tell application "Finder" to empty trash'
# アクティブウィンドウのURLを取得(Safari)
osascript -e 'tell application "Safari" to URL of current tab of front window'
SwiftUI が Close Tab のショートカット登録を諦める(system Close と競合)
AppDelegate に NSEvent ローカルモニターで先に捕捉
Cmd+Opt+W でタブでなく全ウィンドウが閉じる可能性
同様の競合
同上
LLM によるアプリ操作(osascript ベース)
今のところ osascript で十分な制御が可能です:
bash
# メニュー操作
osascript -e 'tell app "System Events" to tell process "MDPreview" to click menu item "Open..." of menu "File" of menu bar item "File" of menu bar 1'
# ウィンドウ状態読み取り
osascript -e 'tell app "System Events" to tell process "MDPreview" to title of windows'
# スクリーンショットで視覚確認
screencapture -l $(osascript -e 'tell app "MDPreview" to id of window 1') /tmp/mdpreview.png
You have 1 outdated cask installed.
You can upgrade it with brew upgrade
or list it with brew outdated.
==> Fetching downloads for: kazu-42/tap/mdpreview
✔︎ Cask mdpreview (1.5.1) Verified 2.3MB/ 2.3MB
==> Upgrading 1 outdated package:
kazu-42/tap/mdpreview 1.5.0 -> 1.5.1
==> Upgrading mdpreview
==> Backing App 'MDPreview.app' up to '/opt/homebrew/Caskroom/mdpreview/1.5.0/MD
==> Removing App '/Applications/MDPreview.app'
==> Unlinking Binary '/opt/homebrew/bin/mdpreview'
==> Moving App 'MDPreview.app' to '/Applications/MDPreview.app'
==> Backing App 'MDPreview.app' up to '/opt/homebrew/Caskroom/mdpreview/1.5.1/MD
==> Removing App '/Applications/MDPreview.app'
==> Purging files for version 1.5.1 of Cask mdpreview
==> Purging files for version 1.5.1 of Cask mdpreview
Warning: Reverting upgrade for Cask mdpreview
==> Moving App 'MDPreview.app' to '/Applications/MDPreview.app'
==> Linking Binary 'mdpreview' to '/opt/homebrew/bin/mdpreview'
Error: kazu-42/tap/mdpreview: It seems the symlink source '/Applications/MDPreview.app/Contents/Resources/mdpreview' is not there.