-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 569fe3f
Showing
73 changed files
with
14,088 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PASSWORD= | ||
OPENAI_API_KEY= | ||
LANGUAGE=en | ||
OPENAI_API_BASE_URL=api.openai.com | ||
API_KEY_STRATEGY=random | ||
LOCAL_PROXY= | ||
DISABLE_LOCAL_PROXY= | ||
DISCORD_SERVER_ID= | ||
DISCORD_CHANNEL_ID= | ||
DISCORD_TOKEN= |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"commonjs": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": ["eslint:recommended", "airbnb-base", "prettier"], | ||
"plugins": ["import", "prettier"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"import/no-unresolved": 0, | ||
"import/extensions": 0, | ||
"import/prefer-default-export": 0, | ||
"import/no-extraneous-dependencies": 0, | ||
"no-await-in-loop": 0, | ||
"no-continue": 0, | ||
"no-promise-executor-return": 0 | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.astro"], | ||
"extends": ["plugin:astro/recommended"], | ||
"plugins": ["astro"], | ||
"parser": "astro-eslint-parser" | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:react-hooks/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"plugins": ["@typescript-eslint", "react"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 2021 | ||
}, | ||
"rules": { | ||
"react-hooks/exhaustive-deps": 0, | ||
"react/no-unescaped-entities": 0, | ||
"react/jsx-filename-extension": [1, { "extensions": [".jsx", ".tsx"] }] | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.js text eol=lf | ||
*.ts text eol=lf | ||
*.tsx text eol=lf | ||
*.css text eol=lf | ||
*.astro text eol=lf | ||
*.json text eol=lf | ||
|
||
public/** linguist-vendored |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
|
||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
lintcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install | ||
run: pnpm install --ignore-scripts | ||
|
||
- name: Lint | ||
run: pnpm run lintcheck | ||
|
||
typecheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install | ||
run: pnpm install --ignore-scripts | ||
|
||
- name: Typecheck | ||
run: pnpm run typecheck | ||
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
timeout-minutes: 10 | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node_version: [18] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set node version to ${{ matrix.node_version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
|
||
- name: Install | ||
run: pnpm install --ignore-scripts | ||
|
||
- name: Build | ||
run: pnpm run build | ||
|
||
build-vercel: | ||
runs-on: ${{ matrix.os }} | ||
|
||
timeout-minutes: 10 | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node_version: [18] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set node version to ${{ matrix.node_version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
|
||
- name: Install | ||
run: pnpm install --ignore-scripts | ||
|
||
- name: Build Vercel | ||
run: pnpm run build-vercel |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Upstream Sync | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # every day | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync_latest_from_upstream: | ||
name: Sync latest commits from upstream repo | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.repository.fork }} | ||
|
||
steps: | ||
# Step 1: run a standard checkout action | ||
- name: Checkout target repo | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: run the sync action | ||
- name: Sync upstream changes | ||
id: sync | ||
uses: aormsby/[email protected] | ||
with: | ||
upstream_sync_repo: GPTGenius/chatgpt-vercel | ||
upstream_sync_branch: main | ||
target_sync_branch: main | ||
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set | ||
|
||
# Set test_mode true to run tests instead of the true action!! | ||
test_mode: false | ||
|
||
- name: Sync check | ||
if: failure() | ||
run: | | ||
echo "::error::由于权限不足,导致同步失败(这是预期的行为),请前往仓库首页手动执行[Sync fork]。" | ||
echo "::error::Due to insufficient permissions, synchronization failed (as expected). Please go to the repository homepage and manually perform [Sync fork]." | ||
exit 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# build output | ||
dist/ | ||
.vercel/ | ||
|
||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
registry = https://registry.npmjs.org | ||
auto-install-peers=true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true, | ||
"plugins": ["./node_modules/prettier-plugin-astro"], | ||
"overrides": [ | ||
{ | ||
"files": "*.astro", | ||
"options": { | ||
"parser": "astro" | ||
} | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 GPTGenius | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.