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() { async getChatSuggestions() {
try { try {
const models = await this.ollamaService.getModels() const models = await this.ollamaService.getModels()
if (!models) { if (!models || models.length === 0) {
return [] // If no models are available, return empty suggestions 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 Ollama was just installed, trigger Nomad docs discovery and embedding
if (service.service_name === SERVICE_NAMES.OLLAMA) { if (service.service_name === SERVICE_NAMES.OLLAMA) {
logger.info('[DockerService] Ollama installation complete. Enabling chat suggestions by default.') logger.info('[DockerService] Ollama installation complete. Default behavior is to not enable chat suggestions.')
await KVStore.setValue('chat.suggestionsEnabled', "true") await KVStore.setValue('chat.suggestionsEnabled', "false")
logger.info('[DockerService] Ollama installation complete. Triggering Nomad docs discovery...') logger.info('[DockerService] Ollama installation complete. Triggering Nomad docs discovery...')

View File

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

View File

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