mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 21:29:08 +00:00
Merge branch 'master' of github.com:khoj-ai/khoj into features/improve-tool-selection
This commit is contained in:
@@ -170,7 +170,12 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
|
||||
}
|
||||
|
||||
let messageToSend = message.trim();
|
||||
if (useResearchMode && !messageToSend.startsWith("/research")) {
|
||||
// Check if message starts with an explicit slash command
|
||||
const startsWithSlashCommand =
|
||||
props.chatOptionsData &&
|
||||
Object.keys(props.chatOptionsData).some((cmd) => messageToSend.startsWith(`/${cmd}`));
|
||||
// Only add /research if useResearchMode is enabled and message doesn't already use a slash command
|
||||
if (useResearchMode && !startsWithSlashCommand) {
|
||||
messageToSend = `/research ${messageToSend}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user