Skip to content

Commit

Permalink
deploy: 3baead9
Browse files Browse the repository at this point in the history
  • Loading branch information
Gk0Wk committed Sep 27, 2023
1 parent 60cf0ad commit 1f53829
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 15 deletions.
38 changes: 27 additions & 11 deletions index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion library/index.html

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions library/recipes/library/tiddlers.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"plugin-type": "plugin",
"dependents": "$:/plugins/tiddlywiki/markdown",
"version": "0.0.7",
"list": "readme config",
"list": "readme config LICENSE",
"type": "application/json",
"Modern.TiddlyDev#SHA256-Hashed": "05866c32cbb92f775fbbce2ac081488e3332f3c6d641a93fbbabed973d74b12e",
"Modern.TiddlyDev#SHA256-Hashed": "68abfc82dd63d662cb2ae6f2fcbbab9d4565dd6f9e1bb9beef6fc7afedaed764",
"readme": "<$list filter=\"[[$:/language]get[text]removeprefix[$:/languages/]else[en-GB]]\" variable=\"lang\">\n<$list filter=\"[<lang>search[zh]]\">\n\n在 <$text text=\"TiddlyWiki\" /> 中使用 <$text text=\"ChatGPT\" />。\n\n安装后请首先在[[这里|$:/plugins/Gk0Wk/chat-gpt/config]]填写你的 <$text text=\"OpenAI\" /> API Key,否则无法使用该插件的功能。\n\n你的侧边栏会多出一个 <$text text=\"ChatGPT\" /> 页面,可以直接进行对话,对话的历史会保存。如要清除历史记录,则直接删除 `history` 参数指向的条目。\n\n<$text text=\"ChatGPT\" /> 实际上是一个微件,你可以按照自己的需求定制聊天机器人:\n\n```html\n<$chat-gpt />\n```\n\n还可以添加各种可选参数来定制行为:\n\n|!参数 |!解释 |\n|history |填写一个条目的标题,用于持久化存储聊天记录 |\n|scroll |如果为yes,则对话记录可上下滚动,但必须在微件外一层指定高度,参考[[侧边栏|$:/plugins/Gk0Wk/chat-gpt/side-bar]]的写法 |\n|component |微件的DOM标签类型,默认为div |\n|className |微件的类名,用于自定义样式 |\n|readonly |如果为readonly,则不会出现对话输入框,配合history参数仅做展示用 |\n|system_message |系统消息,用于AI的行为,例如\"你是一个经验丰富的律师\" |\n\n除此之外,还支持如下 <$text text=\"ChatGPT\" /> 参数:\n\n* model\n* temperature\n* top_p\n* max_tokens\n* presence_penalty\n* frequency_penalty\n* user\n\n其具体用法可以查看[[官方文档|https://platform.openai.com/docs/api-reference/chat/create]],或者直接问它好了。\n\n现在还没有做多轮对话,即便是在一个微件里聊得,也都是单轮对话,多轮对话等下个版本再搞。\n\np.s. 现在使用 ChatGPT 要翻墙,注册账号需要海外手机号,请自行想办法。\n\n!! 高级\n\n如果在微件中嵌套自己的 action,就可以在对话完成时拿到回答的结果,这需要你知道该如何编写一个支持 action 的微件。输出的结果保存在 `output-text` 变量中。\n\n同时,在对话完成时你也可以捕获到微件的冒泡事件,以及全局事件,二者分别使用`addEventListener`和`$tw.hooks.addHook`(事件名称就是`chat-gpt`)来实现。如下是事件负载的类型定义:\n\n</$list>\n\n<$list filter=\"[<lang>!search[zh]]\">\n\nUsing <$text text=\"ChatGPT\" /> in <$text text=\"TiddlyWiki\" />.\n\nAfter installation, please fill in your <$text text=\"OpenAI\" /> API Key [[here|$:/plugins/Gk0Wk/chat-gpt/config]] first, otherwise you will not be able to use the functionality of the plugin.\n\nYou will have an additional <$text text=\"ChatGPT\" /> page in your sidebar, where you can have a conversation directly, and the history of the conversation will be saved. To clear the history, simply delete the entry pointed to by the `history` parameter.\n\n<$text text=\"ChatGPT\" /> is actually a widget that allows you to customize the chatbot according to your needs:\n\n```html\n<$chat-gpt />\n```\n\nVarious optional parameters can also be added to customize the behavior.\n\n|!Attributes |!Explanation |\n|history |Fill in an tiddler title for persistent storage of chat logs |\n|scroll |If yes, the conversation record can be scrolled up and down, but the height must be specified in the outer layer of the widget, refer to the [[sidebar|$:/plugins/Gk0Wk/chat-gpt/side-bar]] writing |\n|component |DOM tag type for microware, default is div |\n|className |Class name of the widget for custom styles |\n|readonly |If it is readonly, no dialog input box will appear, and it will be used for display only with the history parameter. |\n|system_message |System messages to customize the AI's behavior, such as \"You are an experienced lawyer\" |\n\nIn addition, the following <$text text=\"ChatGPT\" /> parameters are supported:\n\n* model\n* temperature\n* top_p\n* max_tokens\n* presence_penalty\n* frequency_penalty\n* user\n\nIts specific usage can check the [[official documentation|https://platform.openai.com/docs/api-reference/chat/create]], or just ask it well.\n\nNow there is no multi-round dialogue, even in a micro-piece chat, but also a single round of dialogue, multi-round dialogue and so on the next version to engage.\n\n!! Advance\n\nIf you nest your own action in the widget, you can get the result of the answer when the conversation is completed, which requires that you know how to write a widget that supports actions. The output is stored in the `output-text` variable.\n\nAt the same time, you can also catch bubbling events of the widget when the conversation completes, as well as global events, both using `addEventListener` and `$tw.hooks.addHook` (the event name is `chat-gpt`) respectively. The following is the type definition of the event load.\n\n</$list>\n</$list>\n\n```typescript\ninterface ChatCompletionEvent {\n event: Event;\n type: 'chat-gpt';\n name: 'completion-finish';\n paramObject: {\n id: string; // Chat id from OpenAI\n created: Date; // Chat time\n assistant: string; // Answer of ChatGPT\n user: string; // Your question\n };\n widget: ChatGPTWidget;\n historyTiddler: string;\n}\n```\n",
"requires-reload": "yes"
},
Expand All @@ -28,6 +28,20 @@
"readme": "\\define lingo-base() $:/language/ThemeTweaks/\n\n<$list filter=\"[[$:/language]get[text]removeprefix[$:/languages/]else[en-GB]]\" variable=\"lang\">\n<$list filter=\"[<lang>search[zh]]\">\n\n本插件实现了TiddlySeq主题的主体部分,包括样式,以及一些小组件。@@color:red;请搭配[[Vanilla主题|$:/themes/tiddlywiki/vanilla]]使用!@@\n\n!! 设置\n\n本主题尽可能地沿用了Vanilla主题的设置,所以大部分主题设置位于[[Vanilla主题设置|$:/themes/tiddlywiki/vanilla/themetweaks]]中。其余的设置列在下面:\n\n<div class=\"tc-control-panel\">\n\n|[[StoryRiver下边界|$:/plugins/Gk0Wk/TiddlySeq/StoryBottomMargin]] |<$edit-text tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/StoryBottomMargin\" placeholder=\"比如:28px\" tag=\"input\"/> |\n|[[条目间隔|$:/plugins/Gk0Wk/TiddlySeq/StorySpacing]] |<$edit-text tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/StorySpacing\" default=\"https://source.unsplash.com/random\" placeholder=\"如:3px\" tag=\"input\"/> |\n|[[标题栏毛玻璃效果|$:/plugins/Gk0Wk/TiddlySeq/BlurTitleBackground]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/BlurTitleBackground\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[菜单栏毛玻璃效果|$:/plugins/Gk0Wk/TiddlySeq/BlurMenubarBackground]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/BlurMenubarBackground\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[隐藏侧边栏标题|$:/plugins/Gk0Wk/TiddlySeq/HideSidebarTitle]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/HideSidebarTitle\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[隐藏侧边栏副标题|$:/plugins/Gk0Wk/TiddlySeq/HideSidebarSubtitle]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/HideSidebarSubtitle\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[隐藏侧边栏页面控制图标组|$:/plugins/Gk0Wk/TiddlySeq/HideSidebarPageControl]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/HideSidebarPageControl\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[隐藏侧边栏搜索框|$:/plugins/Gk0Wk/TiddlySeq/HideSidebarSearch]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/HideSidebarSearch\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n\n</div>\n\n> 本插件使用灵活而强大的 <$text text=\"TiddlyWiki\" /> 开发框架 [[Tiddly.ModernDev|https://github.com/tiddly-gittly/Modern.TiddlyDev]]\n\n</$list>\n\n<$list filter=\"[<lang>!search[zh]]\">\n\nThis plugin implements the main part of the TiddlySeq theme, including styles, and some widgets. @@color:red;Please use it with [[Vanilla theme|$:/themes/tiddlywiki/vanilla]]!@@\n\n!!! Settings\n\nThis theme follows the settings of the Vanilla theme as closely as possible, so most of the theme settings are located in [[Vanilla theme settings|$:/themes/tiddlywiki/vanilla/themetweaks]]. The rest of the settings are listed below.\n\n<div class=\"tc-control-panel\">\n\n|[[Bottom margin of story river|$:/plugins/Gk0Wk/TiddlySeq/StoryBottomMargin]] |<$edit-text tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/StoryBottomMargin\" placeholder=\"e.g. 28px\" tag=\"input\"/> |\n|[[Spacing of tiddlers|$:/plugins/Gk0Wk/TiddlySeq/StorySpacing]] |<$edit-text tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/StorySpacing\" placeholder=\"e.g. 3px\" tag=\"input\"/> |\n|[[Title bar hairy glass effect|$:/plugins/Gk0Wk/TiddlySeq/BlurTitleBackground]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/BlurTitleBackground\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[Menu bar hairy glass effect|$:/plugins/Gk0Wk/TiddlySeq/BlurMenubarBackground]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/BlurMenubarBackground\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[Hide sidebar title|$:/plugins/Gk0Wk/TiddlySeq/HideSidebarTitle]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/HideSidebarTitle\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[Hide sidebar subtitle|$:/plugins/Gk0Wk/TiddlySeq/HideSidebarSubtitle]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/HideSidebarSubtitle\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[Hide sidebar page control icon group|$:/plugins/Gk0Wk/TiddlySeq/HideSidebarPageControl]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/HideSidebarPageControl\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n|[[Hide sidebar search input|$:/plugins/Gk0Wk/TiddlySeq/HideSidebarSearch]] | <$checkbox tiddler=\"$:/plugins/Gk0Wk/TiddlySeq/HideSidebarSearch\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"/> |\n\n</div>\n\n> This plugin uses the flexible and powerful <$text text=\"TiddlyWiki\" /> development framework [[Tiddly.ModernDev|https://github.com/tiddly-gittly/Modern.TiddlyDev]]\n\n</$list>\n</$list>\n",
"requires-reload": "no"
},
{
"title": "$:/plugins/Gk0Wk/drawio",
"name": "draw.io",
"author": "Gk0Wk",
"description": "draw.io powerful diagram editor for TiddlyWiki",
"plugin-type": "plugin",
"version": "0.0.1",
"list": "readme config LICENSE",
"dependents": "",
"type": "application/json",
"Modern.TiddlyDev#SHA256-Hashed": "23473920ee4627dceda5dbc142a5e5fd9f179d9d45ff406d162f4178cc3770e5",
"readme": "<img src=\"https://www.drawio.com/assets/img/blog/feature-flag-gitflow-tags.png\" width=\"100%\" height=\"auto\" >\n\n<$list filter=\"[[$:/language]get[text]removeprefix[$:/languages/]else[en-GB]]\" variable=\"lang\">\n<$list filter=\"[<lang>search[zh]]\">\n\ndraw.io 是一个强大的在线图表编辑器,可以用来绘制流程图、组织结构图、UML图、网络图、平面图、电路图、数据库图、房屋平面图、地图等等。\n\n现在我将其集成到了 <$text text=\"TiddlyWiki\" /> 中,你可以在这里使用它。点击 {{$:/plugins/Gk0Wk/drawio/new-drawio-diagram-icon}} 按钮,就可以创建一个新的图表条目,该条目在非编辑模式下会显示其绘制的内容,而在编辑模式下则会进入 draw.io 的编辑界面。\n\n注意:编辑模式需要联网才能使用,因为 draw.io 是在线编辑器,初次加载需要一定的时间,所以请耐心等待。但是预览图片不需要联网,所以你可以在离线状态下查看图表,此时它和你其他的图片没有区别。\n\n你可以在插件的设置中修改编辑器在日间或夜间模式下的主题。\n\n在编辑器中,你可以导入和导出各种类型的图表文件。图标实际上将以 SVG+嵌入式 XML 的形式保存在 <$text text=\"TiddlyWiki\" /> 中,这样可以保证图表的可编辑性。你可以在编辑器中导出为各种格式的文件,也可以在 <$text text=\"TiddlyWiki\" /> 中导出为 SVG、PNG 等文件。\n\n你可以在这里查看 draw.io 的官方文档:https://www.drawio.com/\n\n快来试试吧!\n\n</$list>\n\n<$list filter=\"[<lang>!search[zh]]\">\n\ndraw.io is a powerful online diagram editor that can be used to draw flowcharts, organizational charts, UML diagrams, network diagrams, floor plans, circuit diagrams, database diagrams, house floor plans, maps, etc.\n\nNow I have integrated it into <$text text=\"TiddlyWiki\" />, you can use it here. Click the {{$:/plugins/Gk0Wk/drawio/new-drawio-diagram-icon}} button to create a new diagram tiddler, which will display its drawing content in non-editing mode, and will enter the draw.io editing interface in editing mode.\n\nNote: The editing mode requires networking, because draw.io is an online editor, which takes some time to load for the first time, so please be patient. But the preview image does not require networking, so you can view the chart in offline mode, and it is no different from your other images.\n\nYou can modify the theme of the editor in the settings of the plugin in day or night mode.\n\nIn the editor, you can import and export various types of chart files. The icon is actually saved in the form of SVG+embedded XML in <$text text=\"TiddlyWiki\" />, which ensures the editability of the chart. You can export to various formats of files in the editor, or export to SVG, PNG and other files in <$text text=\"TiddlyWiki\" />.\n\nYou can view the official documentation of draw.io here: https://www.drawio.com/\n\nCome and try it!\n\n</$list>\n</$list>\n",
"requires-reload": "yes"
},
{
"title": "$:/plugins/Gk0Wk/focused-tiddler",
"name": "Focused Tiddler",
Expand Down
Loading

0 comments on commit 1f53829

Please sign in to comment.