feat: パーミッションUI改善 — SDK v2対応 + コンパクトなキュー表示#93
Merged
Conversation
Migrate from @opencode-ai/sdk to @opencode-ai/sdk/v2 to match opencode server v1.2.20 which sends v2-format events. Key changes: - Import path: @opencode-ai/sdk → @opencode-ai/sdk/v2 - API calls: nested path params → flat params - Event names: permission.updated → permission.asked - Permission type: Permission → PermissionRequest fields - Reply methods: raw fetch → client.permission.reply / question.reply - SSE subscription: positional → options arg
Replace the stacked warning-box permission UI with a compact bar-style queue that matches TodoHeader / FileChangesHeader design patterns. - Move permissions from MessageItem to a dedicated PermissionQueue above InputArea - Show first pending permission expanded, collapse the rest behind a count badge - Click header bar to expand/collapse remaining permissions - Use ShieldIcon with warning accent color for visual distinction - Buttons use sm size for compact layout - Reply uses permission.sessionID for correct child-session handling
- Add ShieldIcon (VscShield) to icon components for permission header - Add 'permission.title' key to all 8 locale files (en, ja, zh-cn, zh-tw, ko, es, pt-br, ru)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@opencode-ai/sdk→@opencode-ai/sdk/v2に全面移行MessageItem内の埋め込み表示から、InputArea直上のキュー型バーに変更Commits
feat: migrate opencode agent to SDK v2— SDK v2 への移行(agent + core 層)feat: redesign permission UI as compact inline queue— UI アーキテクチャ変更 + デザイン刷新(webview 層)feat: add ShieldIcon and permission.title locale key— アイコン追加 + 全8ロケール対応Design
Verification
tsc --noEmit: 3パッケージすべてパスCloses #92
Related: #91