Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
d46bb7c
`update`: bump update-tag action to version 1.1.6 for improved functi…
Magic-Xin Aug 1, 2025
496724d
update: bump actions/checkout to version 5
Magic-Xin Aug 22, 2025
aa9c43f
update: refactor AISummarize methods and implement new WbiKeys struct…
Magic-Xin Aug 22, 2025
e7baa50
update: enhance AISummarize with login info persistence and retrieval
Magic-Xin Aug 22, 2025
cce29d6
update: modify request headers
Magic-Xin Aug 22, 2025
9dd58b2
update: bump dependencies
Magic-Xin Aug 22, 2025
7913079
update: reorder import statements and bump module dependencies
Magic-Xin Sep 5, 2025
79ede02
update: modify image generation endpoint for flash image preview
Magic-Xin Sep 5, 2025
8f96cc4
update: bump module dependencies to latest versions
Magic-Xin Oct 1, 2025
8d916ba
update: bump module dependencies to latest versions
Magic-Xin Oct 10, 2025
314ea9e
update: implement custom UnmarshalJSON for MessageStruct to handle va…
Magic-Xin Oct 10, 2025
c3cef1f
update: upgrade Go setup action to version 6 in CI configuration
Magic-Xin Oct 10, 2025
2bb7ada
update: upgrade UPX to version 5.0.2 in CI configuration
Magic-Xin Oct 10, 2025
81de414
update: bump dependencies for utls and genai to latest versions
Magic-Xin Oct 14, 2025
e4e493a
update: enhance image handling by validating URL before conversion to…
Magic-Xin Oct 14, 2025
744a3c0
update: recommend NapCatQQ as the OneBot server in README
Magic-Xin Oct 14, 2025
4e2e948
update: bump module dependencies to latest versions
Magic-Xin Nov 23, 2025
8fa03d7
update: update gemini model version
Magic-Xin Nov 23, 2025
951dbbc
update: bump go-sqlite3 and genai dependencies to latest versions
Magic-Xin Dec 4, 2025
41d8916
fix: correct nil check condition in ReceiveAll method
Magic-Xin Dec 4, 2025
48639b7
fix: add error logging for SaveLoginInfo method
Magic-Xin Dec 4, 2025
cb7e0fc
fix: simplify nil check for Cookies in LoadLoginInfo method
Magic-Xin Dec 4, 2025
b46d099
fix: refactor stid checks in Summarize method for clarity
Magic-Xin Dec 4, 2025
5cec9c3
fix: ensure proper goroutine completion in picSearch method
Magic-Xin Dec 4, 2025
b3ff811
fix: remove unnecessary return statements
Magic-Xin Dec 4, 2025
efed3d3
fix: replace nil panic with error in config initialization
Magic-Xin Dec 4, 2025
6fb75f2
fix: refactor SendPoke method to use switch statement for message typ…
Magic-Xin Dec 4, 2025
7e81d42
fix: improve variable handling in toString method for CQCode
Magic-Xin Dec 4, 2025
c9a965d
fix: refactor ReceiveMessage method to use switch statement for comma…
Magic-Xin Dec 4, 2025
6f9c31e
fix: remove unnecessary return statements
Magic-Xin Dec 4, 2025
528ac56
fix: add font file extensions to .gitignore
Magic-Xin Dec 4, 2025
8bc39df
feat: add statics plugin for group chat statistics and visualization
Magic-Xin Dec 4, 2025
9c738fd
fix: Implement structural updates and optimizations in the codebase
Magic-Xin Dec 4, 2025
209ef30
fix: enable CGO for all platforms in build configurations and remove …
Magic-Xin Dec 4, 2025
d48fdb6
fix: update CI workflows to dynamically set runner environments and r…
Magic-Xin Dec 4, 2025
47181e8
fix: specify Go version from go.mod in CI workflow
Magic-Xin Dec 4, 2025
e07064e
fix: update Go version in go.mod and disable caching in CI workflow
Magic-Xin Dec 4, 2025
8c06c65
fix: adjust UPX setup and compression conditions for Linux only
Magic-Xin Dec 4, 2025
329948d
fix: add installation of build dependencies for Linux in CI workflow
Magic-Xin Dec 4, 2025
6745a33
fix: correct condition for installing dependencies in CI workflow for…
Magic-Xin Dec 4, 2025
81e5206
fix: update CI workflow to include multiple architectures and runners…
Magic-Xin Dec 4, 2025
7bc9765
fix: remove unnecessary gcc-multilib and g++-multilib installation fr…
Magic-Xin Dec 4, 2025
f659f48
fix: remove ARM64 Windows runner from CI workflow
Magic-Xin Dec 4, 2025
5225ffd
fix: update CI workflow to use specific Ubuntu versions for Linux run…
Magic-Xin Dec 4, 2025
1b983ed
feat: Add Jieba dictionary files and update tokenizer initialization
Magic-Xin Dec 4, 2025
7d8aa69
refactor: enhance stop words handling by allowing custom dictionary f…
Magic-Xin Dec 5, 2025
1e2e849
refactor: improve word frequency cleaning by normalizing words and fi…
Magic-Xin Dec 5, 2025
1575574
refactor: enhance word normalization by filtering out short words
Magic-Xin Dec 5, 2025
3b23920
fix: update dependencies to latest versions in go.mod and go.sum
Magic-Xin Dec 11, 2025
008c34a
feat: add default stop words to improve text processing
Magic-Xin Dec 11, 2025
96c5375
update: bump google.golang.org/genproto and google.golang.org/protobu…
Magic-Xin Dec 15, 2025
a11847d
feat: add additional stop words to enhance text processing
Magic-Xin Dec 15, 2025
c21d1e0
refactor: update Gemini command mappings for improved functionality
Magic-Xin Dec 22, 2025
481fbe1
update: bump dependencies to latest versions
Magic-Xin Dec 22, 2025
1030f33
update: bump dependencies to latest versions
Magic-Xin Dec 22, 2025
e17dabd
update: bump Go version and update dependencies
Magic-Xin Feb 26, 2026
eaeaed0
update: bump Go version and update dependencies
Magic-Xin Apr 6, 2026
44b8b95
feat: add debug checks for user permissions in message processing
Magic-Xin Apr 6, 2026
7e94558
update: bump dependencies to latest versions
Magic-Xin May 6, 2026
e7da270
fix: update Gemini command mappings for version consistency
Magic-Xin May 6, 2026
53ec9ab
Update Gemini version in chatai.go
Magic-Xin Jun 19, 2026
0cf7934
refactor: streamline plugin initialization and message handling
Magic-Xin Jul 14, 2026
2d58f11
Allow ascii2d media handling in session requests
Magic-Xin Jul 14, 2026
a2775d9
fix: disable media in ascii2d browser requests
Magic-Xin Jul 16, 2026
8dd8de7
refactor: require CGO tokenizer implementation
Magic-Xin Jul 16, 2026
bb672ca
refactor: modernize runtime and plugin lifecycle
Magic-Xin Jul 16, 2026
f81d2cc
feat: add Google Lens image search support
Magic-Xin Jul 16, 2026
f6431f8
Merge pull request #47 from Magic-Xin/dev-refactor
Magic-Xin Jul 16, 2026
a716641
feat: add CloudflareBypassForScraping support for ascii2d
Magic-Xin Jul 16, 2026
809654a
feat: add SoutuBot image search support
Magic-Xin Jul 21, 2026
d45631f
update: upgrade Go dependencies
Magic-Xin Jul 21, 2026
af4b17f
fix: avoid picsearch cache key collisions
Magic-Xin Jul 21, 2026
ebe1f18
fix: space SoutuBot result lines
Magic-Xin Jul 21, 2026
87d3551
refactor: remove FlareSolverr fallback
Magic-Xin Jul 21, 2026
c4fddf5
docs: simplify README setup guidance
Magic-Xin Jul 21, 2026
1e7865c
update: use Gemini 3.6 Flash
Magic-Xin Jul 26, 2026
59fc0b9
update: upgrade Go dependencies
Magic-Xin Jul 26, 2026
9a27a89
ci: enable Go dependency caching
Magic-Xin Jul 26, 2026
5cd6236
chore: ignore Codex metadata
Magic-Xin Jul 26, 2026
e6af525
feat: add encrypted JM PDF downloads
Magic-Xin Jul 26, 2026
40bf89a
fix: adjust JM command responses
Magic-Xin Jul 27, 2026
836527f
fix: enrich JM download progress
Magic-Xin Jul 28, 2026
4e5bfc5
fix: update SoutuBot client for current search API
Magic-Xin Sep 22, 2026
6743f96
fix: enable Gemini grounding tools for text models
Magic-Xin Sep 22, 2026
b8d3b3a
fix: filter short tokens and stop words in statistics
Magic-Xin Sep 22, 2026
d1b6b45
chore: update Go module dependencies
Magic-Xin Sep 22, 2026
c187e67
chore: update Go module checksums
Magic-Xin Sep 22, 2026
92af28d
chore: switch Gemini Flash to 3.8
Magic-Xin Sep 22, 2026
e252e1d
fix: build self-contained native release archives
Magic-Xin Sep 22, 2026
9aecbba
Fix development and release workflows
Magic-Xin Sep 22, 2026
3db04e1
Merge main into dev, keep validated workflows
Magic-Xin Sep 22, 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
172 changes: 78 additions & 94 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,133 +6,117 @@ on:
branches:
- "dev"

