Skip to content

Commit 91b871e

Browse files
committed
feat: try to add auto updater
1 parent 698be66 commit 91b871e

File tree

6 files changed

+272
-3
lines changed

6 files changed

+272
-3
lines changed

.github/workflows/app.yml

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
- uses: tauri-apps/tauri-action@v0
6161
env:
6262
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
6364
with:
6465
releaseId: ${{ needs.create-release.outputs.release_id }}
6566

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ dev
4141

4242
# docker-compose env files
4343
.env
44+
45+
*.key
46+
*.key.pub

app/client/api.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { getClientConfig } from "../config/client";
12
import { ACCESS_CODE_PREFIX } from "../constant";
23
import { ChatMessage, ModelType, useAccessStore } from "../store";
34
import { ChatGPTApi } from "./platforms/openai";
@@ -93,7 +94,11 @@ export class ClientApi {
9394
// Please do not modify this message
9495

9596
console.log("[Share]", msgs);
96-
const res = await fetch("/sharegpt", {
97+
const clientConfig = getClientConfig();
98+
const proxyUrl = "/sharegpt";
99+
const rawUrl = "https://sharegpt.com/api/conversations";
100+
const shareUrl = clientConfig?.isApp ? rawUrl : proxyUrl;
101+
const res = await fetch(shareUrl, {
97102
body: JSON.stringify({
98103
avatarUrl,
99104
items: msgs,

0 commit comments

Comments
 (0)