updated number inputs
This commit is contained in:
parent
0a24e91fd6
commit
928b49d95d
1 changed files with 66 additions and 7 deletions
|
|
@ -1,6 +1,13 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ArrowUpRight, Loader2, PlugZap, RefreshCw } from "lucide-react";
|
import {
|
||||||
|
ArrowUpRight,
|
||||||
|
Loader2,
|
||||||
|
Minus,
|
||||||
|
PlugZap,
|
||||||
|
Plus,
|
||||||
|
RefreshCw,
|
||||||
|
} from "lucide-react";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
import { Suspense, useCallback, useEffect, useState } from "react";
|
import { Suspense, useCallback, useEffect, useState } from "react";
|
||||||
import { useUpdateFlowSettingMutation } from "@/app/api/mutations/useUpdateFlowSettingMutation";
|
import { useUpdateFlowSettingMutation } from "@/app/api/mutations/useUpdateFlowSettingMutation";
|
||||||
|
|
@ -1054,12 +1061,36 @@ function KnowledgeSourcesPage() {
|
||||||
min="1"
|
min="1"
|
||||||
value={chunkSize}
|
value={chunkSize}
|
||||||
onChange={(e) => handleChunkSizeChange(e.target.value)}
|
onChange={(e) => handleChunkSizeChange(e.target.value)}
|
||||||
className="w-full pr-20"
|
className="w-full pr-20 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
|
||||||
/>
|
/>
|
||||||
<div className="absolute inset-y-0 right-0 flex items-center pr-8 pointer-events-none">
|
<div className="absolute inset-y-0 right-0 flex items-center">
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-placeholder-foreground mr-4 pointer-events-none">
|
||||||
characters
|
characters
|
||||||
</span>
|
</span>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<Button
|
||||||
|
aria-label="Increase value"
|
||||||
|
className="h-5 rounded-l-none rounded-br-none border-input border-b-[0.5px] focus-visible:relative"
|
||||||
|
variant="outline"
|
||||||
|
size="iconSm"
|
||||||
|
onClick={() =>
|
||||||
|
handleChunkSizeChange((chunkSize + 1).toString())
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Plus className="text-muted-foreground" size={8} />
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
aria-label="Decrease value"
|
||||||
|
className="h-5 rounded-l-none rounded-tr-none border-input border-t-[0.5px] focus-visible:relative"
|
||||||
|
variant="outline"
|
||||||
|
size="iconSm"
|
||||||
|
onClick={() =>
|
||||||
|
handleChunkSizeChange((chunkSize - 1).toString())
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Minus className="text-muted-foreground" size={8} />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</LabelWrapper>
|
</LabelWrapper>
|
||||||
|
|
@ -1073,12 +1104,40 @@ function KnowledgeSourcesPage() {
|
||||||
min="0"
|
min="0"
|
||||||
value={chunkOverlap}
|
value={chunkOverlap}
|
||||||
onChange={(e) => handleChunkOverlapChange(e.target.value)}
|
onChange={(e) => handleChunkOverlapChange(e.target.value)}
|
||||||
className="w-full pr-20"
|
className="w-full pr-20 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
|
||||||
/>
|
/>
|
||||||
<div className="absolute inset-y-0 right-0 flex items-center pr-8 pointer-events-none">
|
<div className="absolute inset-y-0 right-0 flex items-center">
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-placeholder-foreground mr-4 pointer-events-none">
|
||||||
characters
|
characters
|
||||||
</span>
|
</span>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<Button
|
||||||
|
aria-label="Increase value"
|
||||||
|
className="h-5 rounded-l-none rounded-br-none border-input border-b-[0.5px] focus-visible:relative"
|
||||||
|
variant="outline"
|
||||||
|
size="iconSm"
|
||||||
|
onClick={() =>
|
||||||
|
handleChunkOverlapChange(
|
||||||
|
(chunkOverlap + 1).toString()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Plus className="text-muted-foreground" size={8} />
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
aria-label="Decrease value"
|
||||||
|
className="h-5 rounded-l-none rounded-tr-none border-input border-t-[0.5px] focus-visible:relative"
|
||||||
|
variant="outline"
|
||||||
|
size="iconSm"
|
||||||
|
onClick={() =>
|
||||||
|
handleChunkOverlapChange(
|
||||||
|
(chunkOverlap - 1).toString()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Minus className="text-muted-foreground" size={8} />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</LabelWrapper>
|
</LabelWrapper>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue