fix(AI): leave chat suggestions disabled by default

This commit is contained in:
Jake Turner 2026-02-18 22:06:16 +00:00 committed by Jake Turner
parent 77f1868cf8
commit 43ebaa93c1
4 changed files with 13 additions and 5 deletions

View File

@ -32,7 +32,7 @@ export class ChatService {
async getChatSuggestions() {
try {
const models = await this.ollamaService.getModels()
if (!models) {
if (!models || models.length === 0) {
return [] // If no models are available, return empty suggestions
}

View File

@ -545,8 +545,8 @@ export class DockerService {
// If Ollama was just installed, trigger Nomad docs discovery and embedding
if (service.service_name === SERVICE_NAMES.OLLAMA) {
logger.info('[DockerService] Ollama installation complete. Enabling chat suggestions by default.')
await KVStore.setValue('chat.suggestionsEnabled', "true")
logger.info('[DockerService] Ollama installation complete. Default behavior is to not enable chat suggestions.')
await KVStore.setValue('chat.suggestionsEnabled', "false")
logger.info('[DockerService] Ollama installation complete. Triggering Nomad docs discovery...')

View File

@ -11,6 +11,7 @@ interface ChatInterfaceProps {
onSendMessage: (message: string) => void
isLoading?: boolean
chatSuggestions?: string[]
chatSuggestionsEnabled?: boolean
chatSuggestionsLoading?: boolean
}
@ -19,6 +20,7 @@ export default function ChatInterface({
onSendMessage,
isLoading = false,
chatSuggestions = [],
chatSuggestionsEnabled = false,
chatSuggestionsLoading = false,
}: ChatInterfaceProps) {
const [input, setInput] = useState('')
@ -69,7 +71,7 @@ export default function ChatInterface({
<p className="text-gray-500 text-sm">
Interact with your installed language models directly in the Command Center.
</p>
{chatSuggestions && chatSuggestions.length > 0 && !chatSuggestionsLoading && (
{chatSuggestionsEnabled && chatSuggestions && chatSuggestions.length > 0 && !chatSuggestionsLoading && (
<div className="mt-8">
<h4 className="text-sm font-medium text-gray-600 mb-2">Suggestions:</h4>
<div className="flex flex-col gap-2">
@ -92,7 +94,12 @@ export default function ChatInterface({
</div>
)}
{/* Display bouncing dots while loading suggestions */}
{chatSuggestionsLoading && <BouncingDots text="Thinking" containerClassName="mt-8" />}
{chatSuggestionsEnabled && chatSuggestionsLoading && <BouncingDots text="Thinking" containerClassName="mt-8" />}
{!chatSuggestionsEnabled && (
<div className="mt-8 text-sm text-gray-500">
Need some inspiration? Enable chat suggestions in settings to get started with example prompts.
</div>
)}
</div>
</div>
) : (

View File

@ -284,6 +284,7 @@ export default function Chat({
onSendMessage={handleSendMessage}
isLoading={chatMutation.isPending}
chatSuggestions={chatSuggestions}
chatSuggestionsEnabled={suggestionsEnabled}
chatSuggestionsLoading={chatSuggestionsLoading}
/>
</div>