Skip to content

Commit 1ffe64c

Browse files
committed
[feature] finish basic feature
1 parent de9e3d7 commit 1ffe64c

13 files changed

+783
-37
lines changed

.hintrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": [
3+
"development"
4+
],
5+
"hints": {
6+
"disown-opener": "off"
7+
}
8+
}

.prettierrc.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
tabWidth: 2,
77
useTabs: false,
88
semi: false,
9-
singleQuote: false,
9+
singleQuote: true,
1010
trailingComma: "none",
1111
bracketSpacing: true,
1212
bracketSameLine: true,

README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
This is a [Plasmo extension](https://docs.plasmo.com/) project bootstrapped with [`plasmo init`](https://www.npmjs.com/package/plasmo).
1+
# ChatGPT Prompt extension
2+
3+
![Icon](./assets/icon.png)
4+
5+
This Browser extension is going to prower chatGPT with awesome chatgpt prompt helper. Data powered by [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts).
6+
7+
> The ChatGPT model is a large language model trained by OpenAI that is capable of generating human-like text. By providing it with a prompt, it can generate responses that continue the conversation or expand on the given prompt.
8+
9+
## Feature
10+
11+
![Icon](./images/feature.png)
212

313
## Getting Started
414

assets/icon.png

-59.5 KB
Loading

assets/link.png

443 Bytes
Loading

background/index.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Storage } from '@plasmohq/storage'
2+
3+
import { PROMOT_KEY } from '../request'
4+
5+
const storage = new Storage({ area: 'local' })
6+
7+
storage.watch({
8+
[PROMOT_KEY]: (c) => {
9+
console.log(c.newValue)
10+
}
11+
})

contents/AutoComplete.css

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#chatgpt-prompt-helper-container {
2+
position: relative;
3+
}
4+
5+
#chatgpt-prompt-helper-content {
6+
max-height: 300px;
7+
position: relative;
8+
overflow: auto;
9+
}
10+
11+
#chatgpt-prompt-helper-panel {
12+
position: absolute;
13+
bottom: -4px;
14+
background: #ffffff;
15+
border-radius: 8px;
16+
border: solid 1px #dddddd;
17+
box-shadow: 1px 1px #ddd;
18+
max-height: 300px;
19+
width: 600px;
20+
}
21+
22+
#chatgpt-prompt-helper-panel-scroll {
23+
}
24+
25+
.chatgpt-prompt-helper-item-container {
26+
padding: 2px 12px;
27+
cursor: pointer;
28+
}
29+
30+
.chatgpt-prompt-helper-item-act {
31+
font-size: 14px;
32+
}
33+
34+
.chatgpt-prompt-helper-item-prompt {
35+
font-size: 12px;
36+
color: #999999;
37+
overflow: hidden;
38+
text-overflow: ellipsis;
39+
display: -webkit-box;
40+
line-height: 16px;
41+
max-height: 32px;
42+
-webkit-line-clamp: 2;
43+
-webkit-box-orient: vertical;
44+
}
45+
46+
.chatgpt-prompt-helper-item-active {
47+
background-color: rgba(217, 217, 227, 1);
48+
}
49+
50+
.chatgpt-prompt-helper-item-hover {
51+
background-color: rgba(217, 217, 227, 0.3);
52+
}
53+
54+
#chatgpt-prompt-helper-panel-explain {
55+
position: absolute;
56+
width: 300px;
57+
right: -302px;
58+
padding: 10px;
59+
background-color: bisque;
60+
font-size: 14px;
61+
top: 0;
62+
color: #333333;
63+
max-height: 300px;
64+
overflow-y: auto;
65+
box-sizing: border-box;
66+
}
67+
68+
#chatgpt-prompt-helper-panel-explain a {
69+
margin-left: 6px;
70+
}
71+
72+
.chatgpt-prompt-helper-panel-explain-link {
73+
width: 16px;
74+
height: 16px;
75+
vertical-align: middle;
76+
}
77+
78+
#chatgpt-prompt-helper-panel-tips {
79+
color: #058591;
80+
font-size: 12px;
81+
position: absolute;
82+
white-space: nowrap;
83+
bottom: -70px;
84+
}
85+
86+
#chatgpt-prompt-helper-panel-tips span {
87+
background: #ddd;
88+
border: solid 1px #999;
89+
border-radius: 2px;
90+
padding: 0 2px;
91+
}
92+
93+
#chatgpt-prompt-helper-panel-tips a {
94+
color: #058591;
95+
}

0 commit comments

Comments
 (0)