0-1开发自己的obsidian plugin DAY 9

3 weeks later 终于收到了obsidian human review的回复(会同步通知在绑定GitHub的邮箱)

从我欠考虑的desktop/mobile应用 到细节上的UI界面大小写 给出了详细反馈。


一是网页response的问题。

之前我用的是axios.get(), 但建议统一为Obsidian API提供的requestUrl。

二是大小写问题。

在UI界面上,需要统一成sentence case,即I Am A Student. -> I am a student. 仅首字母大写。

三是平台支持问题。

主要先是分了桌面端/移动端,如果一个应用只支持desktop的话,应该在manifest.json里修改"isDesktopOnly": true,

其次,在desktop设备里,似乎是可以只支持某一种的(如仅支持Mac),只需要1) 在readme中说明,2) 相关验证保证the code is only being executed on a Mac. 我目前的解决方案是加入平台检查:

TypeScript 复制代码
        if (os.platform() !== 'darwin') {
            new Notice('This feature is only supported on macOS.');
            return;
        }

四是路径,

const absPath = app.vault.adapter.basePath;

不建议global的方式,建议采用plugin instance。我参考了这个回复中关于FileSystemAdapter的方案How to get vault absolute path? - #2 by Jare - Developers: Plugin & API - Obsidian Forum

相关推荐
想要成为糕糕手1 小时前
🚀 在浏览器里跑 DeepSeek-R1?WebGPU 端侧推理实战(六)—— 完结篇:消息渲染与流式收尾
react.js·typescript·llm
sunly_2 小时前
TypeScript:3、类型声明与类型推断
javascript·ubuntu·typescript
京东云开发者7 小时前
【全栈实践】第一个 AI Agent 项目:从零搭建 AI 音频创作助手(进阶篇)
typescript·fastapi·vuex
满栀5859 小时前
vue3动态路由详细效果
前端·javascript·vue.js·typescript·前端框架
mCell18 小时前
DeepSeek Harness 速览:“一切皆插件”意味着什么
typescript·agent·deepseek
京东云开发者1 天前
【全栈实践】第一个 AI Agent 项目:从零搭建 AI 音频创作助手(入门篇)
typescript·agent·vuex
王林不想说话1 天前
React + Ant Design 后台项目:63 个业务组件的分层实践
react.js·typescript·ant design
大家的林语冰1 天前
👍 超越 ESLint,Oxc 优先采用 TypeScript 7,Rust 和 Go 梦幻联动!
前端·javascript·typescript
embedded大铭1 天前
ai时代上站记录
typescript
用户938515635072 天前
从零在浏览器里跑 DeepSeek-R1:WebGPU + Transformers.js 全链路实战(三)
前端·react.js·typescript