decant-core 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,23 +6,23 @@ This package powers the AI chat extraction features in both [AI Chat Exporter](h
6
6
 
7
7
  ## Supported Platforms
8
8
 
9
- | Platform | Parser |
10
- |----------|--------|
11
- | ChatGPT | `ChatGPTParser` |
12
- | Claude | `ClaudeParser` |
13
- | Copilot | `CopilotParser` |
14
- | DeepSeek | `DeepSeekParser` |
15
- | Gemini | `GeminiParser` |
9
+ | Platform | Parser |
10
+ | ------------------- | ------------------------- |
11
+ | ChatGPT | `ChatGPTParser` |
12
+ | Claude | `ClaudeParser` |
13
+ | Copilot | `CopilotParser` |
14
+ | DeepSeek | `DeepSeekParser` |
15
+ | Gemini | `GeminiParser` |
16
16
  | Gemini Cloud Assist | `GeminiCloudAssistParser` |
17
- | Google AI Studio | `GoogleAIStudioParser` |
18
- | Google Search AI | `GoogleSearchAIParser` |
19
- | Lumo | `LumoParser` |
20
- | Meta AI | `MetaParser` |
21
- | Mistral | `MistralParser` |
22
- | NotebookLM | `NotebookLMParser` |
23
- | Perplexity | `PerplexityParser` |
24
- | Qwen | `QwenParser` |
25
- | Z AI | `ZAiParser` |
17
+ | Google AI Studio | `GoogleAIStudioParser` |
18
+ | Google Search AI | `GoogleSearchAIParser` |
19
+ | Lumo | `LumoParser` |
20
+ | Meta AI | `MetaParser` |
21
+ | Mistral | `MistralParser` |
22
+ | NotebookLM | `NotebookLMParser` |
23
+ | Perplexity | `PerplexityParser` |
24
+ | Qwen | `QwenParser` |
25
+ | Z AI | `ZAiParser` |
26
26
 
27
27
  ## Installation
28
28
 
@@ -39,7 +39,7 @@ npm install decant-core@file:../parser-core
39
39
  ## Usage
40
40
 
41
41
  ```js
42
- import { detectPlatform, parsers, isAiChatUrl } from 'decant-core';
42
+ import { detectPlatform, parsers, isAiChatUrl } from "decant-core";
43
43
 
44
44
  // Check if a URL is an AI chat platform
45
45
  if (isAiChatUrl(window.location.href)) {
@@ -60,13 +60,13 @@ if (isAiChatUrl(window.location.href)) {
60
60
 
61
61
  ```js
62
62
  // Individual parser
63
- import { ChatGPTParser } from 'decant-core';
63
+ import { ChatGPTParser } from "decant-core";
64
64
 
65
65
  // Detection helpers
66
- import { detectPlatform, isAiChatUrl, AI_CHAT_DOMAINS } from 'decant-core';
66
+ import { detectPlatform, isAiChatUrl, AI_CHAT_DOMAINS } from "decant-core";
67
67
 
68
68
  // Utilities
69
- import { convertToMarkdown, cleanMarkdown } from 'decant-core';
69
+ import { convertToMarkdown, cleanMarkdown } from "decant-core";
70
70
  ```
71
71
 
72
72
  ## Project Structure
package/ai/base.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export class ChatParser {
2
- name = 'Generic';
2
+ name = "Generic";
3
3
 
4
4
  getPlatformName() {
5
- return this.name || this.constructor.name.replace(/Parser$/, '');
5
+ return this.name || this.constructor.name.replace(/Parser$/, "");
6
6
  }
7
7
 
8
8
  constructor() {}
@@ -13,7 +13,7 @@ export class ChatParser {
13
13
  * @returns {boolean}
14
14
  */
15
15
  isAvailable(_url) {
16
- throw new Error('Not implemented');
16
+ throw new Error("Not implemented");
17
17
  }
18
18
 
19
19
  /**
@@ -21,6 +21,6 @@ export class ChatParser {
21
21
  * @returns {Promise<{ title: string, messages: Array<{role: string, content: string}>, metadata?: Record<string, string> }>}
22
22
  */
23
23
  async parse() {
24
- throw new Error('Not implemented');
24
+ throw new Error("Not implemented");
25
25
  }
26
26
  }