Skip to content

Commit

Permalink
feat: try to add auto updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa committed Jun 15, 2023
1 parent 698be66 commit 91b871e
Show file tree
Hide file tree
Showing 6 changed files with 272 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ dev

# docker-compose env files
.env

*.key
*.key.pub
7 changes: 6 additions & 1 deletion app/client/api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getClientConfig } from "../config/client";
import { ACCESS_CODE_PREFIX } from "../constant";
import { ChatMessage, ModelType, useAccessStore } from "../store";
import { ChatGPTApi } from "./platforms/openai";
Expand Down Expand Up @@ -93,7 +94,11 @@ export class ClientApi {
// Please do not modify this message

console.log("[Share]", msgs);
const res = await fetch("/sharegpt", {
const clientConfig = getClientConfig();
const proxyUrl = "/sharegpt";
const rawUrl = "https://sharegpt.com/api/conversations";
const shareUrl = clientConfig?.isApp ? rawUrl : proxyUrl;
const res = await fetch(shareUrl, {
body: JSON.stringify({
avatarUrl,
items: msgs,
Expand Down
Loading

0 comments on commit 91b871e

Please sign in to comment.