diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index 5a07333..06066e2 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -83,7 +83,7 @@ export const BaseChat = React.forwardRef(
{!chatStarted && ( -
+

Where ideas begin

diff --git a/app/components/chat/GitCloneButton.tsx b/app/components/chat/GitCloneButton.tsx index 5352ff6..40f7f5b 100644 --- a/app/components/chat/GitCloneButton.tsx +++ b/app/components/chat/GitCloneButton.tsx @@ -2,30 +2,7 @@ import ignore from 'ignore'; import { useGit } from '~/lib/hooks/useGit'; import type { Message } from 'ai'; import WithTooltip from '~/components/ui/Tooltip'; - -const IGNORE_PATTERNS = [ - 'node_modules/**', - '.git/**', - '.github/**', - '.vscode/**', - '**/*.jpg', - '**/*.jpeg', - '**/*.png', - 'dist/**', - 'build/**', - '.next/**', - 'coverage/**', - '.cache/**', - '.vscode/**', - '.idea/**', - '**/*.log', - '**/.DS_Store', - '**/npm-debug.log*', - '**/yarn-debug.log*', - '**/yarn-error.log*', - '**/*lock.json', - '**/*lock.yaml', -]; +import { IGNORE_PATTERNS } from '~/constants/ignorePatterns'; const ig = ignore().add(IGNORE_PATTERNS); const generateId = () => Math.random().toString(36).substring(2, 15); diff --git a/app/components/chat/ImportFolderButton.tsx b/app/components/chat/ImportFolderButton.tsx index 50146c9..56e3aa1 100644 --- a/app/components/chat/ImportFolderButton.tsx +++ b/app/components/chat/ImportFolderButton.tsx @@ -3,30 +3,13 @@ import type { Message } from 'ai'; import { toast } from 'react-toastify'; import ignore from 'ignore'; import WithTooltip from '~/components/ui/Tooltip'; +import { IGNORE_PATTERNS } from '~/constants/ignorePatterns'; interface ImportFolderButtonProps { className?: string; importChat?: (description: string, messages: Message[]) => Promise; } -// Common patterns to ignore, similar to .gitignore -const IGNORE_PATTERNS = [ - 'node_modules/**', - '.git/**', - 'dist/**', - 'build/**', - '.next/**', - 'coverage/**', - '.cache/**', - '.vscode/**', - '.idea/**', - '**/*.log', - '**/.DS_Store', - '**/npm-debug.log*', - '**/yarn-debug.log*', - '**/yarn-error.log*', -]; - const ig = ignore().add(IGNORE_PATTERNS); const generateId = () => Math.random().toString(36).substring(2, 15); diff --git a/app/constants/ignorePatterns.ts b/app/constants/ignorePatterns.ts new file mode 100644 index 0000000..c8e3693 --- /dev/null +++ b/app/constants/ignorePatterns.ts @@ -0,0 +1,27 @@ +export const IGNORE_PATTERNS = [ + 'node_modules/**', + '.git/**', + '.github/**', + '.vscode/**', + 'dist/**', + 'build/**', + '.next/**', + 'coverage/**', + '.cache/**', + '.vscode/**', + '.idea/**', + '**/*.log', + '**/.DS_Store', + '**/npm-debug.log*', + '**/yarn-debug.log*', + '**/yarn-error.log*', + '**/npm-debug.log*', + '**/yarn-debug.log*', + '**/yarn-error.log*', + '**/*lock.json', + '**/*lock.yaml', + // Binary files + '**/*.jpg', + '**/*.jpeg', + '**/*.png', +]; \ No newline at end of file