mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 02:46:25 +02:00
fix: nested button, empty options fallback, skip intermediate tool_calls
This commit is contained in:
parent
5f354ef6ac
commit
60b9f0f21c
2 changed files with 16 additions and 4 deletions
|
|
@ -274,7 +274,13 @@ export default function SuggestionPage() {
|
|||
|
||||
const TRUNCATE_LENGTH = 120;
|
||||
|
||||
if (options.length === 0) return null;
|
||||
if (options.length === 0) {
|
||||
return (
|
||||
<div className="suggestion-tooltip suggestion-error">
|
||||
<span className="suggestion-error-text">No suggestions available.</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="suggestion-tooltip">
|
||||
|
|
@ -288,11 +294,15 @@ export default function SuggestionPage() {
|
|||
: option;
|
||||
|
||||
return (
|
||||
<button
|
||||
<div
|
||||
key={index}
|
||||
type="button"
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
className="suggestion-option"
|
||||
onClick={() => handleSelect(option)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") handleSelect(option);
|
||||
}}
|
||||
>
|
||||
<span className="option-number">{index + 1}</span>
|
||||
<span className="option-text">{displayText}</span>
|
||||
|
|
@ -308,7 +318,7 @@ export default function SuggestionPage() {
|
|||
{isExpanded ? "less" : "more"}
|
||||
</button>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue