@moontra/moonui-pro 2.8.14 → 2.9.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/dist/index.d.ts +78 -8
- package/dist/index.mjs +869 -219
- package/package.json +1 -1
- package/src/components/file-upload/index.tsx +1184 -287
- package/src/lib/ai-providers.ts +8 -8
package/src/lib/ai-providers.ts
CHANGED
|
@@ -94,17 +94,17 @@ export class GeminiProvider implements AIProvider {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
async rewrite(text: string): Promise<string> {
|
|
97
|
-
const prompt = `Rewrite
|
|
97
|
+
const prompt = `Rewrite the following text to make it clearer, more engaging, and better structured while maintaining the original meaning. Respond in the same language:\n\n${text}`;
|
|
98
98
|
return this.callGeminiAPI(prompt);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
async expand(text: string): Promise<string> {
|
|
102
|
-
const prompt = `Expand this text with more details and
|
|
102
|
+
const prompt = `Expand this text with more details, specific examples, explanations, and supporting information while keeping the same structure and tone. Respond in the same language:\n\n${text}`;
|
|
103
103
|
return this.callGeminiAPI(prompt);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
async summarize(text: string): Promise<string> {
|
|
107
|
-
const prompt = `Create a
|
|
107
|
+
const prompt = `Create a comprehensive summary that captures all key points, main arguments, important details, and significant examples from the text. The summary should be thorough enough to understand the core message. Respond in the same language:\n\n${text}`;
|
|
108
108
|
return this.callGeminiAPI(prompt);
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -204,21 +204,21 @@ export class OpenAIProvider implements AIProvider {
|
|
|
204
204
|
|
|
205
205
|
async rewrite(text: string): Promise<string> {
|
|
206
206
|
return this.callOpenAI(
|
|
207
|
-
'Rewrite to be clearer and
|
|
207
|
+
'Rewrite the text to be clearer, more engaging, and better structured while maintaining the original meaning. Respond in the same language as the input.',
|
|
208
208
|
text
|
|
209
209
|
);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
async expand(text: string): Promise<string> {
|
|
213
213
|
return this.callOpenAI(
|
|
214
|
-
'Expand with more details and
|
|
214
|
+
'Expand the text with more details, specific examples, explanations, and supporting information while keeping the same structure and tone. Respond in the same language as the input.',
|
|
215
215
|
text
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
async summarize(text: string): Promise<string> {
|
|
220
220
|
return this.callOpenAI(
|
|
221
|
-
'Create
|
|
221
|
+
'Create a comprehensive summary that captures all key points, main arguments, important details, and significant examples. The summary should be thorough enough to understand the core message. Respond in the same language as the input.',
|
|
222
222
|
text
|
|
223
223
|
);
|
|
224
224
|
}
|
|
@@ -323,11 +323,11 @@ export class ClaudeProvider implements AIProvider {
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
async expand(text: string): Promise<string> {
|
|
326
|
-
return this.callClaude(`Expand this text with more details.
|
|
326
|
+
return this.callClaude(`Expand this text with more details, specific examples, explanations, and supporting information while keeping the same structure and tone. Respond in the same language as the input:\n\n${text}`);
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
async summarize(text: string): Promise<string> {
|
|
330
|
-
return this.callClaude(`Create
|
|
330
|
+
return this.callClaude(`Create a comprehensive summary that captures all key points, main arguments, important details, and significant examples. The summary should be thorough enough to understand the core message. Respond in the same language as the input:\n\n${text}`);
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
async fixGrammar(text: string): Promise<string> {
|