Skip to content
Draft

topic #104

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
28781ff
topic
ktmage May 8, 2026
54bf54b
ディレクトリ構造の変更
ktmage May 9, 2026
fefad7b
nodejsのバージョンを固定
ktmage May 9, 2026
2d51afc
update: vite関連のバージョンを上げる
ktmage May 9, 2026
ee54afb
refactor: SVGアイコンを直接使用
ktmage May 9, 2026
7ef57e4
delete: debug logger
ktmage May 9, 2026
c5134b8
update: webviewをフラットに
ktmage May 9, 2026
6a610af
chore: rename
ktmage May 9, 2026
5131daa
rename: ext -> extention
ktmage May 9, 2026
fd7bfd1
update: typescript
ktmage May 9, 2026
9ccb82d
TypeScript 6対応に向けて共有型を厳密にする
ktmage May 9, 2026
892cee3
OpenCode client handle に移行
ktmage May 9, 2026
a1ee396
chore: .gitignore にエージェントファイルを追加
ktmage May 9, 2026
004c4ba
refactor: TSDoc 追加
ktmage May 9, 2026
4ddf151
i18nの仕組みを整備
ktmage May 9, 2026
e120954
refactor: OpenCodeBinaryNotFoundError を追加し、エラーハンドリングを改善
ktmage May 9, 2026
f6eff34
refactor: OpenCodeError クラスを追加し、エラーハンドリングを改善
ktmage May 9, 2026
fbd6ea6
refactor: OpenCodeError クラスの改善とエラーハンドリングの強化
ktmage May 9, 2026
b2b5a15
refactor: connectOpenCode 関数を追加し、エラーハンドリングを改善
ktmage May 9, 2026
514c1dd
refactor: VscodePlatformServices を削除し、ChatViewProvider に機能を統合
ktmage May 9, 2026
168b7c0
refactor: difit の存在確認を追加し、情報メッセージを表示する機能を実装
ktmage May 9, 2026
4c54a09
refactor: DiffReviewManager を DifitHandle に置き換え、関連するテストを追加
ktmage May 9, 2026
3481474
refactor: DifitError と DifitBinaryNotFoundError クラスを追加し、エラーハンドリングを改善
ktmage May 9, 2026
eca6cfb
feat: rename ChatPanel
ktmage May 9, 2026
b9398d4
分解
ktmage May 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,24 @@ jobs:
with:
node-version: 22

- uses: pnpm/action-setup@v4
with:
version: 10

- name: Install dependencies
run: pnpm install
run: npm ci

- name: Build
run: pnpm build
run: npm run build

- name: Test
run: pnpm test:all

- name: Copy root files for extension packaging
run: cp LICENSE CHANGELOG.md THIRD_PARTY_NOTICES.md packages/platforms/vscode/
run: npm run test:all

- name: Package extension
run: pnpm --filter opencodegui run package
working-directory: .
run: npm run package

- name: Publish to Marketplace
run: pnpm --filter opencodegui run publish
run: npm run publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}

- name: Upload .vsix to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: packages/platforms/vscode/*.vsix
files: "*.vsix"
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ jobs:
with:
node-version: 22

- uses: pnpm/action-setup@v4
with:
version: 10

- name: Install dependencies
run: pnpm install
run: npm ci

- name: Lint & Format check
run: pnpm check
run: npm run check

- name: Test
run: pnpm test:all
run: npm run test:all
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ Thumbs.db
# VS Code extension package
*.vsix

# Root files copied into extension dir for packaging
packages/platforms/vscode/LICENSE
packages/platforms/vscode/CHANGELOG.md
packages/platforms/vscode/THIRD_PARTY_NOTICES.md

# Environment
.env
.env.*
.env.*

# Agents
AGENTS.md
CLAUDE.md
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/platforms/vscode"],
"outFiles": ["${workspaceFolder}/packages/platforms/vscode/dist/**/*.js"],
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "npm: build"
}
]
Expand Down
1 change: 0 additions & 1 deletion packages/platforms/vscode/.vscodeignore → .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
src/**
webview/**
node_modules/**
tsconfig.json
vite.config.ts
Expand Down
6 changes: 2 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ This project itself is developed primarily through AI-assisted coding, and we we

#### Prerequisites

- Node.js v22+
- npm
- Node.js v24+ and npm
- [OpenCode](https://github.com/anomalyco/opencode) installed with LLM provider authentication configured

#### Setup
Expand Down Expand Up @@ -105,8 +104,7 @@ By submitting a pull request, you agree that your contributions are licensed und

#### 前提条件

- Node.js v22+
- npm
- Node.js v24+ と npm
- [OpenCode](https://github.com/anomalyco/opencode) がインストール済みで、LLM プロバイダの認証が完了していること

#### セットアップ
Expand Down
146 changes: 58 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,26 @@ Search for **OpenCodeGUI** in the VS Code Extensions view (`Ctrl+Shift+X` / `Cmd

#### Prerequisites

- Node.js v22+
- [pnpm](https://pnpm.io/) v10+
- Node.js v24+ and npm

#### Setup

```sh
pnpm install
pnpm run build
npm install
npm run build
```

#### Build

```sh
# Full build (all packages)
pnpm run build
# Full build
npm run build

# Extension only (from packages/platforms/vscode)
pnpm --filter opencodegui run build:ext
# Extension only
npm run build:extension

# Webview only (from packages/platforms/vscode)
pnpm --filter opencodegui run build:webview
# Webview only
npm run build:webview
```

#### Watch Mode
Expand All @@ -114,63 +113,49 @@ Open two terminals and run each:

```sh
# Terminal 1: Extension watch
pnpm --filter opencodegui run watch:ext
npm run watch:extension

# Terminal 2: Webview watch
pnpm --filter opencodegui run watch:webview
npm run watch:webview
```

#### Lint & Format

```sh
pnpm run check
npm run check
```

#### Debug

1. Run `pnpm run build`
1. Run `npm run build`
2. Press `F5` in VS Code to launch the Extension Development Host
3. Click the OpenCode icon in the sidebar to open the chat panel

#### Test

```sh
pnpm test
npm test
```

### Project Structure

This project is a pnpm monorepo with the following packages:
This project is a single VS Code extension package:

```
packages/
core/ # @opencodegui/core — Domain types, interfaces & protocol
src/
domain.ts # Domain types (messages, sessions, tools, permissions)
agent.interface.ts # IAgent interface
platform.interface.ts # IPlatformServices interface
protocol.ts # Webview ↔ Extension messaging protocol

agents/
opencode/ # @opencodegui/agent-opencode — OpenCode SDK adapter
src/
opencode-agent.ts # IAgent implementation for OpenCode
mappers.ts # SDK ↔ domain type mappers

platforms/
vscode/ # opencodegui — VS Code extension
src/
extension.ts # Extension entry point
chat-view-provider.ts # Webview panel & messaging
vscode-platform-services.ts # IPlatformServices implementation
webview/ # Webview (Browser, React)
App.tsx # State management & SSE event handling
components/ # React components (Atoms / Molecules / Organisms)
hooks/ # Custom React hooks
contexts/ # React Context providers
locales/ # i18n locale files
utils/ # Utility functions
__tests__/ # Tests (unit, scenario)
extension/
extension.ts # Extension entry point
chat-view-provider.ts # Webview panel & messaging
opencode-client-handle.ts # OpenCode client lifecycle
__tests__/ # Extension host tests
shared/ # Shared types for extension host and webview
webview/ # Webview (React)
App.tsx # State management & SSE event handling
components/ # React components
hooks/ # Custom React hooks
contexts/ # React Context providers
locales/ # i18n locale files
utils/ # Utility functions
__tests__/ # Webview tests
```

### Contributing
Expand Down Expand Up @@ -257,27 +242,26 @@ VS Code の拡張機能ビュー(`Ctrl+Shift+X` / `Cmd+Shift+X`)で **OpenCo

#### 前提条件

- Node.js v22+
- [pnpm](https://pnpm.io/) v10+
- Node.js v24+ と npm

#### セットアップ

```sh
pnpm install
pnpm run build
npm install
npm run build
```

#### ビルド

```sh
# 全体ビルド(全パッケージ)
pnpm run build
# 全体ビルド
npm run build

# Extension のみ(packages/platforms/vscode から)
pnpm --filter opencodegui run build:ext
# Extension のみ
npm run build:extension

# Webview のみ(packages/platforms/vscode から)
pnpm --filter opencodegui run build:webview
# Webview のみ
npm run build:webview
```

#### Watch モード
Expand All @@ -286,63 +270,49 @@ pnpm --filter opencodegui run build:webview

```sh
# Terminal 1: Extension watch
pnpm --filter opencodegui run watch:ext
npm run watch:extension

# Terminal 2: Webview watch
pnpm --filter opencodegui run watch:webview
npm run watch:webview
```

#### リント & フォーマット

```sh
pnpm run check
npm run check
```

#### デバッグ実行

1. `pnpm run build` でビルドする
1. `npm run build` でビルドする
2. VS Code で `F5` を押して Extension Development Host を起動する
3. サイドバーの OpenCode アイコンをクリックしてチャットパネルを開く

#### テスト

```sh
pnpm test
npm test
```

### プロジェクト構造

本プロジェクトは pnpm モノレポ構成です
本プロジェクトは単一の VS Code 拡張パッケージです

```
packages/
core/ # @opencodegui/core — ドメイン型・インターフェース・プロトコル
src/
domain.ts # ドメイン型(メッセージ、セッション、ツール、パーミッション)
agent.interface.ts # IAgent インターフェース
platform.interface.ts # IPlatformServices インターフェース
protocol.ts # Webview ↔ Extension メッセージングプロトコル

agents/
opencode/ # @opencodegui/agent-opencode — OpenCode SDK アダプター
src/
opencode-agent.ts # OpenCode 用 IAgent 実装
mappers.ts # SDK ↔ ドメイン型マッパー

platforms/
vscode/ # opencodegui — VS Code 拡張機能
src/
extension.ts # 拡張機能エントリーポイント
chat-view-provider.ts # Webview パネル & メッセージング
vscode-platform-services.ts # IPlatformServices 実装
webview/ # Webview (Browser, React)
App.tsx # 状態管理 & SSE イベントハンドリング
components/ # React コンポーネント(Atoms / Molecules / Organisms)
hooks/ # カスタム React フック
contexts/ # React Context プロバイダー
locales/ # i18n ロケールファイル
utils/ # ユーティリティ関数
__tests__/ # テスト(単体、シナリオ)
extension/
extension.ts # 拡張機能エントリーポイント
chat-view-provider.ts # Webview パネル & メッセージング
opencode-client-handle.ts # OpenCode client lifecycle
__tests__/ # Extension Host テスト
shared/ # Extension Host と Webview の共有型
webview/ # Webview (React)
App.tsx # 状態管理 & SSE イベントハンドリング
components/ # React コンポーネント
hooks/ # カスタム React フック
contexts/ # React Context プロバイダー
locales/ # i18n locale files
utils/ # ユーティリティ関数
__tests__/ # Webview テスト
```

### コントリビュート
Expand Down
File renamed without changes.
Loading
Loading