AgentSkillsCN

nova-codebase

自动生成 Nova 代码库地图。可通过 /project:sync-codebase 一键重新生成。

SKILL.md
--- frontmatter
name: nova-codebase
description: Auto-generated Nova codebase map. Regenerate with /project:sync-codebase
generated: 2026-01-30

Nova Codebase Map

This file is auto-generated. Do not edit manually. Regenerate with: /project:sync-codebase

File Structure

src/ai/

FileDescriptionKey Exports
context-limits.tsToken and context window limits per AI modelContextLimit, ProviderContextLimits, getContextLimit(), getProviderContextLimits(), getModelMaxOutputTokens()
models.tsCentralized model definitions for all AI providersModelDefinition, ModelConfig, getProviderTypeForModel(), getAvailableModels()
provider-manager.tsManages AI provider instances and model selectionAIProviderManager
types.tsType definitions for AI providers, messages, and streamingAIMessage, AIStreamResponse, AIProvider, AIGenerationOptions, ProviderConfig, ProviderType, PlatformSettings

src/ai/providers/

FileDescriptionKey Exports
claude.tsAnthropic Claude API integrationClaudeProvider
google.tsGoogle Gemini API integrationGoogleProvider
ollama.tsLocal Ollama API integrationOllamaProvider
openai.tsOpenAI GPT API integrationOpenAIProvider

src/core/

FileDescriptionKey Exports
ai-intent-classifier.tsAI-powered intent classification for ambiguous inputsUserIntent, AIIntentClassifier
command-parser.tsParses user input into structured edit commandsCommandParser
context-builder.tsBuilds document context for AI promptsGeneratedPrompt, ContextBuilder
context-calculator.tsCalculates token usage and context limitsContextUsage, estimateTokens(), calculateContextUsage(), getContextWarningLevel(), formatContextUsage(), getContextTooltip()
conversation-manager.tsManages file-scoped conversation storageDataStore, ConversationManager
crypto-service.tsEncrypts/decrypts sensitive data like API keysCryptoService
document-analysis.tsAnalyzes document structure and metadataDocumentStructure, DocumentAnalyzer
document-engine.tsCentral hub for all document manipulationDocumentEngine
intent-detector.tsClassifies user input as editing vs consultationIntentClassification, IntentDetector
prompt-builder.tsBuilds system and user prompts for AIPromptBuilder
types.tsType definitions for document editing and commandsEditAction, EditCommand, DocumentContext, HeadingInfo, EditResult, ConversationMessage, ContextDocumentRef, ConversationData

src/core/commands/

FileDescriptionKey Exports
add-command.tsHandles content insertion at cursorStreamingCallback, AddCommand
delete-command.tsHandles content removalDeleteCommand
edit-command.tsHandles in-place content modificationEditCommand
grammar-command.tsHandles grammar and spelling correctionsGrammarCommand
metadata-command.tsHandles frontmatter and tag modificationsMetadataCommand
rewrite-command.tsHandles content rewriting with tone/styleRewriteCommand
selection-edit-command.tsHandles editing selected textSelectionEditResult, SelectionEditCommand

src/features/commands/

FileDescriptionKey Exports
constants.tsConstants for Nova Commands systemINSIGHT_PANEL, MARGIN_INDICATORS, UI, COMMANDS, OPPORTUNITY_TITLES, CSS_CLASSES, CM_SELECTORS
types.tsType definitions for the Nova Commands systemMarkdownCommand, TemplateVariable, SmartContext, CommandExecutionContext, ExecutionOptions, CommandSuggestionsSettings, TimingDecision, TypingMetrics

src/features/commands/core/

FileDescriptionKey Exports
CommandEngine.tsCore system for executing commands and the /fill commandMarkerInsight, CommandEngine
SmartTimingEngine.tsCentralized timing service for command featuresTimingEvents, SmartTimingEngine
SmartVariableResolver.tsIntelligent resolution of template variablesSmartVariableResolver

src/features/commands/ui/

