mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
refactor: standardize limit alert formatting in MemoryContent and TeamMemoryManager components, and enhance FloatingToolbar
This commit is contained in:
parent
187ad46bc9
commit
a2e350ff02
4 changed files with 9 additions and 9 deletions
|
|
@ -99,7 +99,7 @@ export function MemoryContent() {
|
|||
<Alert className="bg-muted/50 py-3 md:py-4">
|
||||
<Info className="h-3 w-3 md:h-4 md:w-4 shrink-0" />
|
||||
<AlertDescription className="text-xs md:text-sm">
|
||||
SurfSense uses this personal memory to personalize your responses across all conversations.
|
||||
<p>SurfSense uses this personal memory to personalize your responses across all conversations. Supports <span className="font-medium">Markdown</span> formatting.</p>
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
|
||||
|
|
@ -119,8 +119,8 @@ export function MemoryContent() {
|
|||
<div className="flex items-center justify-between">
|
||||
<span className={`text-xs ${getCounterColor()}`}>
|
||||
{charCount.toLocaleString()} / {MEMORY_HARD_LIMIT.toLocaleString()} characters
|
||||
{charCount > 20_000 && charCount <= MEMORY_HARD_LIMIT && " — Approaching limit"}
|
||||
{isOverLimit && " — Exceeds limit"}
|
||||
{charCount > 20_000 && charCount <= MEMORY_HARD_LIMIT && " - Approaching limit"}
|
||||
{isOverLimit && " - Exceeds limit"}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ export const minimalPreset: AnyPluginConfig[] = [
|
|||
...ListKit,
|
||||
...CodeBlockKit,
|
||||
...LinkKit,
|
||||
...FloatingToolbarKit,
|
||||
...AutoformatKit,
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ export function TeamMemoryManager({ searchSpaceId }: TeamMemoryManagerProps) {
|
|||
<Alert className="bg-muted/50 py-3 md:py-4">
|
||||
<Info className="h-3 w-3 md:h-4 md:w-4 shrink-0" />
|
||||
<AlertDescription className="text-xs md:text-sm">
|
||||
SurfSense uses this shared memory to provide team-wide context across all conversations in this search space.
|
||||
<p>SurfSense uses this shared memory to provide team-wide context across all conversations in this search space. Supports <span className="font-medium">Markdown</span> formatting.</p>
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
|
||||
|
|
@ -123,8 +123,8 @@ export function TeamMemoryManager({ searchSpaceId }: TeamMemoryManagerProps) {
|
|||
<div className="flex items-center justify-between">
|
||||
<span className={`text-xs ${getCounterColor()}`}>
|
||||
{charCount.toLocaleString()} / {MEMORY_HARD_LIMIT.toLocaleString()} characters
|
||||
{charCount > 20_000 && charCount <= MEMORY_HARD_LIMIT && " — Approaching limit"}
|
||||
{isOverLimit && " — Exceeds limit"}
|
||||
{charCount > 20_000 && charCount <= MEMORY_HARD_LIMIT && " - Approaching limit"}
|
||||
{isOverLimit && " - Exceeds limit"}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -65,8 +65,9 @@ export function FloatingToolbar({
|
|||
{...rootProps}
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"scrollbar-hide absolute z-50 overflow-x-auto whitespace-nowrap rounded-md border bg-popover p-1 opacity-100 shadow-md print:hidden",
|
||||
"max-w-[80vw]",
|
||||
"scrollbar-hide absolute z-50 overflow-x-auto whitespace-nowrap rounded-md border dark:border-neutral-700 bg-muted p-1 opacity-100 shadow-md print:hidden",
|
||||
"max-w-[80vw]",
|
||||
"[&_button:hover]:bg-neutral-200 dark:[&_button:hover]:bg-neutral-700",
|
||||
className
|
||||
)}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue