Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,30 @@ agentic git commit generate tool
- 架构文档:`docs/architecture.md`
- 功能文档:`docs/features.md`
- 路线图文档:`docs/roadmap.md`
- 桌面端进度:`docs/desktop-status.md`
- Copilot DCOS:`docs/copilot-dcos.md`

## Desktop Client (Wails v3)

- 桌面端代码位于:`desktop/`
- 该子项目不会影响现有 CLI(`main.go` / `bootstrap.Main()` 保持不变)

快速启动:

```bash
cd desktop
go run github.com/wailsapp/wails/v3/cmd/wails3@latest generate bindings -clean=true -ts -i
cd frontend && npm install && npm run build
cd ..
go run .
```

如果本机已安装 `wails3`,可直接在 `desktop/` 下执行:

```bash
wails3 dev
```

## Command Overview
- `fastgit commit`: AI 提交流程(保留原行为)
- `fastgit commit ai`: AI 提交流程显式入口(新增)
Expand Down
67 changes: 67 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version: '3'
dotenv: [ '.env' ]
vars:
Project: "fastgit"
DesktopDir: "./desktop"
FrontendDir: "./desktop/frontend"
Base: "github.com/pubgo/funk/buildinfo"
VERSION:
sh: "git tag --sort=committerdate | tail -n 1"
Expand Down Expand Up @@ -70,3 +72,68 @@ tasks:
lint:
cmds:
- golangci-lint run --verbose ./...

desktop:bindings:
desc: "generate Wails bindings for desktop frontend"
dir: "{{.DesktopDir}}"
cmds:
- go run github.com/wailsapp/wails/v3/cmd/wails3@latest generate bindings -clean=true -ts -i

desktop:node:check:
desc: "check Node.js version for Vite 8 (>=20.19 or >=22.12)"
run: once
cmds:
- |
node -e '
const [maj, min] = process.versions.node.split(".").map(Number);
const ok = (maj === 20 && min >= 19) || (maj === 22 && min >= 12) || maj > 22;
if (!ok) {
console.error("Node.js " + process.versions.node + " is not supported.");
console.error("Please use Node >=20.19.0 or >=22.12.0 for Vite 8.");
process.exit(1);
}
console.log("Node.js " + process.versions.node + " OK");
'

desktop:frontend:install:
desc: "install desktop frontend dependencies"
dir: "{{.FrontendDir}}"
deps:
- desktop:node:check
cmds:
- npm install

desktop:frontend:build:
desc: "build desktop frontend assets"
dir: "{{.FrontendDir}}"
cmds:
- task: desktop:frontend:install
- task: desktop:bindings
- npm run build

desktop:test:
desc: "run desktop go tests"
dir: "{{.DesktopDir}}"
cmds:
- go test ./...

desktop:run:
desc: "run desktop app from embedded frontend dist"
dir: "{{.DesktopDir}}"
cmds:
- task: desktop:frontend:build
- go run .

desktop:dev:
desc: "run desktop app in local dev mode (no wails3 hot reload)"
dir: "{{.DesktopDir}}"
cmds:
- task: desktop:node:check
- task: desktop:frontend:build
- go run .

desktop:verify:
desc: "desktop regression baseline (build + tests)"
cmds:
- task: desktop:frontend:build
- task: desktop:test
23 changes: 23 additions & 0 deletions assets/fastgit-logo-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions assets/fastgit-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions desktop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
frontend/node_modules
58 changes: 58 additions & 0 deletions desktop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# fastgit desktop (Wails v3)

该桌面端当前采用“SDK/方法调用”模型,不再通过输入命令字符串再解析执行。
前端采用 React + feature 分层组织(参考 colanode 的 app/layout/features 结构)。

## 当前开发状态

最新进度见:

- `../docs/desktop-status.md`

当前桌面端已覆盖模块:

- repo / remote / branch / worktree / issue / pr / tag

并支持:

- 全局 project/repo 命名空间切换
- 项目默认值(base branch / remote)
- 列表页搜索、过滤、排序、批量操作
- 高风险动作 `RESET` 二次确认(force sync 类)

## Quick Tasks (from repo root)

```bash
task desktop:frontend:build
task desktop:test
task desktop:verify
task desktop:run
task desktop:dev
```

`task desktop:dev` 当前是本地开发运行(会先构建前端,然后 `go run .`),不依赖 `build/config.yml`。

## Run in dev mode

```bash
cd desktop/frontend
npm install
npm run build
cd ..
go run .
```

> 如果你本机安装了 `wails3`,也可使用 `wails3 dev`。

## Build desktop app

```bash
wails3 build
```

## 最小验证建议

1. 启动后切换不同模块,确认会自动进入对应列表页。
2. 在列表页执行搜索/过滤/排序,确认计数与详情联动。
3. 对 `强制对齐` 类动作,确认未输入 `RESET` 无法执行。
4. 配置会话 GitHub Token 后,Issue/PR 列表可正常读取。
Binary file added desktop/assets/fastgit-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions desktop/frontend/bindings/fastgitdesktop/fastgitservice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Call as $Call, CancellablePromise as $CancellablePromise } from "@wailsio/runtime";

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as $models from "./models.js";

export function GetGitHubAuthStatus(): $CancellablePromise<$models.GitHubAuthStatus> {
return $Call.ByID(2218531742);
}

export function GetModules(): $CancellablePromise<$models.DesktopModule[] | null> {
return $Call.ByID(1211788486);
}

export function GetRepoRoot(): $CancellablePromise<string> {
return $Call.ByID(853311305);
}

export function RunAction(req: $models.ActionRunRequest): $CancellablePromise<$models.CommandResult> {
return $Call.ByID(465937298, req);
}

export function SetGitHubToken(token: string): $CancellablePromise<void> {
return $Call.ByID(35429655, token);
}

export function SetRepoRoot(path: string): $CancellablePromise<void> {
return $Call.ByID(2463093517, path);
}
16 changes: 16 additions & 0 deletions desktop/frontend/bindings/fastgitdesktop/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

import * as FastgitService from "./fastgitservice.js";
export {
FastgitService
};

export type {
ActionField,
ActionRunRequest,
CommandResult,
DesktopModule,
GitHubAuthStatus,
ModuleAction
} from "./models.js";
44 changes: 44 additions & 0 deletions desktop/frontend/bindings/fastgitdesktop/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

export interface ActionField {
"key": string;
"label": string;
"placeholder": string;
"required": boolean;
"default": string;
}

export interface ActionRunRequest {
"moduleID": string;
"actionID": string;
"values": { [_ in string]?: string } | null;
}

export interface CommandResult {
"command": string;
"output": string;
"exitCode": number;
"startedAt": string;
"endedAt": string;
}

export interface DesktopModule {
"id": string;
"title": string;
"description": string;
"actions": ModuleAction[] | null;
}

export interface GitHubAuthStatus {
"configured": boolean;
"source": string;
"message": string;
}

export interface ModuleAction {
"id": string;
"title": string;
"description": string;
"fields": ActionField[] | null;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Create as $Create } from "@wailsio/runtime";

Object.freeze($Create.Events);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
1 change: 1 addition & 0 deletions desktop/frontend/dist/assets/action-dialog-CI5VSazp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import{t as e}from"./app-CCqtl2WX.js";export{e as ActionDialog};
Loading
Loading