FileDescriptionKey Exports
InsightPanel.tsFull intelligence panel for command selectionInsightPanel
MarginIndicators.tsIntelligent margin indicators for command suggestionsMarginIndicators
codemirror-decorations.tsCodeMirror decorations for margin indicatorsaddIndicatorEffect, removeIndicatorEffect, clearIndicatorsEffect

src/licensing/

FileDescriptionKey Exports
feature-config.tsTime-gated feature configurationTimeGatedFeature, SUPERNOVA_FEATURES
feature-manager.tsManages feature flags and Supernova accessFeatureManager
license-validator.tsValidates Supernova license keysLicenseValidator
types.tsType definitions for licensing systemSupernovaLicense, SupernovaValidationResult, FeatureFlag, FeatureAccessResult, DebugSettings

src/ui/

FileDescriptionKey Exports
chat-renderer.tsRenders conversation messages in sidebarChatRenderer
command-system.tsHandles slash command detection and picker UICommandSystem
context-manager.tsManages multi-document context in sidebarDocumentReference, MultiDocContext, ContextManager
custom-command-modal.tsModal for creating/editing custom commandsCustomCommandModal
custom-instruction-modal.tsModal for custom editing instructionsCustomInstructionModal
input-handler.tsHandles text input and keyboard eventsInputHandler
provider-manager.tsUI components for provider/model selectionProviderManager
selection-context-menu.tsContext menu for text selection actionsSelectionAction, SELECTION_ACTIONS, SelectionContextMenu
sidebar-view.tsMain sidebar view with chat interfaceVIEW_TYPE_NOVA_SIDEBAR, NovaSidebarView
streaming-manager.tsManages AI response streaming to editorStreamingOptions, ActionType, StreamingManager
tone-selection-modal.tsModal for selecting rewrite toneToneOption, TONE_OPTIONS, ToneSelectionModal
wikilink-suggest.tsAutocomplete for [[wikilinks]] in inputNovaWikilinkAutocomplete

src/utils/

FileDescriptionKey Exports
logger.tsCentralized logging utility with levelsLogger, ScopedLogger, LogLevel
timeout-manager.tsObsidian-compliant timeout managementTimeoutManager

src/ (root)

FileDescriptionKey Exports
constants.tsShared constants and magic stringsNOVA_CONVERSATIONS_STORAGE_KEY, VIEW_TYPE_NOVA_SIDEBAR, NOVA_*, FEATURE_COMMANDS, PROVIDER_*
settings.tsPlugin settings UI and configurationCustomCommand, NovaSettings, DEFAULT_SETTINGS, NovaSettingTab

Component Dependencies

AI Layer (src/ai/)

provider-manager.ts imports from:

  • ./types - AIProvider, ProviderType, AIMessage, AIGenerationOptions, AIStreamResponse
  • ./providers/claude, ./providers/openai, ./providers/google, ./providers/ollama
  • ./models - getProviderTypeForModel
  • ./context-limits - getModelMaxOutputTokens
  • ../settings - NovaSettings
  • ../licensing/feature-manager - FeatureManager
  • ../utils/timeout-manager - TimeoutManager

providers/*.ts import from:

  • ../types - AIProvider, AIMessage, AIStreamResponse, ProviderConfig
  • ../../utils/logger - Logger
  • ../../utils/timeout-manager - TimeoutManager
  • obsidian - requestUrl

Core Layer (src/core/)

document-engine.ts imports from:

  • ./types - DocumentContext, EditResult, EditCommand
  • ./conversation-manager - ConversationManager, DataStore
  • ../utils/logger - Logger
  • obsidian - App, Editor, MarkdownView, TFile, EditorPosition

prompt-builder.ts imports from:

  • ./context-builder - ContextBuilder, GeneratedPrompt
  • ./document-engine - DocumentEngine
  • ./conversation-manager - ConversationManager
  • ./command-parser - CommandParser
  • ./types - EditCommand, DocumentContext, ConversationMessage

commands/*.ts import from:

  • ../document-engine - DocumentEngine
  • ../context-builder - ContextBuilder, GeneratedPrompt
  • ../../ai/provider-manager - AIProviderManager
  • ../types - EditCommand, EditResult, DocumentContext

Features Layer (src/features/commands/)

core/CommandEngine.ts imports from:

  • ../../../utils/logger - Logger
  • ../../../ui/streaming-manager - StreamingManager
  • ../../../ai/provider-manager - AIProviderManager
  • ../../../core/context-builder - ContextBuilder
  • ../../../core/document-engine - DocumentEngine
  • ../types - MarkdownCommand, CommandExecutionContext, SmartContext

ui/MarginIndicators.ts imports from:

  • ../core/SmartVariableResolver - SmartVariableResolver
  • ../core/CommandEngine - CommandEngine, MarkerInsight
  • ../core/SmartTimingEngine - SmartTimingEngine
  • ./InsightPanel - InsightPanel
  • ./codemirror-decorations - CodeMirrorIndicatorManager

UI Layer (src/ui/)

sidebar-view.ts imports from:

  • ../core/document-analysis - DocumentAnalyzer
  • ../core/types - EditCommand, EditResult
  • ./context-manager - ContextManager, MultiDocContext
  • ../ai/models - getAvailableModels, getProviderTypeForModel
  • ../ai/types - ProviderType
  • ./input-handler, ./command-system, ./chat-renderer, ./streaming-manager
  • ./selection-context-menu - SelectionContextMenu, SELECTION_ACTIONS
  • ../core/context-calculator - formatContextUsage, getContextWarningLevel
  • ../utils/logger, ../utils/timeout-manager

command-system.ts imports from:

  • ../features/commands/core/CommandEngine - CommandEngine
  • ../features/commands/core/SmartVariableResolver - SmartVariableResolver
  • ../features/commands/types - MarkdownCommand

streaming-manager.ts imports from:

  • ../utils/logger - Logger
  • ../utils/timeout-manager - TimeoutManager
  • obsidian - Editor, Notice, EditorPosition

Architectural Layers

code
┌─────────────────────────────────────────────────┐
│                    UI Layer                      │
│  sidebar-view, input-handler, streaming-manager  │
│  chat-renderer, context-manager, command-system  │
└─────────────────────┬───────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────┐
│                Features Layer                    │
│  commands/core/* (CommandEngine, SmartTiming)    │
│  commands/ui/* (MarginIndicators, InsightPanel)  │
└─────────────────────┬───────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────┐
│                   Core Layer                     │
│  document-engine, conversation-manager           │
│  prompt-builder, context-builder, intent-*       │
│  commands/* (add, edit, delete, grammar, etc)    │
└─────────────────────┬───────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────┐
│                    AI Layer                      │
│  provider-manager, models, context-limits        │
│  providers/* (claude, openai, google, ollama)    │
└─────────────────────┬───────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────┐
│                 Utils/Licensing                  │
│  logger, timeout-manager, feature-manager        │
│  license-validator, crypto-service               │
└─────────────────────────────────────────────────┘

Recent Changes

CommitSummary
1509417fix(compliance): remove console.log statements for plugin store readiness
dedc167feat(cancel): add cancellation support for all LLM operations
a6dc0e2fix(commands): improve Smart Fill UX with tooltips, sequential streaming, and error handling
d473eb5fix(commands): resolve "No placeholder found" error on fill icon click
cdfbd3bfix(compliance): replace addEventListener with registerDomEvent in CodeMirror widgets
4aaf608fix(commands): resolve notice disappearing during multi-fill + revert icon
9b1b824refactor(settings): consolidate Smart Fill tab into General
0d24637docs(readme): adopt professional tone matching website voice
77335ferefactor(commands): rebrand Commands to Smart Fill
968339arefactor(commands): simplify to marker-based /fill command

Generated by /project:sync-codebase. See .claude/skills/nova-patterns/SKILL.md for coding standards.