Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI fixes & improvments #76

Open
wants to merge 69 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
c53e232
Update README.md
josStorer Mar 15, 2023
832a040
feat: make the chat body resizable (#1)
josStorer Mar 15, 2023
617330d
release v2.0.1
github-actions[bot] Mar 15, 2023
7d8706b
fix: repeat rendering (#3)
josStorer Mar 16, 2023
705b960
chore: add resultsContainerQuery for siteAdapters
josStorer Mar 16, 2023
c6caf56
feat: dynamic max-height and width (#1)
josStorer Mar 16, 2023
48c2618
feat: stop generating answers
josStorer Mar 16, 2023
1ce1851
feat: auto scroll to bottom when submitting a question or finishing a…
josStorer Mar 16, 2023
b7c390f
release v2.0.2
github-actions[bot] Mar 16, 2023
ec7eabc
Update README.md
josStorer Mar 16, 2023
6c3fd11
Update README.md
josStorer Mar 16, 2023
68f8f00
feat: improve mobile support
josStorer Mar 16, 2023
b7af995
feat: code explain for selection tools
josStorer Mar 16, 2023
fd7388d
update readme
josStorer Mar 16, 2023
9517772
feat: lockWhenAnswer config (#5)
josStorer Mar 16, 2023
a26c78e
release v2.0.3
github-actions[bot] Mar 16, 2023
858469a
Update issue templates
josStorer Mar 16, 2023
87c81ed
Update README.md
josStorer Mar 16, 2023
025e915
chore: improve mobile selection
josStorer Mar 17, 2023
d8e02d1
chore: improve for reddit
josStorer Mar 17, 2023
97a853f
chore: improve for youtube
josStorer Mar 17, 2023
a1e36fe
chore: improve for youtube
josStorer Mar 17, 2023
9f8403c
chore: inline svg to save traffic
josStorer Mar 17, 2023
79a1628
release v2.0.4
github-actions[bot] Mar 17, 2023
0a0299c
style: fix markdown ol item style (#12)
josStorer Mar 17, 2023
45f48ee
Update README.md
josStorer Mar 17, 2023
eb9eadd
docu: readme in zh
josStorer Mar 18, 2023
fa13ace
docu: readme in zh
josStorer Mar 18, 2023
8777140
docu: readme in zh
josStorer Mar 18, 2023
699d36a
feat: support RTL text (#6)
josStorer Mar 18, 2023
cadc83a
fix: avoid conflicts of same classname on some websites
josStorer Mar 18, 2023
7181541
chore
josStorer Mar 18, 2023
fa572eb
build: yarn build support
josStorer Mar 19, 2023
a10c53e
chore: upgrade packages
josStorer Mar 19, 2023
deceb06
chore: improve compatibility for upgraded packages
josStorer Mar 19, 2023
5a3c4dd
chore: improve for github (#7)
josStorer Mar 19, 2023
d163103
chore: mount retry (#9)
josStorer Mar 19, 2023
66c4c8e
release v2.0.5
github-actions[bot] Mar 19, 2023
8d7f239
update readme
josStorer Mar 19, 2023
3d5c8cd
feat: support gpt-4 (#22)
josStorer Mar 19, 2023
6e167aa
update readme
josStorer Mar 19, 2023
9d8ebef
chore: version compatibility
josStorer Mar 19, 2023
bffff55
chore: setIsReady when port disconnect
josStorer Mar 19, 2023
94aa37c
feat: support for stackoverflow
josStorer Mar 19, 2023
ce05b30
feat: direct translation and bidi translation
josStorer Mar 19, 2023
556268a
release v2.0.6
github-actions[bot] Mar 19, 2023
a70f8a7
update readme
josStorer Mar 19, 2023
b193b31
chore: improve compatibility for firefox
josStorer Mar 19, 2023
ea26a8c
chore: reduce bundle size
josStorer Mar 19, 2023
bde7854
fix: custom input for any element and mount query
josStorer Mar 20, 2023
94ce308
build: release minimal bundle
josStorer Mar 20, 2023
18b7db2
fix: words get cut off (#30, #35)
josStorer Mar 20, 2023
d1c0330
chore: improve compatibility for firefox (#38)
josStorer Mar 20, 2023
3f51b5a
feat: overview for zhihu answers (#18)
josStorer Mar 20, 2023
a5daacf
remove additional statement of zh
josStorer Mar 20, 2023
b5026cd
feat: make floating window of selectionTools dockable
josStorer Mar 20, 2023
f81cfbd
release v2.0.7
github-actions[bot] Mar 20, 2023
9befe11
fix: don't break words (fix #30) (#45)
victor141516 Mar 21, 2023
d095ba0
feat: make the floating selectionTools follow the scrolling, while th…
josStorer Mar 21, 2023
1a45c76
release v2.0.8
github-actions[bot] Mar 21, 2023
519550f
feat: offline/self-hosted large language model support (#11)
josStorer Mar 22, 2023
15e185d
release v2.1.0
github-actions[bot] Mar 22, 2023
9cddbc4
change the font for more moder and easy to read font .
mhd-fettah Mar 22, 2023
4f8aa29
update readme
josStorer Mar 23, 2023
cc3bfaf
make the icons clearer to see with no cutout
mhd-fettah Mar 23, 2023
2951f37
the logo clear and centered
mhd-fettah Mar 23, 2023
095d2c1
move dulicate style from html and move it to CSS
mhd-fettah Mar 23, 2023
202f1ba
fix alignment of block header
mhd-fettah Mar 23, 2023
40ee80f
minimize UI & improve Ux
mhd-fettah Mar 23, 2023
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
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report---问题报告.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report / 问题报告
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
**问题描述**
A clear and concise description of what the bug is.

**To Reproduce**
**如何复现**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
**期望行为**
A clear and concise description of what you expected to happen.

**Screenshots**
**截图说明**
If applicable, add screenshots to help explain your problem.

**Please complete the following information):**
**请补全以下内容**
- OS: [e.g. Windows]
- Browser: [e.g. chrome, safari]
- Extension Version: [e.g. v2.0.2]

**Additional context**
**其他**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request---新功能请求.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request / 新功能请求
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
**新功能是否与解决某个问题相关, 请描述**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
**你期望的新功能实现方案**
A clear and concise description of what you want to happen.

**Additional context**
**其他**
Add any other context or screenshots about the feature request here.
4 changes: 2 additions & 2 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ jobs:
build/chromium.zip
build/firefox.zip
build/safari.dmg
build/chromium-without-katex.zip
build/firefox-without-katex.zip
build/chromium-without-katex-and-tiktoken.zip
build/firefox-without-katex-and-tiktoken.zip
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Integrating ChatGPT into your browser deeply, everything you need is here.
[![release][release-image]][release-url]
[![verfiy][verify-image]][verify-url]

English | [简体中文](README_ZH.md)

### Install

[![Chrome][Chrome-image]][Chrome-url]
Expand All @@ -21,11 +23,15 @@ Integrating ChatGPT into your browser deeply, everything you need is here.
[![Android][Android-image]][Android-url]
[![Github][Github-image]][Github-url]

[Guide](https://github.com/josStorer/chatGPTBox/wiki/Guide)
[Preview](https://github.com/josStorer/chatGPTBox#Preview)
[Development&Contributing][dev-url]
[Donation](https://www.buymeacoffee.com/josStorer)
[Credit](https://github.com/josStorer/chatGPTBox#Credit)
(Waiting for store review, [Chrome][Chrome-url] and [Firefox][Firefox-url] version is now available)

[Guide](https://github.com/josStorer/chatGPTBox/wiki/Guide) |
[Preview](#Preview) |
[Development&Contributing][dev-url] |
[Donation](https://www.buymeacoffee.com/josStorer) |
[Credit](#Credit)

[Video Demonstration](https://www.youtube.com/watch?v=E1smDxJvTRs)

[dev-url]: https://github.com/josStorer/chatGPTBox/wiki/Development&Contributing

Expand All @@ -43,15 +49,15 @@ Integrating ChatGPT into your browser deeply, everything you need is here.

[Chrome-image]: https://img.shields.io/badge/-Chrome-brightgreen?logo=google-chrome&logoColor=white

[Chrome-url]: https://github.com/josStorer/chatGPTBox/wiki/Install
[Chrome-url]: https://chrome.google.com/webstore/detail/chatgptbox/eobbhoofkanlmddnplfhnmkfbnlhpbbo

[Edge-image]: https://img.shields.io/badge/-Edge-blue?logo=microsoft-edge&logoColor=white

[Edge-url]: https://github.com/josStorer/chatGPTBox/wiki/Install

[Firefox-image]: https://img.shields.io/badge/-Firefox-orange?logo=firefox-browser&logoColor=white

[Firefox-url]: https://github.com/josStorer/chatGPTBox/wiki/Install
[Firefox-url]: https://addons.mozilla.org/firefox/addon/chatgptbox/

[Safari-image]: https://img.shields.io/badge/-Safari-blue?logo=safari&logoColor=white

Expand All @@ -67,14 +73,18 @@ Integrating ChatGPT into your browser deeply, everything you need is here.

</div>

## Offline/Self-hosted model is now supported

See https://github.com/josStorer/selfhostedAI

## ✨ Features

- 🌈 Call up the chat dialog box on any page at any time.
- 🔗 Multiple API support (Web API for Free and Plus users, GPT-3, GPT-3.5).
- 📦 Integration adaptation for various commonly used websites (reddit, quora, youtube, github, gitlab, zhihu, bilibili).
- 🔗 Multiple API support (Web API for Free and Plus users, GPT-3.5, GPT-4).
- 📦 Integration adaptation for various commonly used websites (reddit, quora, youtube, github, gitlab, stackoverflow, zhihu, bilibili). (Inspired by [wimdenherder](https://github.com/wimdenherder))
- 🔍 Adaptation to all mainstream search engines, and custom queries to support additional sites.
- 🧰 Selection tool and right-click menu to perform various tasks, such as translation, summarization, polishing,
sentiment analysis, paragraph division, and queries.
sentiment analysis, paragraph division, code explain and queries.
- 🗂️ Static cards support floating chat boxes for multi-branch conversations.
- 🖨️ Easily save your complete chat records or copy them partially.
- 🎨 Powerful rendering support, whether for code highlighting or complex mathematical formulas.
Expand Down Expand Up @@ -105,6 +115,10 @@ Integrating ChatGPT into your browser deeply, everything you need is here.

![preview_youtube](screenshots/preview_youtube.jpg)

**Mobile Effect**

![image](https://user-images.githubusercontent.com/13366013/225529110-9221c8ce-ad41-423e-b6ec-097981e74b66.png)

**Settings**

![preview_settings](screenshots/preview_settings.jpg)
Expand Down
135 changes: 135 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<p align="center">
<img src="./src/logo.png">
</p>

<h1 align="center">ChatGPT Box</h1>

<div align="center">

将ChatGPT深度集成到浏览器中, 你所需要的一切均在于此

[![license][license-image]][license-url]
[![release][release-image]][release-url]
[![verfiy][verify-image]][verify-url]

[English](README.md) | 简体中文

### 安装链接

[![Chrome][Chrome-image]][Chrome-url]
[![Edge][Edge-image]][Edge-url]
[![Firefox][Firefox-image]][Firefox-url]
[![Safari][Safari-image]][Safari-url]
[![Android][Android-image]][Android-url]
[![Github][Github-image]][Github-url]

(目前正在等待商店审核, [Chrome][Chrome-url]及[Firefox][Firefox-url]版本已过审)

[使用指南](https://github.com/josStorer/chatGPTBox/wiki/Guide) |
[效果预览](#Preview) |
[开发&贡献][dev-url] |
[捐助](https://www.buymeacoffee.com/josStorer) |
[鸣谢](#Credit)

[视频演示](https://www.bilibili.com/video/BV1524y1x7io)

[dev-url]: https://github.com/josStorer/chatGPTBox/wiki/Development&Contributing

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg

[license-url]: https://github.com/josStorer/chatGPTBox/blob/master/LICENSE

[release-image]: https://img.shields.io/github/release/josStorer/chatGPTBox.svg

[release-url]: https://github.com/josStorer/chatGPTBox/releases/latest

[verify-image]: https://github.com/josStorer/chatGPTBox/workflows/verify-configs/badge.svg

[verify-url]: https://github.com/josStorer/chatGPTBox/actions/workflows/verify-configs.yml

[Chrome-image]: https://img.shields.io/badge/-Chrome-brightgreen?logo=google-chrome&logoColor=white

[Chrome-url]: https://chrome.google.com/webstore/detail/chatgptbox/eobbhoofkanlmddnplfhnmkfbnlhpbbo

[Edge-image]: https://img.shields.io/badge/-Edge-blue?logo=microsoft-edge&logoColor=white

[Edge-url]: https://github.com/josStorer/chatGPTBox/wiki/Install

[Firefox-image]: https://img.shields.io/badge/-Firefox-orange?logo=firefox-browser&logoColor=white

[Firefox-url]: https://addons.mozilla.org/firefox/addon/chatgptbox/

[Safari-image]: https://img.shields.io/badge/-Safari-blue?logo=safari&logoColor=white

[Safari-url]: https://github.com/josStorer/chatGPTBox/wiki/Install

[Android-image]: https://img.shields.io/badge/-Android-brightgreen?logo=android&logoColor=white

[Android-url]: https://github.com/josStorer/chatGPTBox/wiki/Install#install-to-android

[Github-image]: https://img.shields.io/badge/-Github-black?logo=github&logoColor=white

[Github-url]: https://github.com/josStorer/chatGPTBox/releases/latest

</div>

## 离线/自托管模型现已支持

仓库地址 https://github.com/josStorer/selfhostedAI

## ✨ Features

- 🌈 在任何页面随时呼出聊天对话框
- 🔗 多种API支持 (免费用户和Plus用户可用Web API, 此外还有GPT-3.5, GPT-4等)
- 📦 对各种常用网站的集成适配 (reddit, quora, youtube, github, gitlab, stackoverflow, zhihu, bilibili) (受到[wimdenherder](https://github.com/wimdenherder)启发)
- 🔍 对所有主流搜索引擎的适配, 并支持自定义查询以支持额外的站点
- 🧰 框选工具与右键菜单, 执行各种你的需求, 如翻译, 总结, 润色, 情感分析, 段落划分, 代码解释, 问询
- 🗂️ 静态卡片支持浮出聊天框, 进行多分支对话
- 🖨️ 随意保存你的完整对话记录, 或进行局部复制
- 🎨 强大的渲染支持, 不论是代码高亮, 还是复杂数学公式
- 🌍 多语言偏好支持
- 📝 [自定义API地址](https://github.com/Ice-Hazymoon/openai-scf-proxy)支持
- ⚙️ 所有站点适配与工具均可自由开关, 随时停用你不需要的模块
- 💡 工具与站点适配开发易于扩展, 对于开发人员易于自定义, 请查看[开发&贡献][dev-url]部分
- 😉 此外, 如果回答有任何不足, 直接聊天解决!

## Preview

<div align="center">

**搜索引擎适配, 浮动窗口, 对话分支**

![preview_google_floatingwindow_conversationbranch](screenshots/preview_google_floatingwindow_conversationbranch.jpg)

**常用站点集成, 选择浮动工具**

![preview_reddit_selectiontools](screenshots/preview_reddit_selectiontools.jpg)

**Git分析, 右键菜单**

![preview_github_rightclickmenu](screenshots/preview_github_rightclickmenu.jpg)

**视频总结**

![preview_youtube](screenshots/preview_youtube.jpg)

**移动端效果**

![image](https://user-images.githubusercontent.com/13366013/225529110-9221c8ce-ad41-423e-b6ec-097981e74b66.png)

**设置界面**

![preview_settings](screenshots/preview_settings.jpg)

</div>

## Credit

该项目基于我的另一个项目 [josStorer/chatGPT-search-engine-extension](https://github.com/josStorer/chatGPT-search-engine-extension)

[josStorer/chatGPT-search-engine-extension](https://github.com/josStorer/chatGPT-search-engine-extension)
fork自 [wong2/chat-gpt-google-extension](https://github.com/wong2/chat-gpt-google-extension)(我从中学到很多)
并在2022年12月14日与上游分离

[wong2/chat-gpt-google-extension](https://github.com/wong2/chat-gpt-google-extension) 的想法源于
[ZohaibAhmed/ChatGPT-Google](https://github.com/ZohaibAhmed/ChatGPT-Google) ([upstream-c54528b](https://github.com/wong2/chatgpt-google-extension/commit/c54528b0e13058ab78bfb433c92603db017d1b6b))
35 changes: 32 additions & 3 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function deleteOldDir() {
await fs.rm(outdir, { recursive: true, force: true })
}

async function runWebpack(isWithoutKatex, callback) {
async function runWebpack(isWithoutKatex, isWithoutTiktoken, callback) {
const compiler = webpack({
entry: {
'content-script': {
Expand All @@ -37,6 +37,7 @@ async function runWebpack(isWithoutKatex, callback) {
'webextension-polyfill',
'@primer/octicons-react',
'react-bootstrap-icons',
'countries-list',
'./src/utils',
],
},
Expand Down Expand Up @@ -169,9 +170,27 @@ async function runWebpack(isWithoutKatex, callback) {
type: 'asset/inline',
},
{
test: /\.jpg$/,
test: /\.(jpg|png|svg)$/,
type: 'asset/inline',
},
isWithoutTiktoken
? {
test: /crop-text\.mjs$/,
loader: 'string-replace-loader',
options: {
multiple: [
{
search: "import { encode } from '@nem035/gpt-3-encoder'",
replace: '',
},
{
search: 'encode(',
replace: 'String(',
},
],
},
}
: {},
],
},
})
Expand Down Expand Up @@ -241,12 +260,22 @@ function generateWebpackCallback(finishOutputFunc) {

async function build() {
await deleteOldDir()
if (isProduction && !isAnalyzing)
if (isProduction && !isAnalyzing) {
await runWebpack(
true,
false,
generateWebpackCallback(() => finishOutput('-without-katex')),
)
await new Promise((r) => setTimeout(r, 5000))
await runWebpack(
true,
true,
generateWebpackCallback(() => finishOutput('-without-katex-and-tiktoken')),
)
await new Promise((r) => setTimeout(r, 5000))
}
await runWebpack(
false,
false,
generateWebpackCallback(() => finishOutput('')),
)
Expand Down
Loading