diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml new file mode 100644 index 0000000..7c66c01 --- /dev/null +++ b/.github/workflows/release-windows.yml @@ -0,0 +1,45 @@ +name: Release Windows + +on: + push: + tags: + - 'v*.*.*' + +env: + NODE_VERSION: 20 + PNPM_VERSION: 10.32.1 + +jobs: + release: + runs-on: windows-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Verify tag matches package version + shell: bash + run: | + VERSION="$(node -p "JSON.parse(require('node:fs').readFileSync('package.json', 'utf8')).version")" + if [[ "v${VERSION}" != "${GITHUB_REF_NAME}" ]]; then + echo "Tag ${GITHUB_REF_NAME} does not match package.json version ${VERSION}" >&2 + exit 1 + fi + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Build app + run: pnpm build + - name: Build Windows release artifacts + run: pnpm exec node ./scripts/run-electron-builder.cjs --win nsis --x64 --arm64 --publish never + - name: Publish GitHub release + uses: softprops/action-gh-release@v2 + with: + files: | + dist/*.exe + dist/*.exe.blockmap + dist/latest.yml diff --git a/electron-builder.yml b/electron-builder.yml index 458c209..50173a6 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -34,8 +34,14 @@ dmg: type: link path: /Applications win: + icon: resources/icon.ico + artifactName: Agent-Trace-${version}-${arch}.${ext} target: - nsis +nsis: + oneClick: false + allowToChangeInstallationDirectory: true + deleteAppDataOnUninstall: true linux: target: - AppImage diff --git a/package.json b/package.json index 364386d..d6a5d9a 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "pack": "pnpm build && node ./scripts/run-electron-builder.cjs --dir", "dist": "pnpm build && node ./scripts/run-electron-builder.cjs", "dist:mac": "pnpm build && node ./scripts/run-electron-builder.cjs --mac", + "dist:win": "pnpm build && node ./scripts/run-electron-builder.cjs --win", "release:mac": "bash ./scripts/release.sh", "preview": "electron-vite preview", "typecheck": "tsc --noEmit && tsc -p tsconfig.node.json --noEmit", diff --git a/resources/icon.icns b/resources/icon.icns index 100b47a..259890f 100644 Binary files a/resources/icon.icns and b/resources/icon.icns differ diff --git a/resources/icon.ico b/resources/icon.ico new file mode 100644 index 0000000..32d376a Binary files /dev/null and b/resources/icon.ico differ diff --git a/resources/icon.png b/resources/icon.png index fe08369..d94511d 100644 Binary files a/resources/icon.png and b/resources/icon.png differ diff --git a/resources/icon.svg b/resources/icon.svg index 9892c27..cd0015a 100644 --- a/resources/icon.svg +++ b/resources/icon.svg @@ -1,38 +1,5 @@ - + \ No newline at end of file diff --git a/src/main/index.ts b/src/main/index.ts index 475ea8e..1b5b22b 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -26,6 +26,7 @@ function createWindow(): void { minHeight: 600, titleBarStyle: "hiddenInset", trafficLightPosition: { x: 12, y: 11 }, + autoHideMenuBar: process.platform === "win32", webPreferences: { preload: join(__dirname, "../preload/index.js"), contextIsolation: true, diff --git a/src/main/update/update-service.ts b/src/main/update/update-service.ts index 5acce13..e61098e 100644 --- a/src/main/update/update-service.ts +++ b/src/main/update/update-service.ts @@ -102,7 +102,7 @@ export function createUpdateService({ isPackaged = false, }: CreateUpdateServiceOptions): UpdateService { const listeners = new Set<(state: UpdateState) => void>(); - const supported = platform === "darwin" && isPackaged; + const supported = (platform === "darwin" || platform === "win32") && isPackaged; let state = createDefaultUpdateState( currentVersion, supported ? null : UNSUPPORTED_AUTO_UPDATE_MESSAGE, diff --git a/src/renderer/src/components/content-block.tsx b/src/renderer/src/components/content-block.tsx index 546783b..f2de611 100644 --- a/src/renderer/src/components/content-block.tsx +++ b/src/renderer/src/components/content-block.tsx @@ -14,7 +14,7 @@ export function ContentBlock({ block }: ContentBlockProps) { const text = block.text ?? ""; return ( -
+
{content}
+
{section.text}
);
diff --git a/src/renderer/src/components/tools-view.tsx b/src/renderer/src/components/tools-view.tsx
index 52d7be8..5cfb4ea 100644
--- a/src/renderer/src/components/tools-view.tsx
+++ b/src/renderer/src/components/tools-view.tsx
@@ -111,7 +111,7 @@ function ToolItem({ tool, rawMode }: { tool: NormalizedTool; rawMode: boolean })
Description
{children};
},
a: ({ node, ...props }) => ,
- ul: ({ node, ...props }) =>