permissions:
contents: read

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

env:
COMMIT_ID: "${{ github.sha }}"
NAME: MacArthurGo
CGO_ENABLED: 0

jobs:
Build:
name: Build binary CI
runs-on: ubuntu-latest
build:
name: Build ${{ matrix.goos }}-${{ matrix.goarch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
goos: [ linux, windows, darwin, android ]
goarch: [ "386", amd64, arm64 ]
exclude:
include:
- goos: linux
goarch: amd64
runner: ubuntu-22.04
- goos: linux
goarch: arm64
runner: ubuntu-22.04-arm
- goos: darwin
goarch: amd64
runner: macos-15-intel
- goos: darwin
goarch: "386"
- goos: android
goarch: "386"
- goos: android
goarch: arm64
runner: macos-latest
- goos: windows
goarch: amd64
runner: windows-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7

- name: Set Environment
- name: Install Linux C++ toolchain
if: matrix.goos == 'linux'
run: |
mkdir -p bin
echo "SHASHORT=$(git rev-parse --short "${{ env.COMMIT_ID }}")" >> "$GITHUB_ENV"
echo "BUILDTIME=$(date +'%Y-%m-%dT%H:%M:%SZ' -u)" >> $GITHUB_ENV
sudo apt-get update
sudo apt-get install -y build-essential

- name: Set LDFLAGS
run: |
echo "LDFLAGS=-w -s -X 'MacArthurGo/base.Version=${SHASHORT}' -X 'MacArthurGo/base.Branch=Beta/dev' -X 'MacArthurGo/base.BuildTime=${{ env.BUILDTIME }}'" >> $GITHUB_ENV
- name: Install Make on Windows
if: matrix.goos == 'windows'
shell: pwsh
run: choco install make --yes --no-progress

- name: Setup UPX
run: |
cd ..
wget https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-amd64_linux.tar.xz
tar xf upx-4.2.2-amd64_linux.tar.xz
echo "upx=../upx-4.2.2-amd64_linux/upx" >> $GITHUB_ENV
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Set up Go
uses: actions/setup-go@v5
- name: Test
if: matrix.goos == 'linux' && matrix.goarch == 'amd64'
run: go test ./...

- name: Build
- name: Build and package
shell: bash
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
go build -ldflags="${LDFLAGS}" -o bin/${{ env.NAME }}-${{ matrix.goos }}-${{ matrix.goarch }} ./
chmod +x bin/${{ env.NAME }}-*
run: make package VERSION="${GITHUB_SHA:0:7}" BRANCH=Beta/dev

- name: Rename Windows
if: ${{ matrix.goos == 'windows' }}
run: |
mv MacArthurGo-windows-${{ matrix.goarch }} MacArthurGo-windows-${{ matrix.goarch }}.exe
working-directory: bin

- name: UPX Compress
if: ${{ matrix.goos != 'darwin' }}
run: |
if [ ${{ matrix.goos }} != "windows" ] && [ ${{ matrix.goarch }} != "arm64" ]; then ${{ env.upx }} --lzma --best bin/${{ env.NAME }}-*; fi

- name: Upload To Artifact
if: ${{ success() }}
uses: actions/upload-artifact@main
- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.goos }}-${{ matrix.goarch }}-${{ env.SHASHORT }}
path: |
bin/*
name: ${{ matrix.goos }}-${{ matrix.goarch }}
path: out/MacArthurGo-${{ matrix.goos }}-${{ matrix.goarch }}.*
if-no-files-found: error

Upload-Prerelease:
permissions: write-all
needs: [Build]
upload-prerelease:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/download-artifact@main
with:
path: bin/

- name: Display structure of downloaded files
run: ls -R
working-directory: bin
- uses: actions/checkout@v7

- name: Delete current release assets
uses: 8Mi-Tech/delete-release-assets-action@main
- uses: actions/download-artifact@v8
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: Prerelease-${{ github.ref_name }}
deleteOnlyFromDrafts: false
path: out
merge-multiple: true

- name: Set Env
run: |
echo "UPLOADTIME=$(date +'%Y-%m-%dT%H:%M:%SZ' -u)" >> $GITHUB_ENV
- name: Prepare prerelease files
shell: bash
run: |
upload_time="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
printf '{"version":"%s","upload_time":"%s"}\n' "$GITHUB_SHA" "$upload_time" > out/version.json
printf 'Release created at %s\nCommit: %s\nLatest build from %s\n' "$upload_time" "$GITHUB_SHA" "$GITHUB_REF_NAME" > release.txt

- name: Tag Repo
uses: richardsimko/update-tag@v1.1.6
- name: Update prerelease tag
uses: richardsimko/update-tag@v3
with:
tag_name: Prerelease-${{ github.ref_name }}
github_token: ${{ github.token }}

- name: Remove old prerelease assets
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: |
cat > release.txt << 'EOF'
Release created at ${{ env.UPLOADTIME }}
Commit: ${{ env.COMMIT_ID }}
Synchronize ${{ github.ref_name }} branch code updates, keeping only the latest version
EOF

- run: |
cat > version.json << 'EOF'
{"version": "${{ env.COMMIT_ID }}", "upload_time": "${{ env.UPLOADTIME }}"}
EOF
working-directory: bin

- name: Upload Prerelease
uses: softprops/action-gh-release@v2
if: ${{ success() }}
GH_TOKEN: ${{ github.token }}
run: |
tag="Prerelease-${GITHUB_REF_NAME}"
if gh release view "$tag" >/dev/null 2>&1; then
while IFS= read -r asset; do
gh release delete-asset "$tag" "$asset" --yes
done < <(gh release view "$tag" --json assets --jq '.assets[].name')
fi

- name: Upload prerelease
uses: softprops/action-gh-release@v3
with:
tag_name: Prerelease-${{ github.ref_name }}
files: |
bin/*
bin/*/*
files: out/*
prerelease: true
generate_release_notes: true
body_path: release.txt
body_path: release.txt
fail_on_unmatched_files: true
overwrite_files: true
110 changes: 80 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Build Release

on:
Expand All @@ -9,36 +6,89 @@ on:
tags:
- "v*.*.*"

permissions:
contents: read

jobs:
build:
name: Build ${{ matrix.goos }}-${{ matrix.goarch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
runner: ubuntu-22.04
- goos: linux
goarch: arm64
runner: ubuntu-22.04-arm
- goos: darwin
goarch: amd64
runner: macos-15-intel
- goos: darwin
goarch: arm64
runner: macos-latest
- goos: windows
goarch: amd64
runner: windows-latest
steps:
- uses: actions/checkout@v7

- name: Install Linux C++ toolchain
if: matrix.goos == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential

- name: Install Make on Windows
if: matrix.goos == 'windows'
shell: pwsh
run: choco install make --yes --no-progress

- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Test
if: matrix.goos == 'linux' && matrix.goarch == 'amd64'
run: go test ./...

- name: Build and package
shell: bash
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
VERSION: ${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
run: make package

- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.goos }}-${{ matrix.goarch }}
path: out/MacArthurGo-${{ matrix.goos }}-${{ matrix.goarch }}.*
if-no-files-found: error

upload-release:
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@v5

- name: Setup UPX
run: |
cd ..
wget https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-amd64_linux.tar.xz
tar xf upx-4.2.2-amd64_linux.tar.xz
echo "upx=../upx-4.2.2-amd64_linux/upx" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v5

- name: Build
run: |
mkdir bin
mkdir out
make releases

- name: Upload To Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body: New Release.
files: |
out/*.tar.gz
out/*.zip
config.json.default
- uses: actions/download-artifact@v8
with:
path: out
merge-multiple: true

- name: Create checksums
run: |
cd out
sha256sum MacArthurGo-* > SHA256SUMS

- name: Upload release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
fail_on_unmatched_files: true
files: out/*
32 changes: 20 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
### Example user template template
### Example user template

# IntelliJ project files
.idea
*.iml
out
gen
### Go template
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
Expand All @@ -20,20 +11,37 @@ gen
# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
# Code coverage profiles and other test artifacts
*.out
coverage.*
*.coverprofile
profile.cov

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work
go.work.sum

# env file
.env

# Editor/IDE
.idea/
.vscode/

*.json
MacArthurGo
log/*
log/
*.log
*.db
img_cache/*
data/jm/
TODO.md
.DS_Store
.DS_Store
*.ttf
*.otf
AGENTS.md
.agents/
.codex/
Loading
Loading