fix(botui): ensure heuristic switchers are correctly identified
This commit is contained in:
parent
47412722fe
commit
42c22cfcab
1 changed files with 9 additions and 8 deletions
|
|
@ -972,11 +972,12 @@ function hideThinkingIndicator() {
|
||||||
|
|
||||||
var chip = document.createElement("button");
|
var chip = document.createElement("button");
|
||||||
// More robust switcher detection: check action type or context/switcher fields
|
// More robust switcher detection: check action type or context/switcher fields
|
||||||
var isSwitcher = (suggestion.type === "switcher") || (action && (
|
var isSwitcher = (suggestion.type === "switcher") ||
|
||||||
|
(suggestion.text && suggestion.text.toLowerCase().includes("tabela")) || // Heuristic for current bot
|
||||||
|
(action && (
|
||||||
action.type === "switch_context" ||
|
action.type === "switch_context" ||
|
||||||
action.type === "select_context" ||
|
action.type === "select_context" ||
|
||||||
action.type === "switcher" ||
|
action.type === "switcher" ||
|
||||||
suggestion.text.toLowerCase().includes("tabela") || // Heuristic for current bot
|
|
||||||
action.switcher ||
|
action.switcher ||
|
||||||
action.context
|
action.context
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue