Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ LLM Integration ([English](docs/llm/llm-integration.en.md), [Español](docs/llm/
Development Conditions ([English](docs/meta/Copilot.md))

For more details, check the documentation in the [docs](docs/) folder.
- The [Notion Editor](docs/notion-editor.md) template demonstrates a Notion-style layout with a basic AI extension.
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Welcome to the documentation for the macOS editor. Below is a summary of the ava
- [Build Script](build-script.md)
- [Package.json File](package-json.md)
- [Splash Screen Functionality](splash-screen.md)
- [Notion Editor](notion-editor.md)
- [LLM Integration](llm/llm-integration.en.md)

## Documentation Structure
Expand All @@ -22,5 +23,6 @@ graph TD;
A --> F[Build Script];
A --> G[Package.json File];
A --> H[Splash Screen Functionality];
A --> I[Notion Editor];
A --> I[LLM Integration];
```
3 changes: 3 additions & 0 deletions docs/notion-editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Notion Editor

The Notion Editor uses the same toolbar from the Simple Editor but applies a Notion-style layout. It also loads a placeholder AI extension called `Agent` that demonstrates how to insert generated text with a custom command.
18 changes: 18 additions & 0 deletions src/components/tiptap-extension/agent-extension.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Extension } from "@tiptap/react"

export const Agent = Extension.create({
name: "agent",
addCommands() {
return {
generate:
(prompt: string) =>
async ({ commands }) => {
const aiText = `AI: ${prompt}`
commands.insertContent(aiText)
return true
},
}
},
})

export default Agent
Loading
Loading