sujal777 commited on
Commit
ddb920d
·
1 Parent(s): 56944de

refactor: simplify GitCloneButton component by removing unused tooltip and streamlining button structure

Browse files
app/commit.json CHANGED
@@ -1 +1 @@
1
- { "commit": "ff2726fd2fcf53a9fd2beac967f4c92c78d390bf" }
 
1
+ { "commit": "56944de6337f5283f96f197e11432fee32c085b9" }
app/components/chat/GitCloneButton.tsx CHANGED
@@ -1,7 +1,6 @@
1
  import ignore from 'ignore';
2
  import { useGit } from '~/lib/hooks/useGit';
3
  import type { Message } from 'ai';
4
- import WithTooltip from '~/components/ui/Tooltip';
5
  import { detectProjectCommands, createCommandsMessage } from '~/utils/projectCommands';
6
  import { generateId } from '~/utils/fileUtils';
7
 
@@ -73,7 +72,7 @@ export default function GitCloneButton({ importChat }: GitCloneButtonProps) {
73
  const filesMessage: Message = {
74
  role: 'assistant',
75
  content: `Cloning the repo ${repoUrl} into ${workdir}
76
- <boltArtifact id="imported-files" title="Git Cloned Files" type="bundled">
77
  ${fileContents
78
  .map(
79
  (file) =>
@@ -99,17 +98,13 @@ ${file.content}
99
  };
100
 
101
  return (
102
- <WithTooltip tooltip="Clone A Git Repo">
103
- <button
104
- onClick={(e) => {
105
- onClick(e);
106
- }}
107
- title="Clone A Git Repo"
108
- className="px-4 py-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary hover:bg-bolt-elements-background-depth-3 transition-all flex items-center gap-2"
109
- >
110
- <span className="i-ph:git-branch" />
111
- Clone A Git Repo
112
- </button>
113
- </WithTooltip>
114
  );
115
  }
 
1
  import ignore from 'ignore';
2
  import { useGit } from '~/lib/hooks/useGit';
3
  import type { Message } from 'ai';
 
4
  import { detectProjectCommands, createCommandsMessage } from '~/utils/projectCommands';
5
  import { generateId } from '~/utils/fileUtils';
6
 
 
72
  const filesMessage: Message = {
73
  role: 'assistant',
74
  content: `Cloning the repo ${repoUrl} into ${workdir}
75
+ <boltArtifact id="imported-files" title="Git Cloned Files" type="bundled">
76
  ${fileContents
77
  .map(
78
  (file) =>
 
98
  };
99
 
100
  return (
101
+ <button
102
+ onClick={onClick}
103
+ title="Clone a Git Repo"
104
+ className="px-4 py-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary hover:bg-bolt-elements-background-depth-3 transition-all flex items-center gap-2"
105
+ >
106
+ <span className="i-ph:git-branch" />
107
+ Clone a Git Repo
108
+ </button>
 
 
 
 
109
  );
110
  }