mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51344ebe00 | ||
|
|
b3589257ae | ||
|
|
9c960b2a8e | ||
|
|
080a77031d | ||
|
|
71b37f690c | ||
|
|
9fa0fe8e6c | ||
|
|
1045f0a689 | ||
|
|
5062769956 | ||
|
|
b791044a22 | ||
|
|
81ff2b89f1 | ||
|
|
ee576b9a69 | ||
|
|
d7ab912917 | ||
|
|
fc74ce30ed | ||
|
|
fad7c5221b |
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -2,7 +2,6 @@ name: Release CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# Sequence of patterns matched against refs/tags
|
|
||||||
tags:
|
tags:
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
@@ -90,7 +89,7 @@ jobs:
|
|||||||
# 📝: Edit the deployment directory
|
# 📝: Edit the deployment directory
|
||||||
publish_dir: ./updater
|
publish_dir: ./updater
|
||||||
force_orphan: true
|
force_orphan: true
|
||||||
|
|
||||||
publish-winget:
|
publish-winget:
|
||||||
# Action can only be run on windows
|
# Action can only be run on windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
@@ -99,5 +98,5 @@ jobs:
|
|||||||
- uses: vedantmgoyal2009/winget-releaser@v1
|
- uses: vedantmgoyal2009/winget-releaser@v1
|
||||||
with:
|
with:
|
||||||
identifier: lencx.ChatGPT
|
identifier: lencx.ChatGPT
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.WINGET_TOKEN }}
|
||||||
version: ${{ env.version }}
|
version: ${{ env.version }}
|
||||||
|
|||||||
@@ -22,22 +22,22 @@
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
- [ChatGPT_0.8.0_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT_0.8.0_x64_en-US.msi):
|
- [ChatGPT_0.8.1_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT_0.8.1_x64_en-US.msi):
|
||||||
- 使用 [winget](https://winstall.app/apps/lencx.ChatGPT):
|
- 使用 [winget](https://winstall.app/apps/lencx.ChatGPT):
|
||||||
```bash
|
```bash
|
||||||
# install the latest version
|
# install the latest version
|
||||||
winget install --id=lencx.ChatGPT -e
|
winget install --id=lencx.ChatGPT -e
|
||||||
|
|
||||||
# install the specified version
|
# install the specified version
|
||||||
winget install --id=lencx.ChatGPT -e --version 0.8.0
|
winget install --id=lencx.ChatGPT -e --version 0.8.1
|
||||||
```
|
```
|
||||||
|
|
||||||
**注意:如果安装路径和应用名称相同,会导致冲突 ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.8.0))**
|
**注意:如果安装路径和应用名称相同,会导致冲突 ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.8.1))**
|
||||||
|
|
||||||
### Mac
|
### Mac
|
||||||
|
|
||||||
- [ChatGPT_0.8.0_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT_0.8.0_x64.dmg)
|
- [ChatGPT_0.8.1_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT_0.8.1_x64.dmg)
|
||||||
- [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT.app.tar.gz)
|
- [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT.app.tar.gz)
|
||||||
- Homebrew \
|
- Homebrew \
|
||||||
_[Homebrew 快捷安装](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
|
_[Homebrew 快捷安装](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
|
||||||
```sh
|
```sh
|
||||||
@@ -53,8 +53,8 @@
|
|||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
- [chat-gpt_0.8.0_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/chat-gpt_0.8.0_amd64.deb)
|
- [chat-gpt_0.8.1_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/chat-gpt_0.8.1_amd64.deb)
|
||||||
- [chat-gpt_0.8.0_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/chat-gpt_0.8.0_amd64.AppImage): **工作可靠,`.deb` 运行失败时可以尝试它**
|
- [chat-gpt_0.8.1_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/chat-gpt_0.8.1_amd64.AppImage): **工作可靠,`.deb` 运行失败时可以尝试它**
|
||||||
- 使用 [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin):
|
- 使用 [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin):
|
||||||
```bash
|
```bash
|
||||||
yay -S chatgpt-desktop-bin
|
yay -S chatgpt-desktop-bin
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -24,22 +24,22 @@
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
- [ChatGPT_0.8.0_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT_0.8.0_x64_en-US.msi): Direct download installer
|
- [ChatGPT_0.8.1_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT_0.8.1_x64_en-US.msi): Direct download installer
|
||||||
- Use [winget](https://winstall.app/apps/lencx.ChatGPT):
|
- Use [winget](https://winstall.app/apps/lencx.ChatGPT):
|
||||||
```bash
|
```bash
|
||||||
# install the latest version
|
# install the latest version
|
||||||
winget install --id=lencx.ChatGPT -e
|
winget install --id=lencx.ChatGPT -e
|
||||||
|
|
||||||
# install the specified version
|
# install the specified version
|
||||||
winget install --id=lencx.ChatGPT -e --version 0.8.0
|
winget install --id=lencx.ChatGPT -e --version 0.8.1
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note: If the installation path and application name are the same, it will lead to conflict ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.8.0))**
|
**Note: If the installation path and application name are the same, it will lead to conflict ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.8.1))**
|
||||||
|
|
||||||
### Mac
|
### Mac
|
||||||
|
|
||||||
- [ChatGPT_0.8.0_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT_0.8.0_x64.dmg): Direct download installer
|
- [ChatGPT_0.8.1_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT_0.8.1_x64.dmg): Direct download installer
|
||||||
- [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/ChatGPT.app.tar.gz): Download the `.app` installer
|
- [ChatGPT.app.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/ChatGPT.app.tar.gz): Download the `.app` installer
|
||||||
- Homebrew \
|
- Homebrew \
|
||||||
Or you can install with _[Homebrew](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
|
Or you can install with _[Homebrew](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
|
||||||
```sh
|
```sh
|
||||||
@@ -55,8 +55,8 @@
|
|||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
- [chat-gpt_0.8.0_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/chat-gpt_0.8.0_amd64.deb): Download `.deb` installer, advantage small size, disadvantage poor compatibility
|
- [chat-gpt_0.8.1_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/chat-gpt_0.8.1_amd64.deb): Download `.deb` installer, advantage small size, disadvantage poor compatibility
|
||||||
- [chat-gpt_0.8.0_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.8.0/chat-gpt_0.8.0_amd64.AppImage): Works reliably, you can try it if `.deb` fails to run
|
- [chat-gpt_0.8.1_amd64.AppImage](https://github.com/lencx/ChatGPT/releases/download/v0.8.1/chat-gpt_0.8.1_amd64.AppImage): Works reliably, you can try it if `.deb` fails to run
|
||||||
- Available on [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin) with the package name `chatgpt-desktop-bin`, and you can use your favourite AUR package manager to install it.
|
- Available on [AUR](https://aur.archlinux.org/packages/chatgpt-desktop-bin) with the package name `chatgpt-desktop-bin`, and you can use your favourite AUR package manager to install it.
|
||||||
|
|
||||||
<!-- download end -->
|
<!-- download end -->
|
||||||
@@ -203,7 +203,7 @@ It's safe, just a wrapper for [OpenAI ChatGPT](https://chat.openai.com) website,
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### How do i build it?
|
### How do I build it?
|
||||||
|
|
||||||
#### PreInstall
|
#### PreInstall
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# UPDATE LOG
|
# UPDATE LOG
|
||||||
|
|
||||||
|
## v0.8.1
|
||||||
|
|
||||||
|
fix:
|
||||||
|
- export button keeps blinking
|
||||||
|
- export button in the old chat does not work
|
||||||
|
- disable export sharing links because it is a security risk
|
||||||
|
|
||||||
## v0.8.0
|
## v0.8.0
|
||||||
|
|
||||||
feat:
|
feat:
|
||||||
|
|||||||
2
src-tauri/src/assets/core.js
vendored
2
src-tauri/src/assets/core.js
vendored
@@ -71,7 +71,7 @@ async function init() {
|
|||||||
|
|
||||||
document.addEventListener("click", (e) => {
|
document.addEventListener("click", (e) => {
|
||||||
const origin = e.target.closest("a");
|
const origin = e.target.closest("a");
|
||||||
if (!origin.target) return;
|
if (!origin || !origin.target) return;
|
||||||
if (origin && origin.href && origin.target !== '_self') {
|
if (origin && origin.href && origin.target !== '_self') {
|
||||||
invoke('open_link', { url: origin.href });
|
invoke('open_link', { url: origin.href });
|
||||||
}
|
}
|
||||||
|
|||||||
2
src-tauri/src/assets/dalle2.js
vendored
2
src-tauri/src/assets/dalle2.js
vendored
@@ -3,7 +3,7 @@
|
|||||||
async function init() {
|
async function init() {
|
||||||
document.addEventListener("click", (e) => {
|
document.addEventListener("click", (e) => {
|
||||||
const origin = e.target.closest("a");
|
const origin = e.target.closest("a");
|
||||||
if (!origin.target) return;
|
if (!origin || !origin.target) return;
|
||||||
if (origin && origin.href && origin.target !== '_self') {
|
if (origin && origin.href && origin.target !== '_self') {
|
||||||
if (/\/(login|signup)$/.test(window.location.href)) {
|
if (/\/(login|signup)$/.test(window.location.href)) {
|
||||||
origin.target = '_self';
|
origin.target = '_self';
|
||||||
|
|||||||
46
src-tauri/src/assets/export.js
vendored
46
src-tauri/src/assets/export.js
vendored
@@ -24,7 +24,7 @@ async function init() {
|
|||||||
} else if (shouldRemoveButtons()) {
|
} else if (shouldRemoveButtons()) {
|
||||||
removeButtons();
|
removeButtons();
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Format = {
|
const Format = {
|
||||||
@@ -47,9 +47,16 @@ function shouldRemoveButtons() {
|
|||||||
function shouldAddButtons(actionsArea) {
|
function shouldAddButtons(actionsArea) {
|
||||||
// first, check if there's a "Try Again" button and no other buttons
|
// first, check if there's a "Try Again" button and no other buttons
|
||||||
const buttons = actionsArea.querySelectorAll("button");
|
const buttons = actionsArea.querySelectorAll("button");
|
||||||
|
|
||||||
const hasTryAgainButton = Array.from(buttons).some((button) => {
|
const hasTryAgainButton = Array.from(buttons).some((button) => {
|
||||||
return !button.id?.includes("download");
|
return !button.id?.includes("download");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// fix: https://github.com/lencx/ChatGPT/issues/189
|
||||||
|
if (buttons.length === 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (hasTryAgainButton && buttons.length === 1) {
|
if (hasTryAgainButton && buttons.length === 1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -106,16 +113,18 @@ function addActionsButtons(actionsArea, TryAgainButton) {
|
|||||||
downloadThread({ as: Format.PDF });
|
downloadThread({ as: Format.PDF });
|
||||||
};
|
};
|
||||||
actionsArea.appendChild(downloadPdfButton);
|
actionsArea.appendChild(downloadPdfButton);
|
||||||
const exportHtml = TryAgainButton.cloneNode(true);
|
|
||||||
exportHtml.id = "download-html-button";
|
// fix: https://github.com/lencx/ChatGPT/issues/126
|
||||||
downloadButton.setAttribute("share-ext", "true");
|
// const exportHtml = TryAgainButton.cloneNode(true);
|
||||||
// exportHtml.innerText = "Share Link";
|
// exportHtml.id = "download-html-button";
|
||||||
exportHtml.title = "Share Link";
|
// downloadButton.setAttribute("share-ext", "true");
|
||||||
exportHtml.innerHTML = setIcon('link');
|
// // exportHtml.innerText = "Share Link";
|
||||||
exportHtml.onclick = () => {
|
// exportHtml.title = "Share Link";
|
||||||
sendRequest();
|
// exportHtml.innerHTML = setIcon('link');
|
||||||
};
|
// exportHtml.onclick = () => {
|
||||||
actionsArea.appendChild(exportHtml);
|
// sendRequest();
|
||||||
|
// };
|
||||||
|
// actionsArea.appendChild(exportHtml);
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadThread({ as = Format.PNG } = {}) {
|
function downloadThread({ as = Format.PNG } = {}) {
|
||||||
@@ -175,12 +184,27 @@ class Elements {
|
|||||||
this.thread = document.querySelector(
|
this.thread = document.querySelector(
|
||||||
"[class*='react-scroll-to-bottom']>[class*='react-scroll-to-bottom']>div"
|
"[class*='react-scroll-to-bottom']>[class*='react-scroll-to-bottom']>div"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// fix: old chat https://github.com/lencx/ChatGPT/issues/185
|
||||||
|
if (!this.thread) {
|
||||||
|
this.thread = document.querySelector(
|
||||||
|
"main .overflow-y-auto"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// h-full overflow-y-auto
|
||||||
this.positionForm = document.querySelector("form").parentNode;
|
this.positionForm = document.querySelector("form").parentNode;
|
||||||
// this.styledThread = document.querySelector("main");
|
// this.styledThread = document.querySelector("main");
|
||||||
// this.threadContent = document.querySelector(".gAnhyd");
|
// this.threadContent = document.querySelector(".gAnhyd");
|
||||||
this.scroller = Array.from(
|
this.scroller = Array.from(
|
||||||
document.querySelectorAll('[class*="react-scroll-to"]')
|
document.querySelectorAll('[class*="react-scroll-to"]')
|
||||||
).filter((el) => el.classList.contains("h-full"))[0];
|
).filter((el) => el.classList.contains("h-full"))[0];
|
||||||
|
|
||||||
|
// fix: old chat
|
||||||
|
if (!this.scroller) {
|
||||||
|
this.scroller = document.querySelector('main .overflow-y-auto');
|
||||||
|
}
|
||||||
|
|
||||||
this.hiddens = Array.from(document.querySelectorAll(".overflow-hidden"));
|
this.hiddens = Array.from(document.querySelectorAll(".overflow-hidden"));
|
||||||
this.images = Array.from(document.querySelectorAll("img[srcset]"));
|
this.images = Array.from(document.querySelectorAll("img[srcset]"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "ChatGPT",
|
"productName": "ChatGPT",
|
||||||
"version": "0.8.0"
|
"version": "0.8.1"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
|||||||
Reference in New Issue
Block a user