Skip to content

Commit

Permalink
feat: initial
Browse files Browse the repository at this point in the history
  • Loading branch information
iprome committed Apr 18, 2023
0 parents commit ed9f5b2
Show file tree
Hide file tree
Showing 19 changed files with 10,185 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
}
23 changes: 23 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
root: true,
extends: ['standard-one/vue', 'standard-one'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
extensions: ['.vue', '.ts', '.tsx', '.d.ts', '.js'],
},
},
},
rules: {
'import/extensions': [
'error',
'ignorePackages',
{vue: 'never', ts: 'never', tsx: 'never', js: 'never'},
],
},
}
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
package-lock.json
yarn.lock

# testing
/coverage

#cache
.turbo
.*cache

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*

out/
build/
dist/

# plasmo - https://www.plasmo.com
.plasmo

# bpp - http://bpp.browser.market/
keys.json

# typescript
.tsbuildinfo
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint-staged
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('prettier-config-standard-one')
3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['stylelint-config-standard-one', 'stylelint-config-standard-one/vue'],
}
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# [致谢:感谢大哥们的打赏](#%E6%84%9F%E8%B0%A2%E5%A4%A7%E5%93%A5)



# Webpilot

Webpilot is a free, open-source "Copilot for web" that allows you to have free-form conversations with web pages or engage in automatic arguments with other users. Unlike ChatGPT, there is no need to chat or switch pages, and no need to constantly copy and paste back and forth.

The current version of Webpilot is developed based on gpt-3.5-turbo, which binds some common prompts with shortcut commands, requests API, and displays results to manipulate the selected text on the webpage.

Chrome Extension: [Add to Chrome](https://chrome.google.com/webstore/detail/Webpilot/biaggnjibplcfekllonekbonhfgchopo?utm_source=link&utm_medium=git&amp)

Official Website: [HomePage](https://www.Webpilot.ai/)

Note: Webpilot is currently in Pre-Release version and will be officially released within the next month. It will continue to iterate (and remain open source and free).

## Getting Started

First, run the development server:

```bash
corepack enable
pnpm dev
```

Open your Chrome browser and load the appropriate development build:

1. Go to [chrome://extensions](chrome://extensions).
2. At the top right, turn on Developer mode.
3. Click Load unpacked.
4. Find and select the `build/chrome-mv3-dev` folder.
5. Pin this extension to your Chrome toolbar.
6. After installation, please refresh the page where you want to select text before using this extension.

# Webpilot
Webpilot是一个免费、开源的“Copilot for web”。可以让你和网页自由对话,或者和网友自动吵架。与ChatGPT不同,无需聊天或切换页面,也无需来回的复制和粘贴。

当前版本的 Webpilot 是基于 gpt-3.5-turbo 开发的,它将一些常见的提示语句与快捷指令绑定,通过 API 请求并展示结果来实现对网页中选中文本的操作。

Chrome 插件:[获取](https://chrome.google.com/webstore/detail/Webpilot/biaggnjibplcfekllonekbonhfgchopo?utm_source=link&utm_medium=git&amp)

Webpilot 官网:[访问](https://www.Webpilot.ai/)

注意:Webpilot 目前处于 Pre-Release 版本,会在最近1个月内推出正式版,并不断进行迭代(会一直保持开源&免费)。


## 入门指南

首先,运行:

```bash
corepack enable
pnpm dev
```

打开 Chrome 浏览器,加载相应的开发构建:

1. 打开 [chrome://extensions](chrome://extensions)
2. 在右上角打开开发者模式。
3. 点击“加载已解压的扩展程序”。
4. 找到并选择 `build/chrome-mv3-dev` 文件夹。
5. 将此扩展程序固定到 Chrome 工具栏上。
6. 安装完成后,请先刷新要选中文字的页面,再使用本插件。


## 其他

希望 Webpilot 这个项目可以成为 GPT Coplit for X,一个傻瓜的、免费的生产力工具,AI for All。

欢迎各位大佬(尤其是精通 React 的大佬)一起来完善这个项目,感兴趣的话,可以加个微信(加的时候记得备注一下:Git来的,并附上一些必要的信息,比如身份、岗位啥的)

![image](https://user-images.githubusercontent.com/6043666/224199335-55b16eee-1c04-43cd-985c-27ccec9ab731.png)


# 感谢大哥!
千想,万想,千万没想到,在仍处于pre-release的阶段时,这个项目便收到了大哥们的关注,并给了巨额打赏:
- f.chen,10000元
- 崔传荣,10000元
- 硅基未来,10000元

Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extensionDescription": {
"message": "Web copilot for all, free & open-source!"
}
}
5 changes: 5 additions & 0 deletions assets/locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extensionDescription": {
"message": "Web copilot for all,免费且开源,贼好用!"
}
}
4 changes: 4 additions & 0 deletions assets/styles/csui-reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#webpilot-container {
/* stylelint-disable-next-line no-invalid-position-at-import-rule,import-notation */
@import './reset.scss';
}
61 changes: 61 additions & 0 deletions assets/styles/reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
font-family: 'PingFang SC', system, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', STHeiti,
'Microsoft Yahei', Tahoma, Simsun, sans-serif;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
section {
margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
list-style: none;
}

/* Set core root defaults */
html:focus-within {
scroll-behavior: smooth;
}

/* Set core body defaults */
body {
text-rendering: optimizespeed;
line-height: 1.5;
}

/* A elements that don"t have a class get default styles */
a:not([class]) {
text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
display: block;
max-width: 100%;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
box-sizing: border-box;
font: inherit;
}
61 changes: 61 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "webpilot",
"version": "0.0.0",
"author": "webpilot.ai",
"displayName": "Webpilot - Copilot for All, Free & Open",
"description": "__MSG_extensionDescription__",
"packageManager": "pnpm@8.2.0",
"engines": {
"node": ">16.14"
},
"scripts": {
"prepare": "husky install",
"dev": "plasmo dev",
"build": "plasmo build",
"package": "plasmo package",
"lint": "pnpm lint:eslint && pnpm lint:stylelint",
"lint:eslint": "eslint './src/**/*.{vue,ts,tsx,js}' --cache --fix",
"lint:stylelint": "stylelint './src/**/*.{vue,scss,css}' --cache --fix"
},
"lint-staged": {
"*.{vue,ts,tsx,js}": "eslint --cache --fix",
"*.{vue,scss,css}": "stylelint --cache --fix"
},
"dependencies": {
"plasmo": "0.68.3",
"vue": "3.2.47"
},
"devDependencies": {
"@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.6.1",
"@types/chrome": "0.0.231",
"@types/node": "18.15.11",
"eslint": "^8.38.0",
"eslint-config-standard-one": "^0.0.1",
"husky": "^8.0.3",
"lint-staged": "^13.2.1",
"prettier": "2.8.7",
"prettier-config-standard-one": "^0.0.1",
"stylelint": "^15.5.0",
"stylelint-config-standard-one": "^0.0.1",
"typescript": "5.0.4"
},
"manifest": {
"default_locale": "en",
"host_permissions": [
"<all_urls>"
],
"permissions": [
"storage",
"clipboardWrite"
],
"web_accessible_resources": [
{
"matches": [
"<all_urls>"
],
"resources": []
}
]
}
}
Loading

0 comments on commit ed9f5b2

Please sign in to comment.