diff --git a/README.md b/README.md
index 830c31d7c..3d872f654 100644
--- a/README.md
+++ b/README.md
@@ -76,21 +76,14 @@ For more information on how to use the following functions, please see [characte
## Changelogs
-### [v3.73.1](https://github.com/purocean/yn/releases/tag/v3.73.1) 2024-07-16
-
-[Windows](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-win-x64-3.73.1.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-mac-arm64-3.73.1.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-mac-x64-3.73.1.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-linux-x86_64-3.73.1.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-linux-amd64-3.73.1.deb)
-
-4. feat: Optimize file creation feature, add file type selection
-5. feat: Quick jump/recent documents function supports more file types
-6. feat: Add support for the `code-group` container block compatible with [VitePress](https://vitepress.dev/zh/guide/markdown#code-groups) style
-7. feat: Support for customizing the repository switch shortcut key. If your keyboard layout is not US, you can clear or change the shortcut key to avoid input interference
-8. feat: Optimize the selection of text in the code execution result, now you can select all the output content by double-clicking the execution result area
-9. feat: Optimize the function of opening HTML files
-10. feat: Support editing `.mjs`, `.mts`, '.cjs', `.cts` files
-11. feat: Optimize navigation history
-12. fix: Fix the issue of not being able to display directories ending with `git`, such as `testgit`
-13. feat(plugin): Add API related to file type registration, such as `ctx.doc.registerDocCategory`
-14. feat(plugin): Add API for changing directory tree operation buttons `ctx.tree.tapNodeActionButtons`
+### [v3.74.0](https://github.com/purocean/yn/releases/tag/v3.74.0) 2024-07-23
+
+[Windows](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-win-x64-3.74.0.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-mac-arm64-3.74.0.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-mac-x64-3.74.0.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-linux-x86_64-3.74.0.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-linux-amd64-3.74.0.deb)
+
+1. feat: Support configuring the maximum width of the preview area content display in settings.
+2. refactor: Run JavaScript code in Web Worker by default, and terminate execution when switching documents.
+3. fix: Fix the error that occurs when the terminal shell configuration is an empty string.
+4. fix: Fix the issue where the to-do list cannot be completed after upgrading the Monaco editor.
[More release notes](https://github.com/purocean/yn/releases)
diff --git a/README_ZH-CN.md b/README_ZH-CN.md
index 901de07e6..abb381e3c 100644
--- a/README_ZH-CN.md
+++ b/README_ZH-CN.md
@@ -76,21 +76,14 @@
## 更新日志
-### [v3.73.1](https://github.com/purocean/yn/releases/tag/v3.73.1) 2024-07-16
-
-[Windows](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-win-x64-3.73.1.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-mac-arm64-3.73.1.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-mac-x64-3.73.1.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-linux-x86_64-3.73.1.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.73.1/Yank-Note-linux-amd64-3.73.1.deb)
-
-4. feat: 优化文件创建功能,增加文件类型选择
-5. feat: 快速跳转/最近打开文档功能支持更多文件类型
-6. feat: 增加兼容[VitePress](https://vitepress.dev/zh/guide/markdown#code-groups) 风格的 `code-group` 容器块
-7. feat: 支持自定义切换仓库快捷键。如果你的键盘布局不是 US,可以清除或更改快捷键避免干扰输入
-8. feat: 优化运行代码结果文本选择,现在双击运行结果区域即可选中所有的输出内容
-9. feat: 优化打开 HTML 文件功能
-10. feat: 支持编辑 `.mjs`, `.mts`, '.cjs', `.cts` 文件
-11. feat: 优化导航历史记录
-12. fix: 修复不能显示 `git` 结尾的目录问题如 `testgit`
-13. feat(plugin): 增加注册文件类型相关 Api 如 `ctx.doc.registerDocCategory`
-14. feat(plugin): 增加更改目录树操作按钮 Api `ctx.tree.tapNodeActionButtons`
+### [v3.74.0](https://github.com/purocean/yn/releases/tag/v3.74.0) 2024-07-23
+
+[Windows](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-win-x64-3.74.0.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-mac-arm64-3.74.0.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-mac-x64-3.74.0.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-linux-x86_64-3.74.0.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.74.0/Yank-Note-linux-amd64-3.74.0.deb)
+
+1. feat: 支持在设置中配置预览区域内容显示最大宽度
+2. refactor: 默认在 Web Worker 中运行 JavaScript 代码,切换文档时候中止执行
+3. fix: 修复终端 shell 配置空字符串时候报错问题
+4. fix: 修复升级 Monaco 编辑器后不能补全待办列表问题
[更多发布说明](https://github.com/purocean/yn/releases)
diff --git a/help/FEATURES.md b/help/FEATURES.md
index 761295140..095754a9a 100644
--- a/help/FEATURES.md
+++ b/help/FEATURES.md
@@ -285,13 +285,26 @@ Support to run `JavaScript` `PHP` `nodejs` `Python` `bash` `bat` code.
This function is implemented by executing external commands, so the corresponding environment needs to be installed.
The first line of the code block needs to contain the string `--run--`, an example is as follows
+
+The JS code runs in a Web Worker by default. If you need to run it in the main thread, you can add the `--no-worker--` parameter after the code block.
+
```js
// --run--
await new Promise(r => setTimeout(r, 500))
+console.log('HELLOWORLD')
+```
+
+The code running in the main thread supports accessing the editor API using the `ctx` object, as shown in the following example.
+
+```js
+// --run-- --no-worker--
+await new Promise(r => setTimeout(r, 500))
ctx.ui.useToast().show("info", "HELLOWORLD!")
console.log('HELLOWORLD')
```
+If HTML output is required, the `--output-html--` parameter can be added after the code block.
+
```js
// --run-- --output-html--
console.log(`output HTML`)
diff --git a/help/FEATURES_ZH-CN.md b/help/FEATURES_ZH-CN.md
index ef706dba4..50990e946 100644
--- a/help/FEATURES_ZH-CN.md
+++ b/help/FEATURES_ZH-CN.md
@@ -285,13 +285,26 @@ $\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\p
此功能执行外部命令实现,所以需要安装相应环境。
代码块第一行需要包含以 `--run--` 字符串,示例如下
+
+Js 代码默认在 Web Worker 中运行,如果需要在主线程中运行,可以在代码块后面加上 `--no-worker--` 参数
+
```js
// --run--
await new Promise(r => setTimeout(r, 500))
+console.log('HELLOWORLD')
+```
+
+主线程中运行的代码支持使用 `ctx` 对象访问编辑器 API,示例如下
+
+```js
+// --run-- --no-worker--
+await new Promise(r => setTimeout(r, 500))
ctx.ui.useToast().show("info", "HELLOWORLD!")
console.log('HELLOWORLD')
```
+如果需要输出 HTML,可以在代码块后面加上 `--output-html--` 参数
+
```js
// --run-- --output-html--
console.log(`output HTML`)
diff --git a/package.json b/package.json
index 361affd0d..9f98203d8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "yank.note",
- "version": "3.73.1",
+ "version": "3.74.0",
"description": "Yank Note: A highly extensible Markdown editor, designed for productivity.",
"main": "dist/main/app.js",
"license": "AGPL-3.0",
diff --git a/src/main/shell.ts b/src/main/shell.ts
index b60aa0915..88d0d48a6 100644
--- a/src/main/shell.ts
+++ b/src/main/shell.ts
@@ -8,7 +8,7 @@ const CD_COMMAND_PREFIX = '--yank-note-run-command-cd--'
const defaultShell = os.platform() === 'win32' ? 'cmd.exe' : (process.env.SHELL || 'bash')
const getShell = () => {
- const shell = config.get(configKey, defaultShell) || defaultShell
+ const shell = (config.get(configKey, defaultShell) || '').trim() || defaultShell
// use full path
// TODO better way.
diff --git a/src/renderer/components/DefaultPreviewerRender.ce.vue b/src/renderer/components/DefaultPreviewerRender.ce.vue
index c8c63e303..c124271b2 100644
--- a/src/renderer/components/DefaultPreviewerRender.ce.vue
+++ b/src/renderer/components/DefaultPreviewerRender.ce.vue
@@ -1,5 +1,5 @@
-