├── .github
└── workflows
│ └── release.yml
├── .gitignore
├── .gitmodules
├── CNAME
├── LICENSE
├── PRIVACY.md
├── README.md
├── README_CN.md
├── background.js
├── content.js
├── icons
├── icon.iconset
│ ├── icon_128x128.png
│ ├── icon_128x128@2x.png
│ ├── icon_16x16.png
│ ├── icon_16x16@2x.png
│ ├── icon_256x256.png
│ ├── icon_256x256@2x.png
│ ├── icon_32x32.png
│ ├── icon_32x32@2x.png
│ ├── icon_512x512.png
│ └── icon_512x512@2x.png
├── icon128.png
├── icon16.png
└── icon48.png
├── index.html
├── lib
├── pdf.js
└── pdf.worker.js
├── manifest.json
├── src
├── components
│ ├── api-card.js
│ ├── chat-container.js
│ ├── chat-list.js
│ ├── context-menu.js
│ └── message-input.js
├── handlers
│ └── message-handler.js
├── main.js
├── services
│ └── chat.js
└── utils
│ ├── chat-manager.js
│ ├── image.js
│ ├── storage-adapter.js
│ ├── theme.js
│ ├── ui.js
│ └── viewport.js
├── statics
└── image.png
├── styles
├── base
│ ├── reset.css
│ └── variables.css
├── components
│ ├── api-settings.css
│ ├── chat-container.css
│ ├── chat-list.css
│ ├── code.css
│ ├── context-menu.css
│ ├── image-preview.css
│ ├── image-tag.css
│ ├── input.css
│ ├── message.css
│ ├── reasoning.css
│ ├── settings.css
│ └── sidebar.css
├── main.css
└── utils
│ └── animations.css
└── vercel.json
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Build and Release Extension
2 |
3 | on:
4 | push:
5 | tags:
6 | - 'v*' # 当推送新的版本标签时触发
7 |
8 | jobs:
9 | build:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v3
13 | with:
14 | submodules: 'recursive' # 这会递归地检出所有子模块
15 |
16 | - name: Set up Node.js
17 | uses: actions/setup-node@v3
18 | with:
19 | node-version: '16'
20 |
21 | - name: Create ZIP file
22 | run: |
23 | zip -r cerebr.zip . \
24 | -x "*.git*" \
25 | -x "*.github*" \
26 | -x "*.DS_Store" \
27 | -x "README*"
28 |
29 | - name: Create Release
30 | id: create_release
31 | uses: softprops/action-gh-release@v1
32 | with:
33 | files: cerebr.zip
34 | draft: false
35 | prerelease: false
36 | generate_release_notes: true
37 | env:
38 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vercel
2 | .wrangler
3 | node_modules
4 | package-lock.json
5 | package.json
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "htmd"]
2 | path = htmd
3 | url = https://github.com/yym68686/htmd.git
4 |
--------------------------------------------------------------------------------
/CNAME:
--------------------------------------------------------------------------------
1 | cerebr.yym68686.top
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast, the
15 | GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to your
20 | programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new free
27 | programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether gratis
35 | or for a fee, you must pass on to the recipients the same freedoms that
36 | you received. You must make sure that they, too, receive or can get the
37 | source code. And you must show them these terms so they know their
38 | rights.
39 |
40 | Developers that use the GNU General Public License protect your rights
41 | with two steps: (1) assert copyright on the software, and (2) offer you
42 | this License giving you legal permission to copy, distribute and/or
43 | modify it.
44 |
45 | For the developers' and authors' protection, the GPL clearly explains
46 | that there is no warranty for this free software. For both users' and
47 | authors' sake, the GPL requires that modified versions be marked as
48 | changed, so that their problems will not be attributed erroneously to
49 | authors of previous versions.
50 |
51 | Some devices are designed to deny users access to install or run
52 | modified versions of the software inside them, although the manufacturer
53 | can do so. This is fundamentally incompatible with the aim of
54 | protecting users' freedom to change the software. The systematic
55 | pattern of such abuse occurs in the area of products for individuals to
56 | use, which is precisely where it is most unacceptable. Therefore, we
57 | have designed this version of the GPL to prohibit the practice for those
58 | products. If such problems arise substantially in other domains, we
59 | stand ready to extend this provision to those domains in future versions
60 | of the GPL, as needed to protect the freedom of users.
61 |
62 | Finally, every program is threatened constantly by software patents.
63 | States should not allow patents to restrict development and use of
64 | software on general-purpose computers, but in those that do, we wish to
65 | avoid the special danger that patents applied to a free program could
66 | make it effectively proprietary. To prevent this, the GPL assures that
67 | patents cannot be used to render the program non-free.
68 |
69 | The precise terms and conditions for copying, distribution and
70 | modification follow.
71 |
72 | TERMS AND CONDITIONS
73 |
74 | 0. Definitions.
75 |
76 | "This License" refers to version 3 of the GNU General Public License.
77 |
78 | "Copyright" also means copyright-like laws that apply to other
79 | kinds of works, such as semiconductor masks.
80 |
81 | "The Program" refers to any copyrightable work licensed under
82 | this License. Each licensee is addressed as "you". "Licensees" and
83 | "recipients" may be individuals or organizations.
84 |
85 | To "modify" a work means to copy from or adapt all or part of the work
86 | in a fashion requiring copyright permission, other than the making of an
87 | exact copy. The resulting work is called a "modified version" of the
88 | earlier work or a work "based on" the earlier work.
89 |
90 | A "covered work" means either the unmodified Program or a work based
91 | on the Program.
92 |
93 | To "propagate" a work means to do anything with it that, without
94 | permission, would make you directly or secondarily liable for
95 | infringement under applicable copyright law, except executing it on a
96 | computer or modifying a private copy. Propagation includes copying,
97 | distribution (with or without modification), making available to the
98 | public, and in some countries other activities as well.
99 |
100 | To "convey" a work means any kind of propagation that enables other
101 | parties to make or receive copies. Mere interaction with a user through
102 | a computer network, with no transfer of a copy, is not conveying.
103 |
104 | An interactive user interface displays "Appropriate Legal Notices"
105 | to the extent that it includes a convenient and prominently visible
106 | feature that (1) displays an appropriate copyright notice, and (2)
107 | tells the user that there is no warranty for the work (except to the
108 | extent that warranties are provided), that licensees may convey the
109 | work under this License, and how to view a copy of this License. If
110 | the interface presents a list of user commands or options, such as a
111 | menu, a prominent item in the list meets this criterion.
112 |
113 | 1. Source Code.
114 |
115 | The "source code" for a work means the preferred form of the work
116 | for making modifications to it. "Object code" means any non-source
117 | form of a work.
118 |
119 | A "Standard Interface" means an interface that either is an official
120 | standard defined by a recognized standards body, or, in the case of
121 | interfaces specified for a particular programming language, one that is
122 | widely used among developers working in that language.
123 |
124 | The "System Libraries" of an executable work include anything, other
125 | than the work as a whole, that (a) is included in the normal form of
126 | packaging a Major Component, but which is not part of that Major
127 | Component, and (b) is installed by the installer or by the operating
128 | system as a consequence of the installation of the Major Component, but
129 | which is not otherwise copied.
130 |
131 | The "Corresponding Source" for a work in object code form means all
132 | the source code needed to regenerate, install, and (for an executable
133 | work) run the object code and to modify the work, including scripts to
134 | control those activities. However, it does not include the work's
135 | System Libraries, or general-purpose tools or generally available free
136 | programs which are used unmodified in performing those activities but
137 | which are not part of the work. For example, Corresponding Source
138 | includes interface definition files associated with source files for
139 | the work, and the source code for shared libraries and dynamically
140 | linked subprograms that the work is specifically designed to require,
141 | such as by intimate data communication or control flow between those
142 | subprograms and other parts of the work.
143 |
144 | The Corresponding Source need not include anything that users
145 | can regenerate automatically from other parts of the Corresponding
146 | Source.
147 |
148 | 2. Basic Permissions.
149 |
150 | All rights granted under this License are granted for the term of
151 | copyright on the Program, and are irrevocable provided the stated
152 | conditions are met. This License explicitly affirms your unlimited
153 | permission to run the unmodified Program. The output from running a
154 | covered work is covered by this License only if the output, given its
155 | content, constitutes a covered work. This License acknowledges your
156 | rights of fair use or other equivalent, as provided by copyright law.
157 |
158 | You may make, run and propagate covered works that you do not
159 | convey, without conditions so long as your license otherwise remains
160 | in force. You may convey covered works to others for the sole purpose
161 | of having them make modifications exclusively for you, or provide you
162 | with facilities for running those works, provided that you comply with
163 | every other obligation under this License.
164 |
165 | Conveying under any other circumstances is permitted solely under
166 | the conditions stated below. Sublicensing is not allowed; section 10
167 | makes it unnecessary.
168 |
169 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
170 |
171 | No covered work shall be deemed part of an effective technological
172 | measure under any applicable law fulfilling obligations under article
173 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
174 | similar laws prohibiting or restricting circumvention of such
175 | measures.
176 |
177 | When you convey a covered work, you waive any legal power to forbid
178 | circumvention of technological measures to the extent such circumvention
179 | is effected by exercising rights under this License with respect to
180 | the covered work, and you disclaim any intention to limit operation or
181 | modification of the work as a means of enforcing, against the work's
182 | users, your or third parties' legal rights to forbid circumvention of
183 | technological measures.
184 |
185 | 4. Conveying Verbatim Copies.
186 |
187 | You may convey verbatim copies of the Program's source code as you
188 | receive it, in any medium, provided that you conspicuously and
189 | appropriately publish on each copy an appropriate copyright notice;
190 | keep intact all notices stating that this License and any
191 | non-permissive terms added in accord with section 7 apply to the code;
192 | keep intact all notices of the absence of any warranty; and give all recipients
193 | a copy of this License along with the Program.
194 |
195 | You may not charge a fee for the Program except charging a
196 | convenience fee for later providing access to a copy. This does not
197 | involve other restrictions and is not considered a licensing fee.
198 |
199 | 5. Conveying Modified Source Versions.
200 |
201 | You may convey a work based on the Program, or the modifications to
202 | produce it from the Program, in the form of source code under the
203 | terms of section 4, provided that you also meet all of these conditions:
204 |
205 | a) The work must carry prominent notices stating that you modified
206 | it, and giving a relevant date.
207 |
208 | b) The work must carry prominent notices stating that it is
209 | released under this License and any conditions added under section
210 | 7. This requirement modifies the requirement in section 4 to
211 | "keep intact all notices".
212 |
213 | c) You must license the entire work, as a whole, under this License
214 | to anyone who comes into possession of a copy. This License will
215 | therefore apply, along with any applicable section 7 additional terms,
216 | to the whole of the work, and all its parts, regardless of how they
217 | are packaged. This License gives no permission to license the work
218 | in any other way, but it does not invalidate such permission if you
219 | have separately received it.
220 |
221 | d) If the work has interactive user interfaces, each must display
222 | Appropriate Legal Notices; however, if the Program has interactive
223 | interfaces that do not display Appropriate Legal Notices, your work
224 | need not make them do so.
225 |
226 | A compilation of a covered work with other separate and independent
227 | works, which are not by their nature extensions of the covered work,
228 | and which are not combined with it such as to form a larger program,
229 | in or on a volume of a storage or distribution medium, is called an
230 | "aggregate" if the compilation and its resulting copyright are not
231 | used to limit the access or legal rights of the compilation's users
232 | beyond what the individual works permit. Inclusion of a covered work
233 | in an aggregate does not cause this License to apply to the other
234 | parts of the aggregate.
235 |
236 | 6. Conveying Non-Source Forms.
237 |
238 | You may convey a covered work in object code form under the terms of
239 | sections 4 and 5, provided that you also convey the machine-readable
240 | Corresponding Source under the terms of this License, in one of these ways:
241 |
242 | a) Convey the object code in, or embodied in, a physical product
243 | (including a physical distribution medium), together with the
244 | Corresponding Source fixed on a durable physical medium
245 | customarily used for software interchange.
246 |
247 | b) Convey the object code in, or embodied in, a physical product
248 | (including a physical distribution medium), together with a
249 | written offer, valid for at least three years, to give anyone who
250 | possesses the object code a copy of the Corresponding Source for a
251 | charge no more than your cost of physically performing this
252 | conveying of copying.
253 |
254 | c) Convey individual copies of the object code with a copy of the
255 | written offer to provide the Corresponding Source. This
256 | alternative is allowed only occasionally and noncommercially, and
257 | only if you received the object code with such an offer, in accord
258 | with subsection 6b.
259 |
260 | d) Convey the object code by offering access from a designated
261 | place (gratis or for a charge), and offer equivalent access to the
262 | Corresponding Source in the same way through the same place at no
263 | further charge. You need not require recipients to copy the
264 | Corresponding Source along with the object code. If the place
265 | to copy the object code is a network server, the Corresponding Source
266 | may be on a different server (operated by you or a third party)
267 | that supports equivalent copying facilities, provided you maintain
268 | clear directions next to the object code saying where to find the
269 | Corresponding Source. Regardless of what server hosts the
270 | Corresponding Source, you remain obligated to ensure that it is
271 | available for as long as needed to satisfy these requirements.
272 |
273 | e) Convey the object code using peer-to-peer transmission, provided
274 | you inform other peers where the object code and Corresponding
275 | Source of the work are being offered to the general public at no
276 | charge under subsection 6d.
277 |
278 | A separable portion of the object code, whose source code is excluded
279 | from the Corresponding Source as a System Library, need not be
280 | included in conveying the object code work.
281 |
282 | A "User Product" is either (1) a "consumer product", which is any
283 | tangible personal property which is normally used for personal, family,
284 | or household purposes, or (2) anything designed or sold for incorporation
285 | into a dwelling. In determining whether a product is a consumer product,
286 | doubtful cases shall be resolved in favor of coverage. For a particular
287 | product received by a particular user, "normally used" refers to a
288 | typical or common use of that class of product, regardless of the status
289 | of the particular user or of the way in which the particular user
290 | actually uses, or expects or is expected to use, the product. The
291 | "System Libraries" of the product are the integral parts of the
292 | product. A product is not a consumer product if it is designed or sold
293 | for incorporation into a building or other dwelling. A "make
294 | available" means making the object code available to others in a
295 | manner that allows them to obtain a copy.
296 |
297 | 7. Additional Terms.
298 |
299 | "Additional permissions" are terms that supplement the terms of this
300 | License by making exceptions from one or more of its conditions.
301 | Additional permissions that are applicable to the entire Program shall
302 | be treated as though they were included in this License, to the extent
303 | that they are valid under applicable law. If additional permissions
304 | apply only to part of the Program, that part may be used separately
305 | under those permissions, but the entire Program remains governed by
306 | this License without regard to the additional permissions.
307 |
308 | When you convey a copy of a covered work, you may at your option
309 | remove any additional permissions from that copy, or from any part of
310 | it. (Additional permissions may be written to require their own
311 | removal in certain cases when you modify the work.) You may place
312 | additional permissions on material, added by you to a covered work,
313 | for which you have or can give appropriate copyright permission.
314 |
315 | Notwithstanding any other provision of this License, for material you
316 | add to a covered work, you may (if authorized by the copyright holders of
317 | that material) supplement the terms of this License with terms:
318 |
319 | a) Disclaiming warranty or limiting liability differently from the
320 | terms of sections 15 and 16 of this License; or
321 |
322 | b) Requiring preservation of specified reasonable legal notices or
323 | author attributions in that material or in the Appropriate Legal
324 | Notices displayed by works containing it; or
325 |
326 | c) Prohibiting misrepresentation of the origin of that material, or
327 | requiring that modified versions of such material be marked in
328 | reasonable ways as different from the original version; or
329 |
330 | d) Limiting the use for publicity purposes of names of licensors or
331 | authors of the material; or
332 |
333 | e) Declining to grant rights under trademark law for use of some
334 | trade names, trademarks, or service marks; or
335 |
336 | f) Requiring indemnification of licensors and authors of that
337 | material by anyone who conveys the material (or modified versions of
338 | it) with contractual assumptions of liability to the recipient, for
339 | any liability that these contractual assumptions directly impose on
340 | those licensors and authors.
341 |
342 | All other non-permissive additional terms are considered "further
343 | restrictions" within the meaning of section 10. If the Program as you
344 | received it, or any part of it, contains a notice stating that it is
345 | governed by this License along with a term that is a further
346 | restriction, you may remove that term. If a license document contains
347 | a further restriction but permits relicensing or conveying under this
348 | License, you may add to a covered work material governed by the terms
349 | of that license document any terms that disclaim, or limit, liability for
350 | certain types of damages, the extent of which is incalculable under
351 | applicable law.
352 |
353 | 8. Termination.
354 |
355 | You may not propagate or modify a covered work except as expressly
356 | provided under this License. Any attempt otherwise to propagate or
357 | modify it is void, and will automatically terminate your rights under
358 | this License (including any patent licenses granted under the third
359 | party provisions of section 11).
360 |
361 | However, if you cease all violation of this License, then your
362 | license from a particular copyright holder is reinstated (a)
363 | provisionally, unless and until such holder explicitly and finally
364 | terminates your license, and (b) permanently, if the copyright holder
365 | so chooses, and if you meet the conditions of reinstatement.
366 |
367 | Termination of your rights under this section does not terminate the
368 | licenses of parties who have received copies or rights from you under
369 | this License. If your rights have been terminated and not permanently
370 | reinstated, you do not qualify to receive new licenses for the same
371 | material under section 10.
372 |
373 | 9. Acceptance Not Required for Having Copies.
374 |
375 | You are not required to accept this License in order to receive or
376 | run a copy of the Program. Ancillary propagation of a covered work
377 | occurring solely as a consequence of using peer-to-peer transmission
378 | to receive a copy likewise does not require acceptance. However,
379 | nothing other than this License grants you permission to propagate or
380 | modify any covered work. These actions infringe copyright if you do not
381 | accept this License. Therefore, by modifying or propagating a
382 | covered work, you indicate your acceptance of this License to do so.
383 |
384 | 10. Automatic Licensing of Downstream Recipients.
385 |
386 | Each time you convey a covered work, the recipient automatically
387 | receives a license from the original licensors, to run, modify and
388 | propagate that work, subject to this License. You are not responsible
389 | for enforcing compliance by third parties with this License.
390 |
391 | An "entity transaction" is a transaction transferring control of an
392 | organization, or substantially all assets of one, or subdividing an
393 | organization, or merging organizations. If such an entity transaction
394 | occurs, each party to the transaction that receives a copy of the
395 | Program also receives whatever licenses to the Program the party
396 | held before the transaction. You may not impose any further
397 | restrictions on the exercise of the rights granted or affirmed under
398 | this License.
399 |
400 | 11. Patents.
401 |
402 | A "contributor" is a copyright holder who authorizes use of the
403 | Program under this License. The work thus licensed is called the
404 | contributor's "contributor version".
405 | Contributors provide an express grant of patent rights under this
406 | License for their contributions, which is, unless explicitly stated
407 | otherwise, a non-exclusive, worldwide, royalty-free patent license to
408 | make, use, sell, offer for sale, import, and otherwise run, modify and
409 | propagate the contributions. The patent license covers the act of
410 | contributing the work, as well as the practice of making, using, selling,
411 | offering for sale, importing, and propagating the work. In the case
412 | of a contributor's essential patent claims, such a license is granted
413 | for the term of any patent infringement litigation, but only to the
414 | extent necessary to protect the exercise of the rights granted herein.
415 |
416 | Each contributor grants you a non-exclusive, worldwide,
417 | royalty-free patent license under their essential patent claims, to
418 | make, use, sell, offer for sale, import, and otherwise run, modify and
419 | propagate the contributions. In this section, as used in the context
420 | of this License, "patent" also includes any patents that might be
421 | considered to cover extensions of the contributed work by the
422 | contributor, but not necessarily so.
423 |
424 | In the event you institute patent litigation (including a cross-
425 | claim or counterclaim in a lawsuit) alleging that the Program
426 | itself (excluding combinations of it with other software or hardware)
427 | constitutes patent infringement, then your license from each
428 | contributor of the Program terminates, and you
429 | automatically grant a royalty-free license to any party receiving a copy
430 | of the Program from you.
431 |
432 | 11a. Additional Patent Terms for Contributor Submissions.
433 | Notwithstanding any other provision of this License, for any
434 | contribution you may have an obligation to grant, and such work may be
435 | subject to, additional patent licenses. These additional patent
436 | licenses for a contribution extend only to that contribution and are
437 | promulgated separately from the rest of the license.
438 |
439 | 12. No Surrender of Others' Freedom.
440 |
441 | If conditions are imposed on you (whether by court order, agreement or
442 | otherwise) that contradict the conditions of this License, they do not
443 | excuse you from the conditions of this License. If you cannot
444 | distribute a covered work so as to satisfy simultaneously your obligations
445 | under this License and any other pertinent obligations, then as a
446 | consequence you may not distribute the work at all. For example, if you
447 | agree to terms that obligate you to collect a royalty for further
448 | distribution of the work, the only way you could satisfy both those terms
449 | and this License would be to refrain entirely from distribution of the
450 | work.
451 |
452 | 13. Use with the GNU Affero General Public License.
453 |
454 | Notwithstanding any other provision of this License, you have
455 | permission to link or combine any covered work with a work licensed
456 | under the GNU Affero General Public License into a single combined work,
457 | and to convey the resulting work. The terms of this License will continue
458 | to apply to the part which is the covered work, but the special terms of
459 | the GNU Affero General Public License, section 13, concerning
460 | interaction through a network will apply to the combination as such.
461 |
462 | 14. Revised Versions of this License.
463 |
464 | The Free Software Foundation may publish revised and/or new versions of
465 | the GNU General Public License from time to time. Such new versions will
466 | be similar in spirit to the present version, but may differ in detail to
467 | address new problems or concerns.
468 |
469 | Each version is given a distinguishing version number. If the Program
470 | specifies a version number of this License which applies to it and "any
471 | later version", you have the option of following the terms and conditions
472 | of either that version or any later version published by the Free
473 | Software Foundation. If the Program does not specify a version number of
474 | this License, you may choose any version ever published by the Free Software
475 | Foundation.
476 |
477 | 15. Disclaimer of Warranty.
478 |
479 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
480 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
481 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
482 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
483 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
484 | PURPOSE. EACH PARTY'S ENTIRE LIABILITY, IN ANY CASE, SHALL BE LIMITED TO
485 | THE AMOUNT PAID BY YOU FOR THE PROGRAM (IF ANY).
486 |
487 | 16. Limitation of Liability.
488 |
489 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
490 | LICENSE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
491 | DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
492 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
493 | ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
494 | LICENSE OR THE PROGRAM.
495 |
496 | 17. Interpretation of Sections 15 and 16.
497 |
498 | If the disclaimer of warranty and limitation of liability provided in
499 | this License cannot be given local legal effect according to their terms,
500 | reviewing courts shall apply local law that most closely approximates an
501 | absolute waiver of all civil liability in connection with the Program,
502 | unless a warranty or assumption of liability accompanies a copy of the
503 | Program.
504 |
505 | END OF TERMS AND CONDITIONS
506 |
507 | How to Apply These Terms to Your New Programs
508 |
509 | If you develop a new program, and you want it to be of the greatest
510 | possible use to the public, the best way to achieve this is to make it
511 | free software which everyone can redistribute and change under these terms.
512 |
513 | To do so, attach the following notices to the program. It is safest
514 | to attach them to the start of each source file to most effectively
515 | inform other developers of your freedom to modify and share your
516 | program:
517 |
518 |
519 | Copyright (C) [year] [name of author]
520 |
521 | This program is free software: you can redistribute it and/or modify
522 | it under the terms of the GNU General Public License as published by
523 | the Free Software Foundation, either version 3 of the License, or
524 | (at your option) any later version.
525 |
526 | This program is distributed in the hope that it will be useful,
527 | but WITHOUT ANY WARRANTY; without even the implied warranty of
528 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
529 | GNU General Public License for more details.
530 |
531 | You should have received a copy of the GNU General Public License
532 | along with this program. If not, see .
533 |
534 | Also add information on how to contact you by electronic and paper mail.
535 |
536 | If the program does terminal interaction, make it output a short
537 | notice like this when it starts in an interactive mode:
538 |
539 | [Program Name] [Version]
540 | Copyright (C) [year] [name of author]
541 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
542 | This is free software, and you are welcome to redistribute it
543 | under certain conditions; type `show c' for details.
544 |
545 | You should also get your employer (if you work as a programmer) or your
546 | college, university or other institution, if any, to sign a "copyright
547 | assignment" for any copyright interest in the program, in order to
548 | contribute to the communal effort.
549 |
550 | The precise form of the notices is useful for indicating which
551 | parts of a program are free software and which parts are not. For
552 | example, if your program is a library, you should make it clear that
553 | the library is free software and that users can combine it with other
554 | modules to produce an executable, regardless of the license terms of
555 | these other modules. See GNU General Public License for more details.
--------------------------------------------------------------------------------
/PRIVACY.md:
--------------------------------------------------------------------------------
1 | # Cerebr 隐私权政策
2 |
3 | *最后更新日期:2024年2月*
4 |
5 | ## 1. 引言
6 |
7 | 欢迎使用 Cerebr("我们","我们的"或"本扩展")。本隐私权政策旨在说明我们如何收集、使用、存储和保护您的信息。使用我们的服务即表示您同意本隐私权政策中描述的数据处理程序。
8 |
9 | ## 2. 信息收集
10 |
11 | ### 2.1 主动提供的信息
12 | - API密钥和配置信息
13 | - 用户偏好设置(如界面主题、快捷键设置等)
14 | - 聊天记录和对话内容
15 |
16 | ### 2.2 自动收集的信息
17 | - 基本的使用统计信息
18 | - 错误日志(用于改进服务质量)
19 | - 当前访问的网页URL(仅在您主动使用网页问答功能时)
20 |
21 | ## 3. 信息使用
22 |
23 | 我们收集的信息将用于:
24 | - 提供和改进我们的AI助手服务
25 | - 保存您的个性化设置
26 | - 维护和优化扩展程序性能
27 | - 排查技术问题
28 | - 改进用户体验
29 |
30 | ## 4. 数据存储
31 |
32 | ### 4.1 本地存储
33 | - 所有用户数据主要存储在您的本地浏览器中
34 | - API密钥和配置信息使用Chrome的安全存储机制
35 | - 聊天历史记录保存在本地存储中
36 |
37 | ### 4.2 第三方服务
38 | - 当您使用AI功能时,您的查询将被发送到您配置的AI服务提供商(如OpenAI、Anthropic等)
39 | - 我们不会存储或转发您的API密钥到除您指定的服务提供商之外的任何第三方
40 |
41 | ## 5. 数据安全
42 |
43 | 我们采取以下措施保护您的数据:
44 | - 所有敏感数据(如API密钥)均使用安全的加密存储
45 | - 仅在必要时访问网页内容
46 | - 不收集或存储任何个人身份信息
47 | - 不与第三方共享用户数据
48 |
49 | ## 6. 用户权利
50 |
51 | 您拥有以下权利:
52 | - 随时查看和删除您的聊天历史
53 | - 清除所有存储的数据
54 | - 修改或删除您的API配置
55 | - 选择是否启用特定功能
56 |
57 | ## 7. 数据删除
58 |
59 | 您可以通过以下方式删除您的数据:
60 | - 使用扩展程序内的"清除数据"功能
61 | - 在Chrome扩展管理页面中删除扩展程序
62 | - 使用快捷键(Windows: Alt+X / Mac: Ctrl+X)清空聊天记录
63 |
64 | ## 8. 政策更新
65 |
66 | 我们可能会不时更新本隐私权政策。当我们进行重大更改时,我们将通过扩展程序通知您。继续使用我们的服务即表示您接受更新后的政策。
67 |
68 | ## 9. 联系我们
69 |
70 | 如果您对本隐私权政策有任何问题或建议,请通过以下方式联系我们:
71 | - GitHub Issues: https://github.com/yym68686/Cerebr/issues
72 | - 电子邮件:yym68686@outlook.com
73 |
74 | ## 10. 合规性声明
75 |
76 | 本扩展程序遵守:
77 | - Chrome网上应用店开发者计划政策
78 | - 通用数据保护条例(GDPR)
79 | - 加州消费者隐私法案(CCPA)
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
10 |
11 | [English](./README.md) | [Simplified Chinese](./README_CN.md)
12 |
13 | # 🧠 Cerebr - Intelligent AI Assistant
14 |
15 | 
16 |
17 | The name "Cerebr" comes from a Latin root related to "brain" or "cerebrum". This etymology reflects our vision: to integrate powerful AI capabilities from Claude, OpenAI, and others, making Cerebr your second brain for deep reading and understanding. Cerebr is a powerful Chrome browser AI assistant extension focused on enhancing your work efficiency and learning experience.
18 |
19 | Born from a need for a clean, efficient browser AI assistant, Cerebr stands out with its minimalist design and powerful features. While other solutions often come with limitations or cluttered interfaces, Cerebr focuses on delivering a seamless, distraction-free experience for your web browsing needs.
20 |
21 | ## ✨ Core Features
22 |
23 | - 🎯 **Smart Sidebar** - Quick access via hotkey (Windows: `Alt+Z` / Mac: `Ctrl+Z`) to chat with AI anytime, anywhere
24 | - 🔄 **Multiple API Support** - Configure multiple APIs to flexibly switch between different AI assistants
25 | - 🔁 **Config Sync** - Cross-browser API configuration synchronization for seamless device switching
26 | - 📝 **Comprehensive Q&A** - Support webpage content Q&A, PDF document Q&A, image Q&A and more
27 | - 🎨 **Elegant Rendering** - Perfect support for Markdown text rendering and LaTeX math formula display
28 | - ⚡ **Real-time Response** - Stream output for instant AI replies
29 | - ⏹️ **Flexible Control** - Support stopping generation at any time, sending new messages will stop the current generation
30 | - 🌓 **Theme Switching** - Support light/dark themes to protect your eyes
31 | - 🌐 **Web Version** - Support web version, no installation required, accessable from any browser, support vercel, GitHub Pages and cloudflare pages deployment
32 |
33 | ## 🛠️ Technical Features
34 |
35 | - 💾 **State Persistence** - Automatically save chat history, sidebar status, etc.
36 | - 🔄 **Config Sync** - Cross-device configuration sharing through browser's native sync API
37 | - 🔍 **Smart Extraction** - Automatically identify and extract webpage/PDF content
38 | - ⌨️ **Shortcut Operations** - Support hotkey to clear chat (Windows: `Alt+X` / Mac: `Ctrl+X`), up/down keys for quick history recall
39 | - 🔒 **Secure & Reliable** - Support multiple API key management with local data storage
40 | - 🎭 **High Compatibility** - Support mainstream browsers, adapt to various webpage environments
41 |
42 | ## 🎮 User Guide
43 |
44 | 1. 🔑 **Configure API**
45 | - Click the settings button
46 | - Fill in API Key, Base URL and model name
47 | - Support adding multiple API configurations
48 |
49 | 2. 💬 **Start Chatting**
50 | - Use hotkey Windows: `Alt+Z` / Mac: `Ctrl+Z` to summon sidebar
51 | - Input questions and send
52 | - Support image upload for visual Q&A
53 |
54 | 3. 📚 **Webpage/PDF Q&A**
55 | - Enable webpage Q&A switch
56 | - Automatically identify and extract current page content
57 | - Support intelligent PDF file Q&A
58 |
59 | ## 🔧 Advanced Features
60 |
61 | - 📋 **Right-click Copy** - Support right-click to directly copy message text
62 | - 🔄 **History Records** - Use up/down arrow keys to quickly recall historical questions
63 | - ⏹️ **Stop Generation** - Show stop button when generating messages, can stop generation at any time
64 | - 🖼️ **Image Preview** - Click images to view full size
65 | - ⚙️ **Custom Settings** - Support customizing hotkeys, themes and more
66 |
67 | ## 🚀 Web Version Deploy
68 |
69 | 1. You can quickly deploy the web version of Cerebr to Vercel with one click:
70 |
71 | [](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fyym68686%2Fcerebr)
72 |
73 | 2. You can deploy to Cloudflare Pages:
74 |
75 | ```bash
76 | # Install Wrangler CLI
77 | npm install -g wrangler
78 |
79 | # Login to Cloudflare
80 | wrangler login
81 |
82 | # Deploy to Cloudflare Pages with SSL configuration
83 | wrangler pages deploy . --project-name cerebr --branch main
84 | ```
85 |
86 | 3. You can also deploy to GitHub Pages:
87 |
88 | ```bash
89 | # Fork this repository
90 | # Then go to your repository's Settings -> Pages
91 | # In the "Build and deployment" section:
92 | # - Select "Deploy from a branch" as Source
93 | # - Choose your branch (main/master) and root (/) folder
94 | # - Click Save
95 | ```
96 |
97 | The deployment will be automatically handled by GitHub Actions. You can access your site at `https://.github.io/cerebr`
98 |
99 | ### Web Version Features
100 | - 🌐 Access Cerebr from any browser without installation
101 | - 💻 Same powerful features as the Chrome extension
102 | - ☁️ Deploy your own instance for better control
103 | - 🔒 Secure and private deployment
104 |
105 | ## 📦 Desktop Application
106 |
107 | After installing the dmg file, you need to execute the following command:
108 |
109 | ```bash
110 | sudo xattr -r -d com.apple.quarantine /Applications/Cerebr.app
111 | ```
112 |
113 | This project uses Pake to pack the dmg file, the command is as follows:
114 |
115 | ```bash
116 | iconutil -c icns icon.iconset
117 | pake https://xxx/ --name Cerebr --hide-title-bar --icon ./icon.icns
118 | ```
119 |
120 | https://github.com/tw93/Pake
121 |
122 | ## 🚀 Latest Updates
123 |
124 | - 🆕 Added image Q&A functionality
125 | - 🔄 Optimized webpage content extraction algorithm
126 | - 🐛 Fixed math formula rendering issues
127 | - ⚡ Improved overall performance and stability
128 |
129 | ## 📝 Development Notes
130 |
131 | This project is developed using Chrome Extension Manifest V3, with main tech stack:
132 |
133 | - 🎨 Native JavaScript + CSS
134 | - 📦 Chrome Extension API
135 | - 🔧 PDF.js + KaTeX + Marked.js
136 |
137 | ## 🤝 Contribution Guide
138 |
139 | Welcome to submit Issues and Pull Requests to help improve the project. Before submitting, please ensure:
140 |
141 | - 🔍 You have searched related issues
142 | - ✅ Follow existing code style
143 | - 📝 Provide clear description and reproduction steps
144 |
145 | ## 📄 License
146 |
147 | This project is licensed under the GPLv3 License
--------------------------------------------------------------------------------
/README_CN.md:
--------------------------------------------------------------------------------
1 |