Skip to content

Commit

Permalink
Merge pull request #1518 from terwer/release-please--branches--main--…
Browse files Browse the repository at this point in the history
…components--siyuan-plugin-publisher

chore(main): release siyuan-plugin-publisher 1.30.0
  • Loading branch information
terwer authored Dec 10, 2024
2 parents 3e6d55d + e177845 commit 249bdad
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.29.3"
".": "1.30.0"
}
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Changelog

## [1.30.0](https://github.com/terwer/siyuan-plugin-publisher/compare/siyuan-plugin-publisher-v1.29.3...siyuan-plugin-publisher-v1.30.0) (2024-12-10)
### Features
* add prompt manage for ai && fix ai bugs ([ff884e0](https://github.com/terwer/siyuan-plugin-publisher/commit/ff884e0fd8189bb1cae7666b304ffad07baa888f))
* fix ai bugs ([41bd058](https://github.com/terwer/siyuan-plugin-publisher/commit/41bd058d63353644e0a77d3b9e24ce88960210ed))
### Miscellaneous
* fix types ([61637b2](https://github.com/terwer/siyuan-plugin-publisher/commit/61637b2f00cef0383c46057a0a1d8783c6141dfd))
## [1.29.3](https://github.com/terwer/siyuan-plugin-publisher/compare/siyuan-plugin-publisher-v1.29.2...siyuan-plugin-publisher-v1.29.3) (2024-12-03)
### Bug Fixes
* [#1502](https://github.com/terwer/siyuan-plugin-publisher/issues/1502) image replace error in some cases ([fdf0d9e](https://github.com/terwer/siyuan-plugin-publisher/commit/fdf0d9e56d485fe4dcca200cdeefe8bc5ac174da))
## [1.29.2](https://github.com/terwer/siyuan-plugin-publisher/compare/siyuan-plugin-publisher-v1.29.1...siyuan-plugin-publisher-v1.29.2) (2024-12-02)
* [#1495](https://github.com/terwer/siyuan-plugin-publisher/issues/1495) support more path link ([0163276](https://github.com/terwer/siyuan-plugin-publisher/commit/0163276efb64f8e837733a3a2ae8b7fe8d86bd16))
* gitlab image exist case ([3f81f0c](https://github.com/terwer/siyuan-plugin-publisher/commit/3f81f0c51f38597ffad426e04b9c4016ebcc05af))
### Miscellaneous
* update docs ([df4c220](https://github.com/terwer/siyuan-plugin-publisher/commit/df4c2201d24136aa535ff9174ad733cb3e2ecf50))
## [1.29.1](https://github.com/terwer/siyuan-plugin-publisher/compare/siyuan-plugin-publisher-v1.29.0...siyuan-plugin-publisher-v1.29.1) (2024-12-02)
## [1.29.0](https://github.com/terwer/siyuan-plugin-publisher/compare/siyuan-plugin-publisher-v1.28.0...siyuan-plugin-publisher-v1.29.0) (2024-11-27)
### Features
* [#1231](https://github.com/terwer/siyuan-plugin-publisher/issues/1231) hexo slug error ([3fdfeea](https://github.com/terwer/siyuan-plugin-publisher/commit/3fdfeea12872b17ee9314421c4056ddd0886c58b))
* auto read siyuan api url via docker ([1d755bd](https://github.com/terwer/siyuan-plugin-publisher/commit/1d755bd554658dc4459bd6cbbd251ce0ad1e01c0))
## [1.28.0](https://github.com/terwer/siyuan-plugin-publisher/compare/siyuan-plugin-publisher-v1.27.0...siyuan-plugin-publisher-v1.28.0) (2024-11-26)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siyuan-plugin-publisher",
"version": "1.29.3",
"version": "1.30.0",
"description": "Publish articles from Siyuan Notes to platforms such as Yuque, Notion, Cnblogs, WordPress, Typecho, Hexo, Zhihu and more",
"repository": "terwer/siyuan-plugin-publisher",
"homepage": "https://github.com/terwer/siyuan-plugin-publisher",
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "siyuan-plugin-publisher",
"author": "terwer",
"url": "https://github.com/terwer/siyuan-plugin-publisher",
"version": "1.29.3",
"version": "1.30.0",
"minAppVersion": "2.9.0",
"backends": [
"windows",
Expand Down
14 changes: 11 additions & 3 deletions siyuan/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
* questions.
*/

import { App, confirm, getFrontend, Model, IObject, Plugin } from "siyuan"
import { App, confirm, getFrontend, IObject, Model, Plugin } from "siyuan"
import { SiyuanConfig, SiyuanKernelApi } from "zhi-siyuan-api"
import { createSiyuanAppLogger } from "./appLogger"
import { WidgetInvoke } from "./invoke/widgetInvoke"
import { Topbar } from "./topbar"
import { ILogger } from "zhi-lib-base"

import "./index.styl"
import { ConfigManager } from "~/siyuan/store/config.ts"
import MenuUtils from "~/siyuan/utils/menuUtils.ts"
import { PluginInvoke } from "~/siyuan/invoke/pluginInvoke.ts"
import { icons } from "~/siyuan/utils/svg.ts"
import { PreferenceConfigManager } from "~/siyuan/store/preferenceConfigManager.ts"

import "./index.styl"

/**
* 发布工具插件入口
*
Expand Down Expand Up @@ -177,5 +177,13 @@ export default class PublisherPlugin extends Plugin {
label: this.i18n.publishToQuick,
submenu: quickMenus,
})
// AI聊天
context.push({
iconHTML: `<span class="iconfont-icon">${icons.iconEye}</span>`,
label: this.i18n.aiChat,
click: async () => {
await this.widgetInvoke.showPublisherAiChatDialog(pageId)
},
})
}
}
4 changes: 2 additions & 2 deletions siyuan/invoke/widgetInvoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export class WidgetInvoke {
await this.showTab(`/`, this.pluginInstance.i18n.articleManage)
}

public async showPublisherAiChatDialog() {
let pageId: string | undefined = WidgetPageUtils.getPageId()
public async showPublisherAiChatDialog(pageId?: string) {
pageId = pageId ?? WidgetPageUtils.getPageId()
if (pageId == "") {
pageId = undefined
}
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "思源笔记发布辅助工具",
"version": "1.29.3",
"version": "1.30.0",
"manifest_version": 3,
"author": "terwer",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/mv2/manifest-v2-for-firefox.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "开发版 - 思源笔记发布辅助工具",
"version": "1.29.3",
"version": "1.30.0",
"manifest_version": 2,
"author": "terwer",
"icons": {
Expand Down
7 changes: 4 additions & 3 deletions src/pages/AiChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const formData = reactive({
chatOutput: "",
isLoading: false,
showPage: !StrUtil.isEmptyString(id),
usePage: false,
usePage: !StrUtil.isEmptyString(id),
siyuanPost: {} as Post,
})
Expand Down Expand Up @@ -232,9 +232,10 @@ const insertPromptToChat = (prompt: string) => {
if (!prompt) return
if (prompt.includes(CURRENT_CONTEXT)) {
formData.usePage = true
} else {
formData.usePage = false
}
formData.inputText = ""
formData.inputText = `${formData.inputText.trim()}\n${prompt}`.trim()
formData.inputText = prompt
// ElMessage.info(`已插入 Prompt:${prompt}`)
}
Expand Down
2 changes: 1 addition & 1 deletion widget.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sy-post-publisher",
"author": "terwer",
"url": "https://github.com/terwer/sy-post-publisher",
"version": "1.29.3",
"version": "1.30.0",
"minAppVersion": "2.9.0",
"backends": [
"windows",
Expand Down

0 comments on commit 249bdad

Please sign in to comment.