From 713d3e06c0c45e7c2edf9b0e467db3cdd487bce7 Mon Sep 17 00:00:00 2001 From: chadmin Date: Fri, 18 Oct 2024 17:14:13 -0700 Subject: [PATCH] feat(new tool) AI prompt splitter --- components.d.ts | 1 + locales/en.yml | 4 + .../ai-prompt-splitter/ai-prompt-splitter.vue | 282 ++++++++++++++++++ src/tools/ai-prompt-splitter/index.ts | 12 + src/tools/index.ts | 2 + 5 files changed, 301 insertions(+) create mode 100644 src/tools/ai-prompt-splitter/ai-prompt-splitter.vue create mode 100644 src/tools/ai-prompt-splitter/index.ts diff --git a/components.d.ts b/components.d.ts index 3e65c3cc..dfc6512c 100644 --- a/components.d.ts +++ b/components.d.ts @@ -11,6 +11,7 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { '404.page': typeof import('./src/pages/404.page.vue')['default'] About: typeof import('./src/pages/About.vue')['default'] + AiPromptSplitter: typeof import('./src/tools/ai-prompt-splitter/ai-prompt-splitter.vue')['default'] App: typeof import('./src/App.vue')['default'] AsciiTextDrawer: typeof import('./src/tools/ascii-text-drawer/ascii-text-drawer.vue')['default'] 'Base.layout': typeof import('./src/layouts/base.layout.vue')['default'] diff --git a/locales/en.yml b/locales/en.yml index b195dbd8..e782d122 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -392,3 +392,7 @@ tools: text-to-binary: title: Text to ASCII binary description: Convert text to its ASCII binary representation and vice-versa. + + ai-prompt-splitter: + title: AI prompt splitter + description: Split up large prompts into smaller, manageable segments based on a set character limit for AI chat prompts. diff --git a/src/tools/ai-prompt-splitter/ai-prompt-splitter.vue b/src/tools/ai-prompt-splitter/ai-prompt-splitter.vue new file mode 100644 index 00000000..445a01a5 --- /dev/null +++ b/src/tools/ai-prompt-splitter/ai-prompt-splitter.vue @@ -0,0 +1,282 @@ + + + + + diff --git a/src/tools/ai-prompt-splitter/index.ts b/src/tools/ai-prompt-splitter/index.ts new file mode 100644 index 00000000..b525c55c --- /dev/null +++ b/src/tools/ai-prompt-splitter/index.ts @@ -0,0 +1,12 @@ +import { Messages } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Ai prompt splitter', + path: '/ai-prompt-splitter', + description: '', + keywords: ['ai', 'prompt', 'splitter'], + component: () => import('./ai-prompt-splitter.vue'), + icon: Messages, + createdAt: new Date('2024-10-18'), +}); diff --git a/src/tools/index.ts b/src/tools/index.ts index 388cfaf4..c1026e1e 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -1,6 +1,7 @@ import { tool as base64FileConverter } from './base64-file-converter'; import { tool as base64StringConverter } from './base64-string-converter'; import { tool as basicAuthGenerator } from './basic-auth-generator'; +import { tool as aiPromptSplitter } from './ai-prompt-splitter'; import { tool as emailNormalizer } from './email-normalizer'; import { tool as asciiTextDrawer } from './ascii-text-drawer'; @@ -184,6 +185,7 @@ export const toolsByCategory: ToolCategory[] = [ textDiff, numeronymGenerator, asciiTextDrawer, + aiPromptSplitter, ], }, {