+
How can I assist you?
+ {suggestions?.prompts?.length ? (
+
+
Suggestions
+ {prompts.map((item, index) => (
+
}
+ className="w-full justify-start border-b hover:border-b-0 hover:rounded-md rounded-none"
+ icon={
+
+ }
onClick={() => {
- onValueChange(createLintSummaryPrompt(lint))
+ onValueChange(item.prompt)
onFocusInput?.()
}}
>
- {lint.detail ? lint.detail.replace(/`/g, '') : lint.title}
+ {item.title}
- )
- })}
+
+ ))}
- )}
+ ) : (
+ <>
+ {isLintsLoading ? (
+
+ {Array.from({ length: 6 }).map((_, index) => (
+
+ ))}
+
+ ) : (
+ <>
+ {performanceErrorLints.length > 0 && (
+
+
+ Improve Performance
+
+ {performanceErrorLints.map((lint, index) => {
+ return (
+
+ }
+ onClick={() => {
+ onValueChange(createLintSummaryPrompt(lint))
+ onFocusInput?.()
+ }}
+ >
+ {lint.detail ? lint.detail.replace('\\`', '') : lint.title}
+
+ )
+ })}
+
+ )}
-
-
Ideas
- {prompts.map((item, index) => (
-
- }
- onClick={() => {
- onValueChange(item.prompt)
- onFocusInput?.()
- }}
- >
- {item.title}
-
-
- ))}
-
- >
- )}
+ {securityErrorLints.length > 0 && (
+
+
+ Improve Security
+
+ {securityErrorLints.map((lint, index) => {
+ return (
+ }
+ onClick={() => {
+ onValueChange(createLintSummaryPrompt(lint))
+ onFocusInput?.()
+ }}
+ >
+ {lint.detail ? lint.detail.replace(/`/g, '') : lint.title}
+
+ )
+ })}
+
+ )}
+
+
+
Ideas
+ {prompts.map((item, index) => (
+
+ }
+ onClick={() => {
+ onValueChange(item.prompt)
+ onFocusInput?.()
+ }}
+ >
+ {item.title}
+
+ ))}
+
+ >
+ )}
+ >
+ )}
+