├── src
├── vite-env.d.ts
├── components
│ ├── Sheet.tsx
│ ├── ui
│ │ ├── aspect-ratio.tsx
│ │ ├── skeleton.tsx
│ │ ├── collapsible.tsx
│ │ ├── label.tsx
│ │ ├── textarea.tsx
│ │ ├── separator.tsx
│ │ ├── progress.tsx
│ │ ├── input.tsx
│ │ ├── toaster.tsx
│ │ ├── checkbox.tsx
│ │ ├── slider.tsx
│ │ ├── switch.tsx
│ │ ├── tooltip.tsx
│ │ ├── badge.tsx
│ │ ├── hover-card.tsx
│ │ ├── popover.tsx
│ │ ├── avatar.tsx
│ │ ├── toggle.tsx
│ │ ├── radio-group.tsx
│ │ ├── alert.tsx
│ │ ├── scroll-area.tsx
│ │ ├── tabs.tsx
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ ├── accordion.tsx
│ │ ├── calendar.tsx
│ │ ├── table.tsx
│ │ ├── dialog.tsx
│ │ ├── select.tsx
│ │ ├── use-toast.ts
│ │ ├── sheet.tsx
│ │ ├── form.tsx
│ │ ├── alert-dialog.tsx
│ │ ├── toast.tsx
│ │ ├── command.tsx
│ │ ├── navigation-menu.tsx
│ │ ├── context-menu.tsx
│ │ └── dropdown-menu.tsx
│ ├── SidebarSection.tsx
│ ├── AgentPromptTemplate.tsx
│ ├── AgentHistory.tsx
│ ├── ActionOverlay.tsx
│ ├── AgentGenerationParamsAccordionItem.tsx
│ ├── ToggleDarkButton.tsx
│ ├── AppAccordionItem.tsx
│ ├── AgentPicker.tsx
│ ├── ModelPicker.tsx
│ ├── Editor.tsx
│ ├── PromptInput.tsx
│ ├── AgentAdapterPicker.tsx
│ ├── SidebarItem.tsx
│ ├── AdapterPicker.tsx
│ ├── Picker.tsx
│ ├── ModelSelect.tsx
│ ├── AutoTextarea.tsx
│ ├── Select.tsx
│ ├── AgentMessage.tsx
│ ├── SliderCheckbox.tsx
│ ├── VariablesAccordionItem.tsx
│ ├── PresetPicker.tsx
│ ├── ThemeProvider.tsx
│ ├── AttachmentsAccordionItem.tsx
│ ├── ChatConversation.tsx
│ ├── AgentConversation.tsx
│ ├── AgentGenerationParams.tsx
│ ├── ChatConversationMessage.tsx
│ └── ChatSettings.tsx
├── store
│ ├── Model.ts
│ ├── index.ts
│ ├── Template.ts
│ ├── Message.ts
│ ├── State.ts
│ ├── Attachment.ts
│ ├── Playground.ts
│ ├── AdapterFactory.ts
│ ├── defaults.ts
│ ├── Store.ts
│ ├── Agent.ts
│ └── Chat.ts
├── lib
│ ├── adapters
│ │ ├── index.ts
│ │ ├── HuggingFace.ts
│ │ └── Ollama.ts
│ ├── extraction.ts
│ └── utils.tsx
├── app
│ ├── AppShell.tsx
│ ├── ChatView.tsx
│ ├── ActiveRoute.tsx
│ ├── Sidebar.tsx
│ ├── SidebarAgentList.tsx
│ ├── AgentView.tsx
│ ├── SidebarChatList.tsx
│ └── PlaygroundView.tsx
├── index.tsx
└── index.css
├── bun.lockb
├── postcss.config.js
├── tsconfig.node.json
├── vite.config.js
├── index.html
├── components.json
├── .github
└── workflows
│ └── main.yml
├── scripts
└── pull.py
├── tsconfig.json
├── tailwind.config.js
├── .gitignore
├── package.json
└── README.md
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
161 | {body} 162 |
163 | ) 164 | }) 165 | FormMessage.displayName = "FormMessage" 166 | 167 | export { 168 | useFormField, 169 | Form, 170 | FormItem, 171 | FormLabel, 172 | FormControl, 173 | FormDescription, 174 | FormMessage, 175 | FormField, 176 | } 177 | -------------------------------------------------------------------------------- /src/components/AgentGenerationParams.tsx: -------------------------------------------------------------------------------- 1 | import { SliderCheckbox } from "./SliderCheckbox" 2 | import { Instance } from "mobx-state-tree" 3 | import { Agent } from "@/store/Agent" 4 | import { observer, useLocalStore } from "mobx-react" 5 | import { cn } from "@/lib/utils" 6 | import { Input } from "./ui/input" 7 | import { Label } from "./ui/label" 8 | import { Checkbox } from "./ui/checkbox" 9 | import { IoMdTrash } from "react-icons/io" 10 | import { Button } from "./ui/button" 11 | 12 | const GENERATION_PARAMS = [ 13 | { 14 | id: "num_predict", 15 | label: "Max. Tokens", 16 | max: 1024 * 8, 17 | step: 64, 18 | }, 19 | { 20 | id: "temperature", 21 | label: "Temperature", 22 | max: 1, 23 | step: 0.1, 24 | }, 25 | { 26 | id: "top_k", 27 | label: "Top K", 28 | max: 1, 29 | step: 0.1, 30 | }, 31 | { 32 | id: "top_p", 33 | label: "Top P", 34 | max: 1, 35 | step: 0.1, 36 | }, 37 | { 38 | id: "num_ctx", 39 | label: "Context Window", 40 | max: 1024 * 8, 41 | step: 64, 42 | }, 43 | { 44 | id: "repeat_last_n", 45 | label: "Repeat Window", 46 | max: 1024 * 8, 47 | step: 64, 48 | }, 49 | { 50 | id: "repeat_penalty", 51 | label: "Reptition Penalty", 52 | max: 2, 53 | step: 0.1, 54 | }, 55 | ] 56 | 57 | const AgentStopPatternEditor: React.FC<{ 58 | agent: Instance