|
4 | 4 | import { formatFileSizeError, isAcceptableFile, validateFileSize } from "@/app/aipanel/ai-utils"; |
5 | 5 | import { waveAIHasFocusWithin } from "@/app/aipanel/waveai-focus-utils"; |
6 | 6 | import { type WaveAIModel } from "@/app/aipanel/waveai-model"; |
| 7 | +import { Tooltip } from "@/element/tooltip"; |
7 | 8 | import { cn } from "@/util/util"; |
8 | 9 | import { useAtom, useAtomValue } from "jotai"; |
9 | 10 | import { memo, useCallback, useEffect, useRef } from "react"; |
@@ -145,31 +146,35 @@ export const AIPanelInput = memo(({ onSubmit, status, model }: AIPanelInputProps |
145 | 146 | style={{ fontSize: "13px" }} |
146 | 147 | rows={2} |
147 | 148 | /> |
148 | | - <button |
149 | | - type="button" |
150 | | - onClick={handleUploadClick} |
151 | | - className={cn( |
152 | | - "absolute bottom-6 right-1 w-3.5 h-3.5 transition-colors flex items-center justify-center text-gray-400 hover:text-accent cursor-pointer" |
153 | | - )} |
154 | | - > |
155 | | - <i className="fa fa-paperclip text-xs"></i> |
156 | | - </button> |
157 | | - <button |
158 | | - type="submit" |
159 | | - disabled={status !== "ready" || !input.trim()} |
160 | | - className={cn( |
161 | | - "absolute bottom-2 right-1 w-3.5 h-3.5 transition-colors flex items-center justify-center", |
162 | | - status !== "ready" || !input.trim() |
163 | | - ? "text-gray-400" |
164 | | - : "text-accent/80 hover:text-accent cursor-pointer" |
165 | | - )} |
166 | | - > |
167 | | - {status === "streaming" ? ( |
168 | | - <i className="fa fa-spinner fa-spin text-xs"></i> |
169 | | - ) : ( |
170 | | - <i className="fa fa-paper-plane text-xs"></i> |
171 | | - )} |
172 | | - </button> |
| 149 | + <Tooltip content="Attach files" placement="top" divClassName="absolute bottom-6.5 right-1"> |
| 150 | + <button |
| 151 | + type="button" |
| 152 | + onClick={handleUploadClick} |
| 153 | + className={cn( |
| 154 | + "w-5 h-5 transition-colors flex items-center justify-center text-gray-400 hover:text-accent cursor-pointer" |
| 155 | + )} |
| 156 | + > |
| 157 | + <i className="fa fa-paperclip text-sm"></i> |
| 158 | + </button> |
| 159 | + </Tooltip> |
| 160 | + <Tooltip content="Send message (Enter)" placement="top" divClassName="absolute bottom-1.5 right-1"> |
| 161 | + <button |
| 162 | + type="submit" |
| 163 | + disabled={status !== "ready" || !input.trim()} |
| 164 | + className={cn( |
| 165 | + "w-5 h-5 transition-colors flex items-center justify-center", |
| 166 | + status !== "ready" || !input.trim() |
| 167 | + ? "text-gray-400" |
| 168 | + : "text-accent/80 hover:text-accent cursor-pointer" |
| 169 | + )} |
| 170 | + > |
| 171 | + {status === "streaming" ? ( |
| 172 | + <i className="fa fa-spinner fa-spin text-sm"></i> |
| 173 | + ) : ( |
| 174 | + <i className="fa fa-paper-plane text-sm"></i> |
| 175 | + )} |
| 176 | + </button> |
| 177 | + </Tooltip> |
173 | 178 | </div> |
174 | 179 | </form> |
175 | 180 | </div> |
|
0 commit comments