mirror of
https://github.com/yan-istart/IStart-Note-AI-Plugin.git
synced 2026-07-22 06:51:37 +00:00
release: 1.7.0
This commit is contained in:
parent
f9d6582444
commit
eee0ac32d0
27 changed files with 44 additions and 43 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "istart-note-ai",
|
||||
"name": "IStart-Note-AI",
|
||||
"version": "1.6.1",
|
||||
"version": "1.7.0",
|
||||
"minAppVersion": "1.4.0",
|
||||
"description": "Generate structured knowledge notes from questions and selected text using DeepSeek AI, with automatic concept pages, bidirectional links, and a question graph.",
|
||||
"author": "Yan",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "istart-note-ai",
|
||||
"version": "1.6.1",
|
||||
"version": "1.7.0",
|
||||
"description": "IStart-Note-AI: DeepSeek-powered knowledge graph plugin for Obsidian",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { requestUrl } from "obsidian";
|
||||
import { DeepSeekSettings, CompletionDepth, ConceptCompletionResult } from "./types";
|
||||
import { DeepSeekSettings, CompletionDepth, ConceptCompletionResult } from "../types";
|
||||
|
||||
const LIGHT_PROMPT = `你是一个个人知识图谱助手。请为以下概念生成简明的定义和关联概念。
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { requestUrl } from "obsidian";
|
||||
import { DeepSeekSettings, ContextQAInput, ContextQAResponse, Relation } from "./types";
|
||||
import { DeepSeekSettings, ContextQAInput, ContextQAResponse, Relation } from "../types";
|
||||
|
||||
const buildPrompt = (input: ContextQAInput): string => `请基于以下上下文回答问题。
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { requestUrl } from "obsidian";
|
||||
import { DeepSeekSettings, DeepSeekResponse } from "./types";
|
||||
import { DeepSeekSettings, DeepSeekResponse } from "../types";
|
||||
|
||||
const SYSTEM_PROMPT = `你是一个知识图谱构建助手。用户会向你提问,你需要:
|
||||
1. 给出清晰的回答
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { requestUrl } from "obsidian";
|
||||
import { DeepSeekSettings } from "./types";
|
||||
import { DeepSeekSettings } from "../types";
|
||||
|
||||
export type DiagramType =
|
||||
| "auto"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { requestUrl } from "obsidian";
|
||||
import { DeepSeekSettings, QuestionClassification } from "./types";
|
||||
import { DeepSeekSettings, QuestionClassification } from "../types";
|
||||
|
||||
const CLASSIFY_PROMPT = `你是一个知识图谱助手,负责对用户的问题进行分类和关联。
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { App, TFile, requestUrl } from "obsidian";
|
||||
import { DeepSeekSettings } from "./types";
|
||||
import { DeepSeekSettings } from "../types";
|
||||
|
||||
export interface SectionAppendResult {
|
||||
items: string[]; // 新增条目列表
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { App, Modal, Setting, MarkdownRenderer, Component } from "obsidian";
|
||||
import { CompletionDepth } from "./types";
|
||||
import { CompletionDepth } from "../../types";
|
||||
|
||||
export class DepthSelectModal extends Modal {
|
||||
private depth: CompletionDepth = "standard";
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { App, TFile, parseYaml, stringifyYaml, normalizePath } from "obsidian";
|
||||
import { ConceptCompletionResult, CompletionDepth, DeepSeekSettings } from "./types";
|
||||
import { ConceptCompletionResult, CompletionDepth, DeepSeekSettings } from "../../types";
|
||||
|
||||
export interface ConceptPageInfo {
|
||||
file: TFile;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { App, Modal, Setting, MarkdownRenderer, Component } from "obsidian";
|
||||
import { DiagramType, DiagramResult, DiagramGenerator } from "./DiagramGenerator";
|
||||
import { DiagramType, DiagramResult, DiagramGenerator } from "../../ai/DiagramGenerator";
|
||||
|
||||
/**
|
||||
* 图表类型选择弹窗
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { App, Modal, Setting } from "obsidian";
|
||||
import { QuestionClassification, QuestionCategory } from "./types";
|
||||
import { QuestionClassification, QuestionCategory } from "../../types";
|
||||
|
||||
const CATEGORY_LABELS: Record<QuestionCategory, string> = {
|
||||
new: "🆕 新问题",
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { App, TFile, normalizePath, stringifyYaml } from "obsidian";
|
||||
import { DeepSeekSettings, QuestionClassification } from "./types";
|
||||
import { DeepSeekSettings, QuestionClassification } from "../../types";
|
||||
|
||||
export interface QuestionMeta {
|
||||
file: TFile;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { App, Modal, Notice, Setting } from "obsidian";
|
||||
import { BaiduPanClient } from "./BaiduPanClient";
|
||||
import { BaiduSyncConfig } from "./types";
|
||||
import { BaiduSyncConfig } from "../../types";
|
||||
|
||||
export class BaiduAuthModal extends Modal {
|
||||
private code = "";
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
*/
|
||||
|
||||
import { requestUrl } from "obsidian";
|
||||
import { BaiduSyncConfig } from "./types";
|
||||
import { md5 } from "./md5";
|
||||
import { BaiduSyncConfig } from "../../types";
|
||||
import { md5 } from "../../util/md5";
|
||||
|
||||
const PAN_API = "https://pan.baidu.com/rest/2.0/xpan";
|
||||
const UPLOAD_API = "https://d.pcs.baidu.com/rest/2.0/pcs/superfile2";
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { App, Modal, Notice, Setting } from "obsidian";
|
||||
import { BaiduSyncService } from "./BaiduSyncService";
|
||||
import { BaiduSyncConfig } from "./types";
|
||||
import { BaiduSyncConfig } from "../../types";
|
||||
|
||||
type SyncMode = "sync" | "backup" | "restore";
|
||||
type ConflictStrategy = "local" | "remote" | "keep-both";
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { App, Notice, TFile } from "obsidian";
|
||||
import { BaiduSyncConfig, DeepSeekSettings, SyncableConfig } from "./types";
|
||||
import { BaiduSyncConfig, DeepSeekSettings, SyncableConfig } from "../../types";
|
||||
import { BaiduPanClient } from "./BaiduPanClient";
|
||||
import { BaiduSyncMeta, SyncAction, SyncPlan } from "./BaiduSyncMeta";
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ import { ItemView, Notice, TFile, WorkspaceLeaf } from "obsidian";
|
|||
import { BaiduSyncService } from "./BaiduSyncService";
|
||||
import { BaiduSyncMeta, SyncAction } from "./BaiduSyncMeta";
|
||||
import { BaiduPanClient } from "./BaiduPanClient";
|
||||
import type DeepSeekPlugin from "./main";
|
||||
import type DeepSeekPlugin from "../../main";
|
||||
|
||||
export const SYNC_VIEW_TYPE = "istart-baidu-sync-view";
|
||||
|
||||
40
src/main.ts
40
src/main.ts
|
|
@ -1,26 +1,26 @@
|
|||
import { Notice, Plugin, TFile, normalizePath } from "obsidian";
|
||||
import { DeepSeekSettings, DEFAULT_SETTINGS, CompletionDepth } from "./types";
|
||||
import { DeepSeekClient } from "./DeepSeekClient";
|
||||
import { VaultWriter } from "./VaultWriter";
|
||||
import { QuestionModal } from "./QuestionModal";
|
||||
import { DeepSeekSettingsTab } from "./SettingsTab";
|
||||
import { ConceptCompleter } from "./ConceptCompleter";
|
||||
import { ConceptPageManager } from "./ConceptPageManager";
|
||||
import { DepthSelectModal, PreviewModal, BatchScanModal } from "./ConceptCompletionModal";
|
||||
import { QuestionClassifier } from "./QuestionClassifier";
|
||||
import { QuestionGraphManager } from "./QuestionGraphManager";
|
||||
import { QuestionClassifyModal } from "./QuestionClassifyModal";
|
||||
import { ContextQAClient } from "./ContextQAClient";
|
||||
import { ContextQAModal } from "./ContextQAModal";
|
||||
import { SectionAppender } from "./SectionAppender";
|
||||
import { SectionAppendModal, SectionPreviewModal } from "./SectionAppendModal";
|
||||
import { BaiduSyncService } from "./BaiduSyncService";
|
||||
import { BaiduAuthModal } from "./BaiduAuthModal";
|
||||
import { BaiduSyncModal } from "./BaiduSyncModal";
|
||||
import { DeepSeekClient } from "./ai/DeepSeekClient";
|
||||
import { VaultWriter } from "./vault/VaultWriter";
|
||||
import { QuestionModal } from "./features/question/QuestionModal";
|
||||
import { DeepSeekSettingsTab } from "./settings/SettingsTab";
|
||||
import { ConceptCompleter } from "./ai/ConceptCompleter";
|
||||
import { ConceptPageManager } from "./features/concept/ConceptPageManager";
|
||||
import { DepthSelectModal, PreviewModal, BatchScanModal } from "./features/concept/ConceptCompletionModal";
|
||||
import { QuestionClassifier } from "./ai/QuestionClassifier";
|
||||
import { QuestionGraphManager } from "./features/question/QuestionGraphManager";
|
||||
import { QuestionClassifyModal } from "./features/question/QuestionClassifyModal";
|
||||
import { ContextQAClient } from "./ai/ContextQAClient";
|
||||
import { ContextQAModal } from "./features/context-qa/ContextQAModal";
|
||||
import { SectionAppender } from "./ai/SectionAppender";
|
||||
import { SectionAppendModal, SectionPreviewModal } from "./features/section/SectionAppendModal";
|
||||
import { BaiduSyncService } from "./features/sync/BaiduSyncService";
|
||||
import { BaiduAuthModal } from "./features/sync/BaiduAuthModal";
|
||||
import { BaiduSyncModal } from "./features/sync/BaiduSyncModal";
|
||||
import { DEFAULT_BAIDU_SYNC_CONFIG } from "./types";
|
||||
import { BaiduSyncView, SYNC_VIEW_TYPE } from "./BaiduSyncView";
|
||||
import { DiagramGenerator, DiagramType } from "./DiagramGenerator";
|
||||
import { DiagramTypeModal, DiagramPreviewModal } from "./DiagramModal";
|
||||
import { BaiduSyncView, SYNC_VIEW_TYPE } from "./features/sync/BaiduSyncView";
|
||||
import { DiagramGenerator, DiagramType } from "./ai/DiagramGenerator";
|
||||
import { DiagramTypeModal, DiagramPreviewModal } from "./features/diagram/DiagramModal";
|
||||
|
||||
export default class DeepSeekPlugin extends Plugin {
|
||||
settings: DeepSeekSettings;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { App, PluginSettingTab, Setting } from "obsidian";
|
||||
import type DeepSeekPlugin from "./main";
|
||||
import { BaiduAuthModal } from "./BaiduAuthModal";
|
||||
import type DeepSeekPlugin from "../main";
|
||||
import { BaiduAuthModal } from "../features/sync/BaiduAuthModal";
|
||||
|
||||
export class DeepSeekSettingsTab extends PluginSettingTab {
|
||||
constructor(app: App, private plugin: DeepSeekPlugin) {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { App, TFile, normalizePath } from "obsidian";
|
||||
import { DeepSeekResponse, DeepSeekSettings, ContextQAInput, ContextQAResponse } from "./types";
|
||||
import { DeepSeekResponse, DeepSeekSettings, ContextQAInput, ContextQAResponse } from "../types";
|
||||
|
||||
export class VaultWriter {
|
||||
constructor(private app: App, private settings: DeepSeekSettings) {}
|
||||
|
|
@ -9,5 +9,6 @@
|
|||
"1.5.6": "1.4.0",
|
||||
"1.5.7": "1.4.0",
|
||||
"1.6.0": "1.4.0",
|
||||
"1.6.1": "1.4.0"
|
||||
"1.6.1": "1.4.0",
|
||||
"1.7.0": "1.4.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue