Showing preview only (3,071K chars total). Download the full file or copy to clipboard to get everything.
Repository: BloopAI/bloop
Branch: oss
Commit: 431e9e82c5a2
Files: 624
Total size: 2.8 MB
Directory structure:
gitextract_xgg_tbnw/
├── .dockerignore
├── .envrc
├── .eslintrc.json
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── request-for-comments.md
│ └── workflows/
│ ├── build-on-pr-command.yml
│ ├── build-on-pr.yml
│ ├── build-on-release.yml
│ ├── client-test.yml
│ ├── dependencies.yml
│ ├── dummy.yml
│ ├── server-test.yml
│ ├── tauri-release.yml
│ └── tauri-test.yml
├── .gitignore
├── .gitpod.Dockerfile
├── .gitpod.yml
├── .taurignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── Dockerfile
├── LICENSE
├── README.md
├── apps/
│ └── desktop/
│ ├── .gitignore
│ ├── README.md
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.cjs
│ ├── src/
│ │ ├── App.tsx
│ │ ├── TextSearch.tsx
│ │ ├── global.d.ts
│ │ ├── main.tsx
│ │ └── vite-env.d.ts
│ ├── src-tauri/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── bin/
│ │ │ ├── qdrant-aarch64-apple-darwin
│ │ │ ├── qdrant-x86_64-apple-darwin
│ │ │ └── qdrant-x86_64-unknown-linux-gnu
│ │ ├── build.rs
│ │ ├── config/
│ │ │ └── config.json
│ │ ├── dylibs/
│ │ │ └── .keep
│ │ ├── frameworks/
│ │ │ └── .keep
│ │ ├── icons/
│ │ │ └── icon.icns
│ │ ├── installer.nsi
│ │ ├── model/
│ │ │ ├── ggml/
│ │ │ │ └── tokenizer.json
│ │ │ ├── model.onnx
│ │ │ ├── special_tokens_map.json
│ │ │ ├── tokenizer.json
│ │ │ ├── tokenizer_config.json
│ │ │ └── vocab.txt
│ │ ├── src/
│ │ │ ├── QDRANT_CONFIG_TEMPLATE.yml
│ │ │ ├── backend.rs
│ │ │ ├── config.rs
│ │ │ ├── main.rs
│ │ │ └── qdrant.rs
│ │ └── tauri.conf.json
│ ├── tailwind.config.cjs
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ └── vite.config.ts
├── client/
│ ├── .gitignore
│ ├── .storybook/
│ │ ├── main.cjs
│ │ ├── preview-head.html
│ │ └── preview.cjs
│ ├── README.md
│ ├── index.html
│ ├── jest.config.js
│ ├── package.json
│ ├── postcss.config.cjs
│ ├── public/
│ │ ├── gray-to-blue.riv
│ │ ├── gray-to-red.riv
│ │ ├── like-blue.riv
│ │ ├── like-red.riv
│ │ └── like_button.riv
│ ├── src/
│ │ ├── App.tsx
│ │ ├── CloudApp.tsx
│ │ ├── CommandBar/
│ │ │ ├── Body/
│ │ │ │ ├── Item.tsx
│ │ │ │ ├── Section.tsx
│ │ │ │ ├── SectionDivider.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Footer/
│ │ │ │ ├── HintButton.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Header/
│ │ │ │ ├── ChipItem.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Tutorial/
│ │ │ │ ├── TutorialBody.tsx
│ │ │ │ └── TutorialTooltip.tsx
│ │ │ ├── index.tsx
│ │ │ └── steps/
│ │ │ ├── AddNewRepo.tsx
│ │ │ ├── AddToStudio.tsx
│ │ │ ├── CreateProject.tsx
│ │ │ ├── Documentation/
│ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Initial.tsx
│ │ │ ├── LocalRepos.tsx
│ │ │ ├── ManageRepos/
│ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── PrivateRepos/
│ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── PublicRepos.tsx
│ │ │ ├── SeachDocs.tsx
│ │ │ ├── SeachFiles.tsx
│ │ │ ├── ToggleTheme.tsx
│ │ │ └── items/
│ │ │ ├── DocItem.tsx
│ │ │ └── RepoItem.tsx
│ │ ├── Project/
│ │ │ ├── CurrentTabContent/
│ │ │ │ ├── ChatTab/
│ │ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ │ ├── ChatPersistentState.tsx
│ │ │ │ │ ├── Conversation.tsx
│ │ │ │ │ ├── DeprecatedClientModal.tsx
│ │ │ │ │ ├── Input/
│ │ │ │ │ │ ├── ProseMirror/
│ │ │ │ │ │ │ ├── index.tsx
│ │ │ │ │ │ │ ├── mentionPlugin.ts
│ │ │ │ │ │ │ ├── nodes.ts
│ │ │ │ │ │ │ ├── placeholderPlugin.ts
│ │ │ │ │ │ │ └── utils.ts
│ │ │ │ │ │ ├── ReactMentions/
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Message/
│ │ │ │ │ │ ├── LoadingStep.tsx
│ │ │ │ │ │ ├── UserParsedQuery/
│ │ │ │ │ │ │ ├── LangChip.tsx
│ │ │ │ │ │ │ ├── PathChip.tsx
│ │ │ │ │ │ │ ├── RepoChip.tsx
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── ScrollableContent.tsx
│ │ │ │ │ ├── StarterMessage.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── DocTab/
│ │ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ │ ├── DocSection.tsx
│ │ │ │ │ ├── RenderedSection.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── DropTarget.tsx
│ │ │ │ ├── EmptyTab.tsx
│ │ │ │ ├── FileTab/
│ │ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Header/
│ │ │ │ │ ├── AddTabButton.tsx
│ │ │ │ │ ├── AddTabDropdown.tsx
│ │ │ │ │ ├── TabButton.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── StudioTab/
│ │ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ │ ├── Conversation/
│ │ │ │ │ │ ├── ContextError.tsx
│ │ │ │ │ │ ├── GeneratedDiff.tsx
│ │ │ │ │ │ ├── Input/
│ │ │ │ │ │ │ ├── TemplatesDropdown.tsx
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ │ ├── NoFilesMessage.tsx
│ │ │ │ │ │ ├── StarterMessage.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── DeprecatedClientModal.tsx
│ │ │ │ │ ├── StudioPersistentState.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── EmptyProject.tsx
│ │ │ ├── LeftSidebar/
│ │ │ │ ├── NavPanel/
│ │ │ │ │ ├── Conversations/
│ │ │ │ │ │ ├── ConversationsDropdown.tsx
│ │ │ │ │ │ ├── CoversationEntry.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Doc/
│ │ │ │ │ │ ├── DocDropdown.tsx
│ │ │ │ │ │ ├── DocEntry.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Repo/
│ │ │ │ │ │ ├── RepoDropdown.tsx
│ │ │ │ │ │ ├── RepoEntry.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Studios/
│ │ │ │ │ │ ├── AddContextFile.tsx
│ │ │ │ │ │ ├── StudioEntry.tsx
│ │ │ │ │ │ ├── StudioFile.tsx
│ │ │ │ │ │ ├── StudioHistory.tsx
│ │ │ │ │ │ ├── StudioSubItem.tsx
│ │ │ │ │ │ ├── StudiosDropdown.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── RegexSearchPanel/
│ │ │ │ │ ├── AutocompleteMenu.tsx
│ │ │ │ │ ├── AutocompleteMenuItem.tsx
│ │ │ │ │ ├── Results/
│ │ │ │ │ │ ├── CodeLine.tsx
│ │ │ │ │ │ ├── CodeResult.tsx
│ │ │ │ │ │ ├── FileResult.tsx
│ │ │ │ │ │ └── RepoResult.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── RightTab.tsx
│ │ │ ├── TutorialCards.tsx
│ │ │ └── index.tsx
│ │ ├── ProjectSettings/
│ │ │ ├── General.tsx
│ │ │ ├── Templates/
│ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ ├── TemplateItem.tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Settings/
│ │ │ ├── General/
│ │ │ │ └── index.tsx
│ │ │ ├── Preferences/
│ │ │ │ ├── ChatInputTypeDropdown.tsx
│ │ │ │ ├── LanguageDropdown.tsx
│ │ │ │ ├── ThemeDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── components/
│ │ │ ├── Badge/
│ │ │ │ └── index.tsx
│ │ │ ├── Breadcrumbs/
│ │ │ │ ├── BreadcrumbSection.tsx
│ │ │ │ ├── BreadcrumbsCollapsed.tsx
│ │ │ │ ├── PathContainer.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Button/
│ │ │ │ ├── KeyHintButton.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Checkbox/
│ │ │ │ ├── Checkbox.stories.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Chips/
│ │ │ │ └── FileChip.tsx
│ │ │ ├── Code/
│ │ │ │ ├── CodeBlockSearch/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeDiff/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeFragment/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeFull/
│ │ │ │ │ ├── SelectionPopup.tsx
│ │ │ │ │ ├── Token.tsx
│ │ │ │ │ ├── VirtualizedCode.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeFullSelectable/
│ │ │ │ │ ├── CodeContainer.tsx
│ │ │ │ │ ├── LazyLinesContainer.tsx
│ │ │ │ │ ├── SelectionHandler.tsx
│ │ │ │ │ ├── SelectionHint.tsx
│ │ │ │ │ ├── SelectionRect.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeLine.tsx
│ │ │ │ └── CodeToken.tsx
│ │ │ ├── Dropdown/
│ │ │ │ ├── Section/
│ │ │ │ │ ├── SectionItem.tsx
│ │ │ │ │ ├── SectionLabel.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── FileIcon/
│ │ │ │ └── index.tsx
│ │ │ ├── Header/
│ │ │ │ ├── HeaderRightPart.tsx
│ │ │ │ ├── ProjectsDropdown.tsx
│ │ │ │ ├── UserDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── IpynbRenderer/
│ │ │ │ ├── IpynbCell.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── KeyboardHint/
│ │ │ │ ├── MultiKey.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Loaders/
│ │ │ │ ├── LiteLoader.tsx
│ │ │ │ └── SpinnerLoader.tsx
│ │ │ ├── MarkdownWithCode/
│ │ │ │ ├── CodeRenderer.tsx
│ │ │ │ ├── CodeWithBreadcrumbs.tsx
│ │ │ │ ├── CopyButton.tsx
│ │ │ │ ├── DiffCode.tsx
│ │ │ │ ├── FolderChip.tsx
│ │ │ │ ├── LinkRenderer.tsx
│ │ │ │ ├── NewCode.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Modal/
│ │ │ │ └── index.tsx
│ │ │ ├── OverflowTracker/
│ │ │ │ └── index.tsx
│ │ │ ├── RefsDefsPopup/
│ │ │ │ ├── Badge.tsx
│ │ │ │ ├── RefDefFileItem.tsx
│ │ │ │ ├── RefDefFileLine.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── ScrollToBottom/
│ │ │ │ ├── Composer.tsx
│ │ │ │ ├── EventSpy.ts
│ │ │ │ ├── FunctionContext.ts
│ │ │ │ ├── InternalContext.ts
│ │ │ │ ├── Panel.tsx
│ │ │ │ ├── SpineTo.tsx
│ │ │ │ ├── debounce.ts
│ │ │ │ └── index.tsx
│ │ │ ├── SearchOnPage/
│ │ │ │ └── index.tsx
│ │ │ ├── SectionsNav/
│ │ │ │ ├── SectionButton.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── TextField/
│ │ │ │ └── index.tsx
│ │ │ ├── TextInput/
│ │ │ │ ├── ClearButton/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── RegexButton/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── TokenUsage/
│ │ │ │ └── index.tsx
│ │ │ └── Tooltip/
│ │ │ └── index.tsx
│ │ ├── consts/
│ │ │ ├── animations.ts
│ │ │ ├── code.ts
│ │ │ ├── codeStudio.ts
│ │ │ ├── commandBar.ts
│ │ │ ├── general.ts
│ │ │ ├── shortcuts.ts
│ │ │ ├── tutorialSteps.ts
│ │ │ └── validations.ts
│ │ ├── context/
│ │ │ ├── arrowNavigationContext.ts
│ │ │ ├── chatsContext.tsx
│ │ │ ├── commandBarContext.ts
│ │ │ ├── deviceContext.ts
│ │ │ ├── fileHighlightsContext.ts
│ │ │ ├── localeContext.ts
│ │ │ ├── projectContext.ts
│ │ │ ├── providers/
│ │ │ │ ├── ChatsContextProvider.tsx
│ │ │ │ ├── CommandBarContextProvider.tsx
│ │ │ │ ├── DeviceContextProvider.tsx
│ │ │ │ ├── FileHighlightsContextProvider.tsx
│ │ │ │ ├── ProjectContextProvider.tsx
│ │ │ │ ├── RepositoriesContextProvider.tsx
│ │ │ │ ├── StudiosContextProvider.tsx
│ │ │ │ ├── TabsContextProvider.tsx
│ │ │ │ └── UIContextProvider.tsx
│ │ │ ├── repositoriesContext.ts
│ │ │ ├── studiosContext.tsx
│ │ │ ├── tabsContext.tsx
│ │ │ └── uiContext.ts
│ │ ├── file-icons.css
│ │ ├── global.d.ts
│ │ ├── hooks/
│ │ │ ├── useArrowNavigation.ts
│ │ │ ├── useArrowNavigationItemProps.ts
│ │ │ ├── useCodeSearch.ts
│ │ │ ├── useComponentWillMount.ts
│ │ │ ├── useDiffLines.ts
│ │ │ ├── useEnterKey.ts
│ │ │ ├── useGlobalShortcuts.ts
│ │ │ ├── useKeyboardNavigation.ts
│ │ │ ├── useNavPanel.ts
│ │ │ ├── useOnClickOutsideHook.ts
│ │ │ ├── usePersistentState.tsx
│ │ │ ├── useResizeableWidth.ts
│ │ │ ├── useScrollToBottom.ts
│ │ │ ├── useShortcuts.ts
│ │ │ └── useStateRef.ts
│ │ ├── i18n.ts
│ │ ├── icons/
│ │ │ ├── ArrowHistory.tsx
│ │ │ ├── ArrowLeft.tsx
│ │ │ ├── ArrowOut.tsx
│ │ │ ├── ArrowTriangleBottom.tsx
│ │ │ ├── BloopLogo.tsx
│ │ │ ├── Branch.tsx
│ │ │ ├── Broom.tsx
│ │ │ ├── Bug.tsx
│ │ │ ├── ChatBubbles.tsx
│ │ │ ├── Check.tsx
│ │ │ ├── CheckList.tsx
│ │ │ ├── CheckmarkInSquare.tsx
│ │ │ ├── ChevronDown.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── ChevronUp.tsx
│ │ │ ├── Clipboard.tsx
│ │ │ ├── CloseSign.tsx
│ │ │ ├── CloseSignInCircle.tsx
│ │ │ ├── Code.tsx
│ │ │ ├── CodeLineWithSparkle.tsx
│ │ │ ├── CodeStudio.tsx
│ │ │ ├── CodeSymbols/
│ │ │ │ ├── Class.tsx
│ │ │ │ ├── Color.tsx
│ │ │ │ ├── Constant.tsx
│ │ │ │ ├── Enum.tsx
│ │ │ │ ├── Event.tsx
│ │ │ │ ├── Field.tsx
│ │ │ │ ├── File.tsx
│ │ │ │ ├── Folder.tsx
│ │ │ │ ├── Interface.tsx
│ │ │ │ ├── Keyword.tsx
│ │ │ │ ├── Method.tsx
│ │ │ │ ├── Module.tsx
│ │ │ │ ├── Multiple.tsx
│ │ │ │ ├── Operator.tsx
│ │ │ │ ├── Property.tsx
│ │ │ │ ├── Reference.tsx
│ │ │ │ ├── Snippet.tsx
│ │ │ │ ├── Struct.tsx
│ │ │ │ ├── Symbol.tsx
│ │ │ │ ├── Text.tsx
│ │ │ │ ├── TypeParameter.tsx
│ │ │ │ ├── Unit.tsx
│ │ │ │ ├── Value.tsx
│ │ │ │ └── Variable.tsx
│ │ │ ├── Cog.tsx
│ │ │ ├── ColorSwitch.tsx
│ │ │ ├── Conversation.tsx
│ │ │ ├── CopyText.tsx
│ │ │ ├── DateTimeCalendar.tsx
│ │ │ ├── Def.tsx
│ │ │ ├── Documents.tsx
│ │ │ ├── DoorOut.tsx
│ │ │ ├── DoubleChevronIn.tsx
│ │ │ ├── DoubleChevronOut.tsx
│ │ │ ├── EyeCut.tsx
│ │ │ ├── File.tsx
│ │ │ ├── FileWithSparks.tsx
│ │ │ ├── Filter.tsx
│ │ │ ├── Folder.tsx
│ │ │ ├── GitHubIcon.tsx
│ │ │ ├── Globe.tsx
│ │ │ ├── HardDrive.tsx
│ │ │ ├── InfoBadge.tsx
│ │ │ ├── KLetter.tsx
│ │ │ ├── Like.tsx
│ │ │ ├── LinkChain.tsx
│ │ │ ├── LiteLoader.tsx
│ │ │ ├── LogoFull.tsx
│ │ │ ├── Macintosh.tsx
│ │ │ ├── Magazine.tsx
│ │ │ ├── MagnifyTool.tsx
│ │ │ ├── MailIcon.tsx
│ │ │ ├── MoreHorizontal.tsx
│ │ │ ├── Pencil.tsx
│ │ │ ├── Person.tsx
│ │ │ ├── PlusSign.tsx
│ │ │ ├── Prompt.tsx
│ │ │ ├── Range.tsx
│ │ │ ├── Ref.tsx
│ │ │ ├── Refresh.tsx
│ │ │ ├── Regex.tsx
│ │ │ ├── RegexSearch.tsx
│ │ │ ├── Repository.tsx
│ │ │ ├── Run.tsx
│ │ │ ├── Send.tsx
│ │ │ ├── Shapes.tsx
│ │ │ ├── SpinLoader.tsx
│ │ │ ├── SplitView.tsx
│ │ │ ├── StudioCloseSign.tsx
│ │ │ ├── StudioPlusSign.tsx
│ │ │ ├── Template.tsx
│ │ │ ├── Templates.tsx
│ │ │ ├── ThemeBlack.tsx
│ │ │ ├── ThemeDark.tsx
│ │ │ ├── ThemeLight.tsx
│ │ │ ├── TooltipTailBottom.tsx
│ │ │ ├── TooltipTailLeft.tsx
│ │ │ ├── TooltipTailRight.tsx
│ │ │ ├── TooltipTailTop.tsx
│ │ │ ├── TrashCan.tsx
│ │ │ ├── Unlike.tsx
│ │ │ ├── Walk.tsx
│ │ │ ├── Wallet.tsx
│ │ │ ├── WarningSign.tsx
│ │ │ ├── Wrapper.tsx
│ │ │ └── index.ts
│ │ ├── index.css
│ │ ├── locales/
│ │ │ ├── en.json
│ │ │ ├── es.json
│ │ │ ├── it.json
│ │ │ ├── ja.json
│ │ │ ├── zh-CN.json
│ │ │ └── zh-TW.json
│ │ ├── main.tsx
│ │ ├── mappers/
│ │ │ ├── conversation.ts
│ │ │ └── results.ts
│ │ ├── services/
│ │ │ ├── api.ts
│ │ │ ├── cache.ts
│ │ │ └── storage.ts
│ │ ├── themes/
│ │ │ ├── default-dark.css
│ │ │ └── default-light.css
│ │ ├── types/
│ │ │ ├── api.ts
│ │ │ ├── file-icons-js/
│ │ │ │ └── index.d.ts
│ │ │ ├── general.ts
│ │ │ ├── index.ts
│ │ │ ├── prism.ts
│ │ │ └── results.ts
│ │ ├── utils/
│ │ │ ├── commandBarUtils.test.ts
│ │ │ ├── commandBarUtils.ts
│ │ │ ├── domUtils.ts
│ │ │ ├── file.ts
│ │ │ ├── index.test.ts
│ │ │ ├── index.ts
│ │ │ ├── keyboardUtils.ts
│ │ │ ├── langs.json
│ │ │ ├── mappers.ts
│ │ │ ├── navigationUtils.ts
│ │ │ ├── prism.ts
│ │ │ ├── requestUtils.ts
│ │ │ ├── scrollUtils.ts
│ │ │ └── textSearch.ts
│ │ └── vite-env.d.ts
│ ├── tailwind.config.cjs
│ ├── tests/
│ │ └── setupTests.ts
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ └── vite.config.ts
├── docker-compose.yml
├── flake.nix
├── package.json
├── playwright.config.js
├── release_description_template.txt
├── server/
│ ├── README.md
│ ├── bleep/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── migrations/
│ │ │ ├── 20230424095042_conversations.sql
│ │ │ ├── 20230613143506_file-cache.sql
│ │ │ ├── 20230616140930_query-log.sql
│ │ │ ├── 20230725183450_remove_conversation_llm_history_code_chunks_path.sql
│ │ │ ├── 20230821131141_code_studio.sql
│ │ │ ├── 20230831165918_templates.sql
│ │ │ ├── 20230831170927_code_studio_uuid_blob.sql
│ │ │ ├── 20230831184906_code_studio_history.sql
│ │ │ ├── 20230901200307_code_studio_user_id.sql
│ │ │ ├── 20230907154037_studio_int_id.sql
│ │ │ ├── 20230911161509_template_user_id.sql
│ │ │ ├── 20230912084309_nullable_studio_name.sql
│ │ │ ├── 20230915091923_tutorial-questions.sql
│ │ │ ├── 20230919100529_code_studio_docs.sql
│ │ │ ├── 20231004101827_refactor_template.sql
│ │ │ ├── 20231122012638_projects.sql
│ │ │ └── 20231201200442_project_docs.sql
│ │ ├── sqlx-data.json
│ │ └── src/
│ │ ├── agent/
│ │ │ ├── exchange.rs
│ │ │ ├── model.rs
│ │ │ ├── prompts.rs
│ │ │ ├── symbol.rs
│ │ │ ├── tools/
│ │ │ │ ├── answer.rs
│ │ │ │ ├── code.rs
│ │ │ │ ├── path.rs
│ │ │ │ └── proc.rs
│ │ │ └── transcoder.rs
│ │ ├── agent.rs
│ │ ├── background/
│ │ │ ├── control.rs
│ │ │ ├── notifyqueue.rs
│ │ │ └── sync.rs
│ │ ├── background.rs
│ │ ├── bin/
│ │ │ └── bleep.rs
│ │ ├── cache.rs
│ │ ├── collector/
│ │ │ ├── bytes_filter.rs
│ │ │ ├── frequency.rs
│ │ │ └── group.rs
│ │ ├── collector.rs
│ │ ├── commits.rs
│ │ ├── config.rs
│ │ ├── db/
│ │ │ └── query_log.rs
│ │ ├── db.rs
│ │ ├── env.rs
│ │ ├── indexes/
│ │ │ ├── analytics.rs
│ │ │ ├── doc.rs
│ │ │ ├── file.rs
│ │ │ ├── reader.rs
│ │ │ ├── repo.rs
│ │ │ └── schema.rs
│ │ ├── indexes.rs
│ │ ├── intelligence/
│ │ │ ├── code_navigation.rs
│ │ │ ├── language/
│ │ │ │ ├── c/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── c_sharp/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── cobol/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── cpp/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── go/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── java/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── javascript/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── php/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── python/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── r/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── ruby/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── rust/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── test_utils.rs
│ │ │ │ └── typescript/
│ │ │ │ ├── mod.rs
│ │ │ │ └── scopes.scm
│ │ │ ├── language.rs
│ │ │ ├── namespace.rs
│ │ │ ├── scope_resolution/
│ │ │ │ ├── debug.rs
│ │ │ │ ├── def.rs
│ │ │ │ ├── import.rs
│ │ │ │ ├── reference.rs
│ │ │ │ └── scope.rs
│ │ │ └── scope_resolution.rs
│ │ ├── intelligence.rs
│ │ ├── lib.rs
│ │ ├── llm/
│ │ │ ├── call.rs
│ │ │ └── client.rs
│ │ ├── llm.rs
│ │ ├── periodic/
│ │ │ ├── logrotate.rs
│ │ │ └── remotes.rs
│ │ ├── periodic.rs
│ │ ├── query/
│ │ │ ├── compiler.rs
│ │ │ ├── execute.rs
│ │ │ ├── grammar.pest
│ │ │ ├── languages.rs
│ │ │ ├── parser.rs
│ │ │ ├── planner/
│ │ │ │ └── optimize.rs
│ │ │ ├── planner.rs
│ │ │ ├── ranking.rs
│ │ │ ├── stopwords.rs
│ │ │ └── stopwords.txt
│ │ ├── query.rs
│ │ ├── remotes/
│ │ │ ├── github.rs
│ │ │ └── poll.rs
│ │ ├── remotes.rs
│ │ ├── repo/
│ │ │ ├── iterator/
│ │ │ │ ├── filters.rs
│ │ │ │ ├── fs.rs
│ │ │ │ ├── git.rs
│ │ │ │ └── language.rs
│ │ │ └── iterator.rs
│ │ ├── repo.rs
│ │ ├── scraper/
│ │ │ ├── article.rs
│ │ │ └── chunk.rs
│ │ ├── scraper.rs
│ │ ├── semantic/
│ │ │ ├── chunk.rs
│ │ │ ├── embedder.rs
│ │ │ ├── execute.rs
│ │ │ └── schema.rs
│ │ ├── semantic.rs
│ │ ├── snippet.rs
│ │ ├── state.rs
│ │ ├── symbol.rs
│ │ ├── text_range.rs
│ │ ├── user.rs
│ │ ├── webserver/
│ │ │ ├── answer.rs
│ │ │ ├── autocomplete.rs
│ │ │ ├── commits.rs
│ │ │ ├── config.rs
│ │ │ ├── conversation.rs
│ │ │ ├── docs.rs
│ │ │ ├── file.rs
│ │ │ ├── hoverable.rs
│ │ │ ├── index.rs
│ │ │ ├── intelligence.rs
│ │ │ ├── middleware.rs
│ │ │ ├── project/
│ │ │ │ ├── doc.rs
│ │ │ │ └── repo.rs
│ │ │ ├── project.rs
│ │ │ ├── query.rs
│ │ │ ├── repos.rs
│ │ │ ├── search.rs
│ │ │ ├── studio/
│ │ │ │ └── diff.rs
│ │ │ ├── studio.rs
│ │ │ └── template.rs
│ │ └── webserver.rs
│ └── languages.yml
└── tests/
├── .example.env
├── .gitignore
├── all_onboarding.spec.js_
├── github_onboarding.spec.js_
├── local_onboarding.spec.js_
├── onboarding.spec.ts
├── onboarding.ts
├── repository.spec.ts
├── search.spec.ts
├── settings.spec.ts
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
/target
/node_modules
**/node_modules
================================================
FILE: .envrc
================================================
use flake .
================================================
FILE: .eslintrc.json
================================================
{
"env": {
"browser": true,
"es2021": true,
"mocha": true,
"jest/globals": true,
"node": true
},
"extends": [
"plugin:react/recommended",
"plugin:import/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react",
"jest",
"prettier"
],
"settings": {
"react": {
"version": "18"
},
"import/resolver": {
"typescript": {}
}
},
"rules": {
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}],
"curly": ["error", "multi-line"],
"no-new": "off",
"no-use-before-define": "off",
"no-useless-constructor": "off",
"react/prop-types": "off",
"camelcase": "off",
"prettier/prettier": ["error", {
"singleQuote": true,
"semi": true,
"trailingComma": "all",
"tabWidth": 2,
"bracketSameLine": false
}],
"import/order": "error",
"no-undef": "error",
"import/no-unresolved": "off",
"react/react-in-jsx-scope": "off"
},
"globals": {
"React": true,
"JSX": true
}
}
================================================
FILE: .gitattributes
================================================
apps/desktop/src-tauri/model/vocab.txt filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/model/model.onnx filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/model/special_tokens_map.json filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/model/tokenizer.json filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/model/tokenizer_config.json filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/bin/qdrant-x86_64-apple-darwin filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/bin/qdrant-aarch64-apple-darwin filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/bin/qdrant-x86_64-unknown-linux-gnu filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/bin/qdrant-x86_64-pc-windows-msvc.exe filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/model/ggml/ggml-model-q4_0.bin filter=lfs diff=lfs merge=lfs -text
apps/desktop/src-tauri/model/ggml/tokenizer.json filter=lfs diff=lfs merge=lfs -text
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a bug report for bloop.
labels: bug
---
<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->
**Describe the bug**
A clear and concise description of what the bug is. If appropriate add a `frontend` or `backend` label.
**Expected behavior**
What did you expect to happen?
**To Reproduce**
How can we reproduce the bug? Helpful information could include:
- Details about your system
- The data that you had indexed
- The query that you ran
**Screenshots or output**
If applicable, add screenshots to help illustrate the bug.
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
labels: feature
---
<!--
Thank you for filing a feature request! 🚧 Please provide a short summary of the feature,
along with a justification as to why you think it's important.
-->
**What's the problem?**
A clear and concise description of the problem. For example, I find... frustrating
**What's the solution?**
A clear and concise description of what you'd like to happen.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/ISSUE_TEMPLATE/request-for-comments.md
================================================
---
name: Request for comments
about: An engineering/feature proposal with in-depth details
labels: rfc
---
**High level details**
A short summary of the expected outcome and context.
**Current situation**
Some details about what we're currently doing.
For example:
* how it's insufficient
* how it's flawed
* what were the original motivations
* why we need to change this
**Proposal**
Details about the proposal, and how to implement it.
For example:
* high-level behavior
* what will/can break
* what changes are necessary
**Next steps**
Are there any next steps after we implement these changes?
================================================
FILE: .github/workflows/build-on-pr-command.yml
================================================
name: Build Bloop container with latest PR commit tag on build command
on:
issue_comment:
types: [created]
jobs:
debug:
runs-on: ubuntu-latest
steps:
- name: $github
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
permissions:
runs-on: ubuntu-latest
name: Validate user is the member of BloopAI organization
if: github.event.issue.pull_request && contains(github.event.comment.body, '/build')
outputs:
is-member: ${{ steps.membership.outputs.is-member }}
steps:
- name: Validation
id: membership
env:
ACTOR: ${{ github.triggering_actor }}
run: |
members=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.BLOOP_DEVOPS_PAT}}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/BloopAI/members | jq -r ".[] .login")
for member in $(echo ${members}); do
if [[ $member = $ACTOR ]]; then
echo "is-member=true" >> $GITHUB_OUTPUT
fi
done
build_tag:
runs-on: ubuntu-latest
name: Run container build on comment
needs: [permissions]
if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') && needs.permissions.outputs.is-member == 'true'
outputs:
tag: build-${{ steps.comment-branch.outputs.head_sha }}
ref: ${{ steps.comment-branch.outputs.head_ref }}
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
build_and_push:
uses: BloopAI/workflows/.github/workflows/build-container.yml@main
if: needs.permissions.outputs.is-member == 'true'
needs: [permissions, build_tag]
with:
repository: bloop
tag: ${{ needs.build_tag.outputs.tag }}
runner: ubuntu-latest
secrets:
awsRegion: ${{ secrets.AWS_REGION }}
awsAccountID: ${{ secrets.AWS_ACCOUNT_ID }}
slackBuildWebhook: ${{ secrets.SLACK_BUILD_WEBHOOK }}
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE_VERSION=${{ needs.build_tag.outputs.tag }}
report_status:
runs-on: ubuntu-latest
name: Report status of the build
needs: [permissions, build_tag, build_and_push]
if: always() && needs.permissions.outputs.is-member == 'true'
steps:
- name: pr
id: pr
run: |
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
echo "number=${PR_NUMBER}" >> ${GITHUB_OUTPUT}
- name: Comment failure build
if: ${{ contains(needs.*.result, 'failure') }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
:red_circle: Bloop container with `${{ needs.build_tag.outputs.tag }}` tag failed!
:link: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
pr_number: ${{ steps.pr.outputs.number }}
- name: Comment success build
if: ${{ !contains(needs.*.result, 'failure') }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
:green_circle: Bloop container with `${{ needs.build_tag.outputs.tag }}` tag is ready!
:link: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
pr_number: ${{ steps.pr.outputs.number }}
================================================
FILE: .github/workflows/build-on-pr.yml
================================================
name: Build and push docker container
on: workflow_dispatch
jobs:
build_and_push:
uses: BloopAI/workflows/.github/workflows/build-container.yml@main
with:
repository: bloop
tag: build-${{ github.sha }}
runner: ubuntu-latest
secrets:
awsRegion: ${{ secrets.AWS_REGION }}
awsAccountID: ${{ secrets.AWS_ACCOUNT_ID }}
slackBuildWebhook: ${{ secrets.SLACK_BUILD_WEBHOOK }}
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE_VERSION=${{ github.sha }}
validate_helm:
uses: BloopAI/reusable-workflows/.github/workflows/validate-helm-chart.yml@main
with:
path: helm/bloop
secrets:
slackBuildWebhook: ${{ secrets.SLACK_BUILD_WEBHOOK }}
================================================
FILE: .github/workflows/build-on-release.yml
================================================
name: Build&Push bloop docker container image with release tag
on:
release:
types: [published, prereleased]
jobs:
build_and_push:
uses: BloopAI/workflows/.github/workflows/build-container.yml@main
with:
repository: bloop
tag: ${{ github.event.release.tag_name }}
runner: ubuntu-latest
secrets:
awsRegion: ${{ secrets.AWS_REGION }}
awsAccountID: ${{ secrets.AWS_ACCOUNT_ID }}
slackBuildWebhook: ${{ secrets.SLACK_BUILD_WEBHOOK }}
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE_VERSION=${{ github.event.release.tag_name }}
================================================
FILE: .github/workflows/client-test.yml
================================================
name: Client Tests
on:
pull_request:
types: [opened, synchronize]
branches: [main]
paths:
- "client/**"
- ".github/workflows/client**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: 'echo "No checks required" '
fmt-clippy-build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No checks required" '
build-client:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run type-check
run: npm run client-type-check
- name: Run tests
run: npm --prefix client run test
================================================
FILE: .github/workflows/dependencies.yml
================================================
name: Dependency matrix
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- "flake.nix"
- "flake.lock"
- ".github/workflows/dependencies.yml"
jobs:
qdrant-rustup:
strategy:
fail-fast: false
matrix:
package: [ qdrant ]
target: [
x86_64-unknown-linux-gnu,
x86_64-apple-darwin,
aarch64-apple-darwin,
x86_64-pc-windows-msvc
]
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
cross: false
- target: x86_64-apple-darwin
os: macos-11
cross: false
- target: aarch64-apple-darwin
os: macos-11
cross: true
- target: x86_64-pc-windows-msvc
os: windows-latest
cross: false
runs-on: ${{ matrix.os }}
steps:
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.74.0
target: ${{ matrix.target }}
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build qdrant
env:
VERSION: 1.7.1
run: |
cargo install --target ${{ matrix.target }} --git https://github.com/qdrant/qdrant --tag v${{ env.VERSION }} --root . qdrant
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: "${{ matrix.package }}_${{ matrix.target }}"
path: bin
================================================
FILE: .github/workflows/dummy.yml
================================================
name: dummy
on:
pull_request:
paths-ignore:
- ".github/workflows/server**"
- ".github/workflows/client**"
- "apps/desktop/**"
- "server/**"
- "client/**"
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: 'echo "No checks required" '
fmt-clippy-build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No checks required" '
build-client:
runs-on: ubuntu-latest
steps:
- run: 'echo "No checks required" '
================================================
FILE: .github/workflows/server-test.yml
================================================
name: Server Unit Tests
on:
pull_request:
branches: [main]
paths:
- "flake.*"
- "server/**"
- ".github/workflows/server**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
clippy-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
lfs: true
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.73.0
components: rustfmt, clippy
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Rustfmt
run: cargo --locked fmt -p bleep -- --check
- name: Clippy
run: cargo --locked clippy -p bleep
- name: Tests
run: cargo --locked test -p bleep --release
================================================
FILE: .github/workflows/tauri-release.yml
================================================
name: Tauri Release
on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/tauri-release.yml"
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-sign-tauri:
strategy:
fail-fast: false
matrix:
target:
[x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin]
include:
- target: x86_64-unknown-linux-gnu
name: ubuntu-20.04
- target: x86_64-apple-darwin
name: macos-11
- target: aarch64-apple-darwin
name: macos-11
runs-on: ${{ matrix.name }}
env:
ORT_LIB_LOCATION: ${{ github.workspace }}/lib/${{ matrix.target }}/onnxruntime
steps:
- if: matrix.name == 'ubuntu-20.04'
uses: pierotofy/set-swap-space@v1.0
with:
swap-size-gb: 10
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create LFS file list
run: git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id
- name: LFS Cache
uses: actions/cache@v3
with:
path: .git/lfs/objects
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
restore-keys: |
${{ runner.os }}-lfs-
- name: Git LFS Pull
run: git lfs install && git lfs pull
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- if: matrix.target == 'x86_64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
- name: Install app dependencies
run: npm ci
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.73.0
target: ${{ matrix.target }}
- name: Check if keys exist
env:
analytics_key: ${{ secrets.ANALYTICS_BE_WRITE_KEY_PROD }}
analytics_fe_key: ${{ secrets.ANALYTICS_FE_WRITE_KEY_PROD }}
sentry_dsn: ${{ secrets.SENTRY_DSN_BE }}
sentry_dsn_fe: ${{ secrets.SENTRY_DSN_FE }}
if: ${{ env.analytics_fe_key == '' || env.sentry_dsn_fe == '' || env.analytics_key == '' || env.sentry_dsn == ''}}
run: exit 1
- name: Set environment
run: echo "{\"analytics_key\":\"${{ secrets.ANALYTICS_BE_WRITE_KEY_PROD }}\",\"analytics_data_plane\":\"${{ secrets.ANALYTICS_DATA_PLANE_URL }}\",\"sentry_dsn_fe\":\"${{ secrets.SENTRY_DSN_FE }}\",\"sentry_dsn\":\"${{ secrets.SENTRY_DSN_BE }}\",\"analytics_key_fe\":\"${{ secrets.ANALYTICS_FE_WRITE_KEY_PROD }}\",\"answer_api_url\":\"${{ secrets.ANSWER_API_URL }}\",\"cognito_userpool_id\":\"${{ secrets.COGNITO_USERPOOL_ID }}\",\"cognito_client_id\":\"${{ secrets.COGNITO_CLIENT_ID }}\",\"cognito_auth_url\":\"${{ secrets.COGNITO_AUTH_URL }}\",\"cognito_mgmt_url\":\"${{ secrets.COGNITO_MGMT_URL }}\",\"cognito_config_url\":\"${{ secrets.COGNITO_CONFIG_URL }}\"}" > apps/desktop/src-tauri/config/config.json
- name: Check environment is set
run: du -h apps/desktop/src-tauri/config/config.json
- name: Set providerShortName in tauri.conf.json
uses: jossef/action-set-json-field@v2.1
with:
file: apps/desktop/src-tauri/tauri.conf.json
field: tauri.bundle.macOS.providerShortName
value: ${{ secrets.MAC_PROVIDER_SHORT_NAME }}
- name: Set signingIdentity in tauri.conf.json
uses: jossef/action-set-json-field@v2.1
with:
file: apps/desktop/src-tauri/tauri.conf.json
field: tauri.bundle.macOS.signingIdentity
value: ${{ secrets.APPLE_SIGNING_IDENTITY }}
- name: Create Signing API Key
if: matrix.name == 'macos-11'
run: echo "${{ secrets.APPLE_API_KEY_CONTENT }}" > apiKey.p8
- name: Remove onnxruntime from aarch64-apple-darwin builds
if: matrix.target == 'aarch64-apple-darwin'
uses: jossef/action-set-json-field@v2.1
with:
file: apps/desktop/src-tauri/tauri.conf.json
field: tauri.bundle.macOS.frameworks
value: '[]'
parse_json: true
- name: get release version
id: release-version
run: echo "RELEASE_VERSION=$(cat apps/desktop/src-tauri/tauri.conf.json | jq '.package.version' | tr -d '"')" >> "$GITHUB_OUTPUT"
- uses: tauri-apps/tauri-action@cb58ba3f65bd456ee564376585a8400bf0b71f47
env:
NODE_OPTIONS: "--max-old-space-size=4096"
ORT_LIB_LOCATION: ${{ github.workspace }}/lib/${{ matrix.target }}/onnxruntime
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_KEY_PATH: /Users/runner/work/bloop/bloop/apiKey.p8
TAURI_BIN_PATH: apps/desktop/src-tauri/bin
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }}
with:
args: -- --target "${{ matrix.target }}" -v
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}-app
path: target/${{ matrix.target }}/release/bundle
retention-days: 5
- name: Setup Sentry CLI
uses: mathieu-bour/setup-sentry-cli@v1.3.0
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
organization: ${{ secrets.SENTRY_ORG }}
project: ${{ secrets.SENTRY_PROJECT }}
version: 2.21.2
- name: Create Sentry release
run: |
sentry-cli releases new "${{ steps.release-version.outputs.RELEASE_VERSION }}"
sentry-cli releases set-commits "${{ steps.release-version.outputs.RELEASE_VERSION }}" --auto
- name: (MacOS) Upload source maps to Sentry
if: matrix.name == 'macos-11'
run: |
sentry-cli debug-files upload \
--log-level debug \
--include-sources \
target/${{ matrix.target }}/release/bloop.dSYM
- name: Rename tar.gz in macos
if: matrix.name == 'macos-11'
run: |
new_filename="bloop_${{ steps.release-version.outputs.RELEASE_VERSION }}_$(echo ${{ matrix.target }} | cut -d '-' -f 1).app.tar.gz"
mv "target/${{ matrix.target }}/release/bundle/macos/bloop.app.tar.gz" "target/${{ matrix.target }}/release/bundle/macos/${new_filename}"
- name: List files
run: ls -R target/${{ matrix.target }}/release/bundle
- name: Generate Changelog
run: |
release_version="${{ steps.release-version.outputs.RELEASE_VERSION }}"
sed "s/VERSION/${release_version}/g" release_description_template.txt > new_description.txt
cat new_description.txt
- name: Upload release assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
target/${{ matrix.target }}/release/bundle/deb/*.deb
target/${{ matrix.target }}/release/bundle/appimage/*.AppImage
target/${{ matrix.target }}/release/bundle/appimage/*.tar.gz
target/${{ matrix.target }}/release/bundle/dmg/*.dmg
target/${{ matrix.target }}/release/bundle/macos/*.tar.gz
================================================
FILE: .github/workflows/tauri-test.yml
================================================
name: Tauri Tests
on:
pull_request:
types: [opened, synchronize]
branches: [main]
paths:
- "apps/desktop/**"
- ".github/workflows/tauri**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
clippy-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
lfs: true
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.73.0
components: rustfmt, clippy
- name: Install Tauri deps
run: |
sudo apt update && \
sudo apt install libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Rustfmt
run: cargo --locked fmt -p bloop -- --check
- name: Clippy
run: cargo --locked clippy -p bloop
- name: Tests
run: cargo --locked test -p bloop --release
================================================
FILE: .gitignore
================================================
# Env
.direnv
.idea
.DS_Store
.vscode
# Generated by Cargo
# will have compiled files and executables
debug/
target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# node
/node_modules/
# Index artifacts
server/index
server/schema
server/target
server/tmp_index
server/bleep/bleep.db*
playwright-report
.tests.env
.env
# local config
/local_config.json
apps/desktop/src-tauri/dylibs/*.so
apps/desktop/src-tauri/dylibs/*.dll
apps/desktop/src-tauri/frameworks/*.dylib
# qdrant
/qdrant/storage
/qdrant/snapshots
.qdrant-initialized
================================================
FILE: .gitpod.Dockerfile
================================================
FROM axonasif/workspace-base
ARG NIX_VERSION="2.11.0"
ARG NIX_CONFIG="experimental-features = nix-command flakes"
ENV NIX_VERSION=${NIX_VERSION}
USER root
# Dazzle does not rebuild a layer until one of its lines are changed. Increase this counter to rebuild this layer.
ENV TRIGGER_REBUILD=1
RUN addgroup --system nixbld \
&& adduser gitpod nixbld \
&& for i in $(seq 1 30); do useradd -ms /bin/bash nixbld$i && adduser nixbld$i nixbld; done \
&& mkdir -m 0755 /nix && chown gitpod /nix \
&& mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf
# Install Nix
USER gitpod
ENV USER gitpod
WORKDIR /home/gitpod
RUN curl https://nixos.org/releases/nix/nix-$NIX_VERSION/install | sh
RUN echo '. /home/gitpod/.nix-profile/etc/profile.d/nix.sh' >> /home/gitpod/.bashrc.d/200-nix
RUN mkdir -p /home/gitpod/.config/nixpkgs && echo '{ allowUnfree = true; }' >> /home/gitpod/.config/nixpkgs/config.nix
RUN mkdir -p /home/gitpod/.config/nix && echo $NIX_CONFIG >> /home/gitpod/.config/nix/nix.conf
# Install cachix
RUN . /home/gitpod/.nix-profile/etc/profile.d/nix.sh \
&& nix-env -iA cachix -f https://cachix.org/api/v1/install \
&& cachix use cachix
# Install direnv & other files
RUN mkdir -p $HOME/.config/direnv && printf '%s\n' "[whitelist]" 'prefix = [ "/workspace" ]' > $HOME/.config/direnv/config.toml \
&& printf '%s\n' 'source <(direnv hook bash)' > $HOME/.bashrc.d/999-direnv \
&& printf '%s\n' \
'dirs=($HOME/.cargo $HOME/.cache/nix) && mkdir -p "${dirs[@]}"' \
'create-overlay /nix "${dirs[@]}"' > $HOME/.runonce/100-nix \
&& . /home/gitpod/.nix-profile/etc/profile.d/nix.sh \
&& nix-env -iA nixpkgs.direnv
================================================
FILE: .gitpod.yml
================================================
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
image:
file: .gitpod.Dockerfile
ports:
- name: Bloop Web Interface
port: 7878
protocol: http
additionalRepositories:
- url: https://github.com/bloopai/answer-api
checkoutLocation: answer-api
tasks:
- name: Backend
init: |
nix run nixpkgs#cachix use bloopai
# Setup Git LFS
git lfs pull model
git lfs install --skip-smudge
# Cache build artifacts
nix develop -c cargo build --locked --features=ee-cloud --bin bleep
nix develop -c npm i
# this is working around a gitpod bug
# https://github.com/gitpod-io/gitpod/issues/524
find target -exec stat --format='%.Y %n' {} + > /workspace/.ts
command: |
while read -r ts file; do touch -d "@${ts}" "${file}"; done < /workspace/.ts
bloop_url=$(gp url 7878 | sed 's;https://;;')
git reset --hard
nix develop -c cargo watch -w server -- \
cargo run --locked --features=ee-cloud --bin bleep -- \
\
--qdrant-url http://localhost:6334 \
--answer-api-url http://localhost:7879 \
--model-dir /workspace/bloop/model \
--frontend-dist /workspace/bloop/client/dist \
--instance-domain $bloop_url \
--bloop-instance-secret "$BLOOP_INSTANCE_SECRET" \
--bloop-instance-org "$BLOOP_INSTANCE_ORG" \
--cognito-config-url https://cloud-auth-staging.bloop.ai/bloop_config
openMode: split-left
- name: Frontend
command: |
nix develop -c npm i
nix develop -c npm run build-web -- -- --watch --minify false
openMode: split-right
- name: Qdrant
command: |
nix run nixpkgs#qdrant -- --config-path qdrant/config.yaml
openMode: tab-after
- name: answer-api
command: |
cd /workspace/answer-api
nix run /workspace/answer-api
openMode: tab-after
github:
prebuilds:
# enable for the default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: false
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: true
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true
================================================
FILE: .taurignore
================================================
server/bleep/bleep.db*
apps/desktop/src-tauri/dylibs/*.so
apps/desktop/src-tauri/dylibs/*.dylib
apps/desktop/src-tauri/dylibs/*.dll
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
maintainers@bloop.ai through e-mail, with an appropriate subject line.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
### Attribution
This Code of Conduct is adapted from the [Next.js project][nextjs-coc]
The original text is from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[nextjs-coc]: https://raw.githubusercontent.com/vercel/next.js/canary/CODE_OF_CONDUCT.md
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
================================================
FILE: CONTRIBUTING.md
================================================
Guide to new contributors
=========================
Thanks for your interest in contributing to `bloop`!
Before jumping in, please
take a look at our [code of conduct](./CODE_OF_CONDUCT.md).
## Have a question?
If you have a question about using
[bloop](https://github.com/bloopai/bloop), please raise a ticket in
the repository, or say hi on our [Discord
server](https://discord.gg/kZEgj5pyjm).
## Would like to contribute?
If you have a great idea, some novel optimization, or a bug fix ready to be
merged, the maintainer team will help you get it into `bloop`.
We aim to maintain a high quality of contributions, and therefore all PRs need
to go through a review process. During the review period you may be asked to
make some changes to the code. When everybody's happy, we'll land the code, and
ship it in the next release!
After a longer period of inactivity, we will close PRs. Some of the code may
eventually make it into `bloop` if there's someone else to champion it, in
accordance with the license.
In case you are not certain that your code quality or the feature
you're working on is suitable for `bloop`, please open an issue
with the question, or send in the PR anyway.
This allows the maintainers to give you hands on feedback, and
work with you on specifics rather than theoretical proposals.
A quick list of things maintainers will check during review.
The following 2 steps are requirements for all PRs:
* Don't break public APIs.
* Make sure you use `rustfmt`, follow `clippy`, and check tests, or your PR will fail the CI!
Additionally, please pay attention to the following points as it helps
with our review. However, these are _not_ required:
* Please follow one of the issue/PR templates to make our work easier.
* Document your changes as best as you can where appropriate.
* Take a look at surrounding code, and try to match the style.
* If you implement new high-level features, make sure you have a minimal
example either in the documentation or in form of tests/benchmarks.
* If you have a short & sweet bug fix, please create a PR and
describe instructions to reproduce the bug, or a negative unit test.
* Provide tests for logic changes, and benchmarks for performance
work if possible.
Following these points will help the maintainers to run through your
code and merge it in a timely manner.
Make sure the description of the PR clearly explains the motivation
and link to any other resources we might need to consider when
reviewing.
## Get in touch!
If you're still in doubt, email us at <maintainers@bloop.ai>, and we'll get you
started!
================================================
FILE: Cargo.toml
================================================
[workspace]
resolver = "2"
members = [
"server/bleep",
"apps/desktop/src-tauri"
]
[profile.dev]
opt-level = 3
[profile.release]
debug = 1
lto = true
split-debuginfo = "packed"
[profile.profiler]
inherits = "release"
debug = true
split-debuginfo = "unpacked"
strip = "none"
[patch.crates-io]
esaxx-rs = { git = "https://github.com/bloopai/esaxx-rs" }
================================================
FILE: Dockerfile
================================================
FROM node AS frontend
WORKDIR /build
COPY package.json package-lock.json ./
RUN npm ci
COPY apps/ apps
COPY client/ client
COPY playwright.config.js .
RUN npm run build-web
FROM rust:1.73-slim-bookworm as builder
WORKDIR /build
RUN apt-get update && \
apt-get -y install make clang libc-dev curl cmake python3 protobuf-compiler pkg-config libssl3 libssl-dev git && \
rm -rf /var/lib/apt/lists/* && \
curl -sLo sccache.tar.gz https://github.com/mozilla/sccache/releases/download/v0.3.3/sccache-v0.3.3-x86_64-unknown-linux-musl.tar.gz && \
tar xzf sccache.tar.gz && \
mv sccache-*/sccache /usr/bin/sccache
ENV RUSTC_WRAPPER="/usr/bin/sccache"
ENV PYTHON /usr/bin/python3
ENV CC /usr/bin/clang
ENV CXX /usr/bin/clang++
COPY server server
COPY apps/desktop/src-tauri apps/desktop/src-tauri
COPY Cargo.lock Cargo.toml .
RUN --mount=target=/root/.cache/sccache,type=cache --mount=target=/build/target,type=cache \
cargo --locked build --bin bleep --release && \
cp /build/target/release/bleep / && \
sccache --show-stats && \
mkdir /dylib && \
cp /build/target/release/libonnxruntime.so /dylib/
FROM debian:bookworm-slim
VOLUME ["/repos", "/data"]
RUN apt-get update && apt-get -y install openssl ca-certificates libprotobuf-lite32 && rm -rf /var/lib/apt/lists/*
COPY model /model
COPY --from=builder /bleep /
COPY --from=builder /dylib /dylib
COPY --from=frontend /build/client/dist /frontend
ARG OPENAI_API_KEY
ARG GITHUB_ACCESS_TOKEN
ENTRYPOINT ["/bleep", "--host=0.0.0.0", "--source-dir=/repos", "--index-dir=/data", "--model-dir=/model", "--dylib-dir=/dylib", "--disable-log-write", "--frontend-dist=/frontend", "--openai-api-key=$OPENAI_API_KEY", "--github-access-token=$GITHUB_ACCESS_TOKEN"]
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://assets.bloop.ai/bloop_github_logo_dark.png">
<img alt="bloop logo" src="https://assets.bloop.ai/bloop_github_logo_light.png">
</picture>
bloop is ChatGPT for your code. Ask questions in natural language, search for code and generate patches using your existing codebase as context.
Engineers are increasing their productivity by using bloop to:
- Explain how files or features work in simple language
- Write new features, using their code as context
- Understand how to use poorly documented open source libraries
- Pinpoint errors
- Ask questions about English language codebases in other languages
- Reduce code duplication by checking for existing functionality
https://github.com/BloopAI/bloop/assets/7957964/01db3ccb-4af0-49a0-92d6-5a9c42357a51
## Features
- AI-based conversational search
- Code Studio, an LLM playground that uses your code as context
- Blazing fast regex search
- Sync your local and GitHub repositories
- Sophisticated query filters so you can narrow down your results
- Find functions, variables or traits with symbol search
- Precise code navigation (go-to-reference and go-to-definition) for 10+ of the most popular languages built with [Tree-sitter](https://tree-sitter.github.io/tree-sitter/)
- Privacy focussed on-device embedding for semantic search
bloop stands on the shoulders of the Rust ecosystem. Our search indexes are powered by [Tantivy](https://github.com/quickwit-oss/tantivy) and [Qdrant](https://github.com/qdrant/qdrant), and our multi-platform app is built with [Tauri](https://github.com/tauri-apps/tauri).
https://github.com/BloopAI/bloop/assets/7957964/93715188-d8d5-477b-8cd1-95d9cbd368cb
## Get Started
The simplest way to get started with bloop is to [download the app](https://github.com/BloopAI/bloop/releases) and follow the onboarding steps. Checkout our [getting started guide](https://bloop.ai/understand/docs/getting-started) and our references for [conversational](https://bloop.ai/understand/docs/natural-language-queries) and [regex](https://bloop.ai/understand/docs/regex-queries) search and [Code Studio](https://bloop.ai/understand/docs/code-studio).
For instructions on how to build from source or run bloop from the command line, check out these pages:
- [Build bloop app from source](./apps/desktop/README.md)
- [Run bloop from the command line](./server/README.md)
If you encounter any index issues you can wipe the bloop cache and reindex. Instructions on how to do this on different platforms [are here](./apps/desktop/README.md).
## Building From Source
You can build bloop from source and run it with your own OpenAI API key. Clone the repo, make sure the `oss` branch is checked out, and create a file called `local_config.json` at the top-level of the repo. `local_config.json` should contain the following fields:
```json
{
"github_access_token": "<YOUR_GITHUB_ACCESS_TOKEN>",
"openai_api_key": "<YOUR_OPENAI_API_KEY>"
}
```
Then follow [these installation instructions](./apps/desktop/README.md). If built from source, bloop will not collect any telemetry.
## Contributing
[](https://gitpod.io/#https://github.com/BloopAI/bloop)
[](https://app.codeanywhere.com/#https://github.com/BloopAI/bloop)
We welcome contributions big and small! Before jumping in please read [our contributors guide](./CONTRIBUTING.md) and [our code of conduct](./CODE_OF_CONDUCT.md).
Here's how to find your way around the repo:
- `apps/desktop`: The Tauri app
- `server/bleep`: The Rust backend which contains the core search and navigation logic
- `client`: The React frontend
We use Git LFS for dependencies that are expensive to build.
To make sure you have everything you need to start building, you'll need to
install the `git-lfs` package for your favourite operating system, then run the
following commands in this repo:
git lfs install
git lfs pull
If you find a bug or have a feature request, [open an issue](https://github.com/BloopAI/bloop/issues)! You can find the application logs here:
| OS | Logs Path |
| ----------- | ----------- |
| MacOS | `~/Library/Application\ Support/ai.bloop.bloop/bleep/logs` |
| Windows | `%APPDATA%/bloop/bleep/logs` |
| Linux | `~/.local/share/bloop/bleep/logs` |
## Privacy
We store as little data as possible. We use telemetry to helps us identify bugs and make data-driven product decisions. You can read our full privacy policy [here](https://bloop.ai/privacy).
## License
bloop is licensed under the `Apache 2.0` license as defined in [LICENSE](./LICENSE).
================================================
FILE: apps/desktop/.gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist/*
!dist/.keep
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/.env
# Qdrant build relic
src-tauri/bin/schema_generator
# Auto-generated from Cargo.toml/lock files
.crates*
================================================
FILE: apps/desktop/README.md
================================================
# bloop App
The bloop app is built using [Tauri](https://github.com/tauri-apps/tauri), a Rust framework for building cross-platform apps.
## Dependencies
To build the Tauri app you need the following dependencies:
- `rustup`
- `clang` `cmake` `wget`
- `protobuf`
- `onnxruntime`
Linux users need to ensure that the following are present:
- `AppImageKit`
- `atk`
- `dbus`
- `glib` `gtk3` (including `webkit-gtk`)
- `pango`
## Setup
All commands should be run from the root directory unless specified otherwise.
First make sure dependencies have been downloaded and installed:
```
git lfs install
git lfs pull
npm install
```
Then to build the app locally:
```
npm run build-app
```
Alternatively, to run the app in dev mode:
```
npm run start-app
```
## Wiping an index
Deleting and re-indexing the bloop index can fix corruption issues. bloop's index is stored:
| OS | Index Path |
| ----------- | ----------- |
| MacOS | `~/Library/Application\ Support/ai.bloop.bloop` |
| Windows | `%APPDATA%/bloop` |
| Linux | `~/.local/share/bloop` |
================================================
FILE: apps/desktop/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>bloop</title>
<!-- <script>-->
<!-- !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="vzA96L5JgFpDEtOKJKFIKcMxHMfkuVAC";;analytics.SNIPPET_VERSION="4.15.3";-->
<!-- analytics.load("vzA96L5JgFpDEtOKJKFIKcMxHMfkuVAC");-->
<!-- }}();-->
<!-- </script>-->
</head>
<body data-theme="system">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
================================================
FILE: apps/desktop/package.json
================================================
{
"name": "@bloop/desktop",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"tsc": "tsc",
"vite-build": "vite build",
"build": "npm-run-all tsc vite-build",
"preview": "vite preview",
"tauri": "tauri"
}
}
================================================
FILE: apps/desktop/postcss.config.cjs
================================================
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
================================================
FILE: apps/desktop/src/App.tsx
================================================
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
import { invoke } from '@tauri-apps/api';
import { open } from '@tauri-apps/api/shell';
import { homeDir } from '@tauri-apps/api/path';
import { relaunch } from '@tauri-apps/api/process';
import { message, open as openDialog } from '@tauri-apps/api/dialog';
import { listen } from '@tauri-apps/api/event';
import * as tauriOs from '@tauri-apps/api/os';
import { getVersion } from '@tauri-apps/api/app';
import { BrowserRouter } from 'react-router-dom';
import ClientApp from '../../../client/src/App';
import '../../../client/src/index.css';
import useKeyboardNavigation from '../../../client/src/hooks/useKeyboardNavigation';
import { LocaleContext } from '../../../client/src/context/localeContext';
import i18n from '../../../client/src/i18n';
import {
getPlainFromStorage,
LANGUAGE_KEY,
savePlainToStorage,
USER_FONT_SIZE_KEY,
} from '../../../client/src/services/storage';
import { LocaleType } from '../../../client/src/types/general';
import { DeviceContextProvider } from '../../../client/src/context/providers/DeviceContextProvider';
import TextSearch from './TextSearch';
function App() {
const [homeDirectory, setHomeDir] = useState('');
const [indexFolder, setIndexFolder] = useState('');
const [os, setOs] = useState({
arch: '',
type: '',
platform: '',
version: '',
});
const [release, setRelease] = useState('');
const contentContainer = useRef<HTMLDivElement>(null);
const [locale, setLocale] = useState<LocaleType>(
(getPlainFromStorage(LANGUAGE_KEY) as LocaleType | null) || 'en',
);
useEffect(() => {
i18n.changeLanguage(locale);
savePlainToStorage(LANGUAGE_KEY, locale);
}, [locale]);
const localeContextValue = useMemo(
() => ({
locale,
setLocale,
}),
[locale],
);
useEffect(() => {
homeDir().then(setHomeDir);
Promise.all([
tauriOs.arch(),
tauriOs.type(),
tauriOs.platform(),
tauriOs.version(),
getVersion(),
]).then(([arch, type, platform, version, appVersion]) => {
setOs({ arch, type, platform, version });
setRelease(appVersion);
// checkUpdateAndInstall(appVersion);
// intervalId = window.setInterval(
// () => checkUpdateAndInstall(appVersion),
// 1000 * 60 * 60,
// );
});
}, []);
const handleKeyEvent = useCallback((e: KeyboardEvent) => {
if (
(e.key === '=' || e.key === '-' || e.key === '0') &&
(e.metaKey || e.ctrlKey) &&
!e.shiftKey
) {
const root = document.querySelector(':root');
if (!root) {
return;
}
const style = window
.getComputedStyle(root, null)
.getPropertyValue('font-size');
const fontSize = parseFloat(style);
const newFontSize =
e.key === '0' ? 16 : fontSize + (e.key === '=' ? 1 : -1);
(root as HTMLElement).style.fontSize = newFontSize + 'px';
savePlainToStorage(USER_FONT_SIZE_KEY, newFontSize);
}
}, []);
useKeyboardNavigation(handleKeyEvent);
useEffect(() => {
const root = document.querySelector(':root');
if (!root) {
return;
}
const newFontSize = getPlainFromStorage(USER_FONT_SIZE_KEY);
if (newFontSize) {
(root as HTMLElement).style.fontSize = newFontSize + 'px';
}
}, []);
useEffect(() => {
const onContextMenu = (e: MouseEvent) => {
if (!import.meta.env.DEV) {
e.preventDefault();
}
};
document.addEventListener('contextmenu', onContextMenu);
return () => {
document.removeEventListener('contextmenu', onContextMenu);
};
}, []);
const deviceContextValue = useMemo(
() => ({
openFolderInExplorer: (path: string) => {
invoke('show_folder_in_finder', { path });
},
openLink: (path: string) => {
open(path);
},
homeDir: homeDirectory,
chooseFolder: openDialog,
indexFolder,
setIndexFolder,
listen,
os,
invokeTauriCommand: invoke,
release,
apiUrl: 'http://127.0.0.1:7878/api',
isRepoManagementAllowed: true,
forceAnalytics: false,
isSelfServe: false,
showNativeMessage: message,
relaunch,
}),
[homeDirectory, indexFolder, os, release],
);
return (
<DeviceContextProvider deviceContextValue={deviceContextValue}>
<LocaleContext.Provider value={localeContextValue}>
<TextSearch contentRoot={contentContainer.current} />
<div
ref={contentContainer}
className="w-screen h-screen overflow-hidden"
>
<BrowserRouter>
<ClientApp />
</BrowserRouter>
</div>
</LocaleContext.Provider>
</DeviceContextProvider>
);
}
export default App;
================================================
FILE: apps/desktop/src/TextSearch.tsx
================================================
import React, { useCallback, useEffect, useState } from 'react';
import {
ACTIVE_HIGHLIGHT_CLASSNAME,
HIGHLIGHT_CLASSNAME,
markNode,
unmark,
} from '../../../client/src/utils/textSearch';
import SearchOnPage from '../../../client/src/components/SearchOnPage';
const TextSearch = ({
contentRoot,
}: {
contentRoot: HTMLDivElement | null;
}) => {
const [searchValue, setSearchValue] = useState('');
const [isSearchActive, setSearchActive] = useState(false);
const [resultNum, setResultNum] = useState(0);
const [currentResult, setCurrentResult] = useState(0);
const [currentHighlightParent, setCurrentHighlightParent] =
useState<HTMLElement | null>(null);
useEffect(() => {
const toggleSearch = (e: KeyboardEvent) => {
const fullCodeInView =
!!document.getElementsByClassName('code-full-view').length;
if (e.code === 'KeyF' && e.metaKey && !fullCodeInView) {
setSearchActive((prev) => !prev);
} else if (e.code === 'Enter') {
const isNext = !e.shiftKey;
setCurrentResult((prev) =>
isNext
? prev < resultNum
? prev + 1
: 1
: prev > 1
? prev - 1
: resultNum,
);
} else if (e.code === 'Escape') {
setSearchActive((prev) => {
if (prev) {
e.preventDefault();
}
return false;
});
}
};
window.addEventListener('keypress', toggleSearch);
return () => {
window.removeEventListener('keypress', toggleSearch);
};
}, [resultNum]);
useEffect(() => {
if (!isSearchActive) {
unmark();
}
}, [isSearchActive]);
const doSearch = useCallback(
(searchTerm: string) => {
unmark();
if (searchTerm === '') {
setResultNum(0);
setCurrentResult(0);
setCurrentHighlightParent(null);
return;
}
const regex = new RegExp(
searchTerm.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'),
'gi',
);
if (contentRoot) {
markNode(contentRoot, regex);
const allHighlights =
document.getElementsByClassName(HIGHLIGHT_CLASSNAME);
const resNum = allHighlights.length;
setResultNum(resNum);
let prevIndexInNewHighlights = currentHighlightParent
? [...allHighlights].findIndex(
(el) =>
el.parentNode?.parentNode?.isSameNode(currentHighlightParent),
)
: -1;
setCurrentResult((prev) => {
const newR = resNum
? prevIndexInNewHighlights >= 0
? prevIndexInNewHighlights + 1
: 1
: 0;
if (prev === newR && allHighlights?.[newR - 1]) {
allHighlights[newR - 1].classList?.add(ACTIVE_HIGHLIGHT_CLASSNAME);
setCurrentHighlightParent(
allHighlights[newR - 1].parentNode as HTMLElement,
);
}
return newR;
});
}
},
[contentRoot, currentHighlightParent],
);
const handleChange = useCallback(
(searchTerm: string) => {
setSearchValue(searchTerm);
if (searchTerm.length > 1) {
doSearch(searchTerm);
}
},
[doSearch],
);
useEffect(() => {
const highlights = document.getElementsByClassName(HIGHLIGHT_CLASSNAME);
[...highlights].forEach((el) =>
el.classList.remove(ACTIVE_HIGHLIGHT_CLASSNAME),
);
const elementToShow = highlights[currentResult - 1];
if (elementToShow) {
setCurrentHighlightParent(elementToShow.parentNode as HTMLElement);
elementToShow.scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'nearest',
});
elementToShow.classList.add(ACTIVE_HIGHLIGHT_CLASSNAME);
}
}, [currentResult]);
return (
<SearchOnPage
onCancel={() => {
handleChange('');
setSearchActive(false);
}}
handleSearch={handleChange}
isSearchActive={isSearchActive}
resultNum={resultNum}
currentResult={currentResult}
setCurrentResult={setCurrentResult}
searchValue={searchValue}
containerClassName="fixed top-[100px] right-[5px] w-80"
/>
);
};
export default TextSearch;
================================================
FILE: apps/desktop/src/global.d.ts
================================================
export {};
================================================
FILE: apps/desktop/src/main.tsx
================================================
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);
================================================
FILE: apps/desktop/src/vite-env.d.ts
================================================
/// <reference types="vite/client" />
================================================
FILE: apps/desktop/src-tauri/.gitignore
================================================
# Generated by Cargo
# will have compiled files and executables
/target/
================================================
FILE: apps/desktop/src-tauri/Cargo.toml
================================================
[package]
name = "bloop"
version = "0.6.4"
description = "Search code. Fast."
authors = ["Bloop AI Developers"]
license = "Apache-2.0"
repository = "https://github.com/bloopai/bloop"
default-run = "bloop"
edition = "2021"
rust-version = "1.57"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1.4.1", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.5.0", features = ["dialog-open", "fs-all", "http-all", "native-tls-vendored", "os-all", "path-all", "process-all", "shell-all", "window-all"] }
bleep = { path = "../../../server/bleep", package = "bleep" }
anyhow = "1.0.75"
tokio = { version = "1.32.0", features = ["rt-multi-thread"] }
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
color-eyre = "0.6.2"
once_cell = "1.18.0"
sentry = "0.31.7"
qdrant-client = "1.5.0"
git-version = "0.3.5"
sentry-anyhow = "0.31.7"
sysinfo = "0.29.10"
[target.'cfg(unix)'.dependencies]
nix = { version = "0.26.4", default-features = false, features = [ "resource" ] }
[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
default = ["custom-protocol"]
# this feature is used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = ["tauri/custom-protocol"]
================================================
FILE: apps/desktop/src-tauri/bin/qdrant-aarch64-apple-darwin
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:790591ece18fdc99761f59c31282237b07389ce3dd2eecd50cceb95fddbe96f5
size 52682248
================================================
FILE: apps/desktop/src-tauri/bin/qdrant-x86_64-apple-darwin
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:de8dad5075c1bcbe403e0df610a2b2933ca49457300cda0af1a104a080e5ce76
size 65580008
================================================
FILE: apps/desktop/src-tauri/bin/qdrant-x86_64-unknown-linux-gnu
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:4abf2e680bf51edde94dee2ba51b7941c9a72f3748303716a94c9b01aaf21d83
size 49078720
================================================
FILE: apps/desktop/src-tauri/build.rs
================================================
use std::{
env, fs,
path::{Path, PathBuf},
thread,
time::Duration,
};
fn main() {
// we do not require libonnx for apple silicon
if !is_apple_silicon() {
if env::var("ORT_DYLIB_PATH").is_err() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let profile_dir = out_dir
// "target/.../build/bloop-hash"
.parent()
.unwrap()
// "target/.../build"
.parent()
.unwrap()
// "target/.../"
.parent()
.unwrap();
copy(profile_dir);
} else {
println!("cargo:rerun-if-env-changed=ORT_DYLIB_PATH");
}
}
tauri_build::build()
}
fn copy(profile_dir: &Path) {
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
let (dylib_names, target_parent) = match target_os.as_str() {
"macos" => {
let name = "libonnxruntime.dylib";
(vec![name], Path::new(".").join("frameworks"))
}
"linux" => {
let name = "libonnxruntime.so";
(vec![name], Path::new(".").join("dylibs"))
}
"windows" => {
let main = "onnxruntime.dll";
let providers = "onnxruntime_providers_shared.dll";
(vec![main, providers], Path::new(".").join("dylibs"))
}
other => panic!("unknown OS {other}"),
};
for dylib_name in dylib_names {
let dylib_path = profile_dir.join(dylib_name);
let target_path = target_parent.join(dylib_name);
wait_for(&dylib_path);
println!("target: {target_path:?}, {:?}", env::current_dir());
fs::copy(dylib_path, target_path).unwrap();
}
}
fn wait_for(dylib_path: &Path) {
println!("waiting for: {dylib_path:?}");
for _ in 0..1000 {
if dylib_path.exists() {
return;
}
thread::sleep(Duration::from_millis(500));
}
panic!("timeout waiting for ort download");
}
fn is_apple_silicon() -> bool {
let target = env::var("TARGET").unwrap();
let components: Vec<_> = target.split('-').map(|s| s.to_string()).collect();
components[0] == "aarch64" && components[2] == "darwin"
}
================================================
FILE: apps/desktop/src-tauri/config/config.json
================================================
{}
================================================
FILE: apps/desktop/src-tauri/dylibs/.keep
================================================
================================================
FILE: apps/desktop/src-tauri/frameworks/.keep
================================================
================================================
FILE: apps/desktop/src-tauri/installer.nsi
================================================
Unicode true
; Set the compression algorithm. Default is LZMA.
!if "{{compression}}" == ""
SetCompressor /SOLID lzma
!else
SetCompressor /SOLID "{{compression}}"
!endif
!include MUI2.nsh
!include FileFunc.nsh
!include x64.nsh
!include WordFunc.nsh
!include "StrFunc.nsh"
${StrCase}
${StrLoc}
!define MANUFACTURER "{{manufacturer}}"
!define PRODUCTNAME "{{product_name}}"
!define VERSION "{{version}}"
!define VERSIONWITHBUILD "{{version_with_build}}"
!define SHORTDESCRIPTION "{{short_description}}"
!define INSTALLMODE "{{install_mode}}"
!define LICENSE "{{license}}"
!define INSTALLERICON "{{installer_icon}}"
!define SIDEBARIMAGE "{{sidebar_image}}"
!define HEADERIMAGE "{{header_image}}"
!define MAINBINARYNAME "{{main_binary_name}}"
!define MAINBINARYSRCPATH "{{main_binary_path}}"
!define BUNDLEID "{{bundle_id}}"
!define COPYRIGHT "{{copyright}}"
!define OUTFILE "{{out_file}}"
!define ARCH "{{arch}}"
!define PLUGINSPATH "{{additional_plugins_path}}"
!define ALLOWDOWNGRADES "{{allow_downgrades}}"
!define DISPLAYLANGUAGESELECTOR "{{display_language_selector}}"
!define INSTALLWEBVIEW2MODE "{{install_webview2_mode}}"
!define WEBVIEW2INSTALLERARGS "{{webview2_installer_args}}"
!define WEBVIEW2BOOTSTRAPPERPATH "{{webview2_bootstrapper_path}}"
!define WEBVIEW2INSTALLERPATH "{{webview2_installer_path}}"
!define UNINSTKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}"
!define MANUPRODUCTKEY "Software\${MANUFACTURER}\${PRODUCTNAME}"
!define UNINSTALLERSIGNCOMMAND "{{uninstaller_sign_cmd}}"
Name "${PRODUCTNAME}"
BrandingText "${COPYRIGHT}"
OutFile "${OUTFILE}"
VIProductVersion "${VERSIONWITHBUILD}"
VIAddVersionKey "ProductName" "${PRODUCTNAME}"
VIAddVersionKey "FileDescription" "${SHORTDESCRIPTION}"
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
VIAddVersionKey "FileVersion" "${VERSION}"
VIAddVersionKey "ProductVersion" "${VERSION}"
; Plugins path, currently exists for linux only
!if "${PLUGINSPATH}" != ""
!addplugindir "${PLUGINSPATH}"
!endif
!if "${UNINSTALLERSIGNCOMMAND}" != ""
!uninstfinalize '${UNINSTALLERSIGNCOMMAND}'
!endif
; Handle install mode, `perUser`, `perMachine` or `both`
!if "${INSTALLMODE}" == "perMachine"
RequestExecutionLevel highest
!endif
!if "${INSTALLMODE}" == "currentUser"
RequestExecutionLevel user
!endif
!if "${INSTALLMODE}" == "both"
!define MULTIUSER_MUI
!define MULTIUSER_INSTALLMODE_INSTDIR "${PRODUCTNAME}"
!define MULTIUSER_INSTALLMODE_COMMANDLINE
!if "${ARCH}" == "x64"
!define MULTIUSER_USE_PROGRAMFILES64
!else if "${ARCH}" == "arm64"
!define MULTIUSER_USE_PROGRAMFILES64
!endif
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "${UNINSTKEY}"
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "CurrentUser"
!define MULTIUSER_INSTALLMODEPAGE_SHOWUSERNAME
!define MULTIUSER_INSTALLMODE_FUNCTION RestorePreviousInstallLocation
!define MULTIUSER_EXECUTIONLEVEL Highest
!include MultiUser.nsh
!endif
; installer icon
!if "${INSTALLERICON}" != ""
!define MUI_ICON "${INSTALLERICON}"
!endif
; installer sidebar image
!if "${SIDEBARIMAGE}" != ""
!define MUI_WELCOMEFINISHPAGE_BITMAP "${SIDEBARIMAGE}"
!endif
; installer header image
!if "${HEADERIMAGE}" != ""
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${HEADERIMAGE}"
!endif
; Define registry key to store installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "${MANUPRODUCTKEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
; Installer pages, must be ordered as they appear
; 1. Welcome Page
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
!insertmacro MUI_PAGE_WELCOME
; 2. License Page (if defined)
!if "${LICENSE}" != ""
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
!insertmacro MUI_PAGE_LICENSE "${LICENSE}"
!endif
; 3. Install mode (if it is set to `both`)
!if "${INSTALLMODE}" == "both"
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
!insertmacro MULTIUSER_PAGE_INSTALLMODE
!endif
; 4. Custom page to ask user if he wants to reinstall/uninstall
; only if a previous installtion was detected
Var ReinstallPageCheck
Page custom PageReinstall PageLeaveReinstall
Function PageReinstall
Call CheckOldMsiBloopInstall
StrCmp $R6 "" 0 compare_version
; Check if there is an existing installation, if not, abort the reinstall page
ReadRegStr $R0 SHCTX "${UNINSTKEY}" ""
ReadRegStr $R1 SHCTX "${UNINSTKEY}" "UninstallString"
${IfThen} "$R0$R1" == "" ${|} Abort ${|}
; Compare this installar version with the existing installation
; and modify the messages presented to the user accordingly
compare_version:
StrCpy $R4 "$(older)"
${If} $R7 == "msi"
ReadRegStr $R0 HKLM "$R6" "DisplayVersion"
${Else}
ReadRegStr $R0 SHCTX "${UNINSTKEY}" "DisplayVersion"
${EndIf}
${IfThen} $R0 == "" ${|} StrCpy $R4 "$(unknown)" ${|}
nsis_tauri_utils::SemverCompare "${VERSION}" $R0
Pop $R0
; Reinstalling the same version
${If} $R0 == 0
StrCpy $R1 "$(alreadyInstalledLong)"
StrCpy $R2 "$(addOrReinstall)"
StrCpy $R3 "$(uninstallApp)"
!insertmacro MUI_HEADER_TEXT "$(alreadyInstalled)" "$(chooseMaintenanceOption)"
StrCpy $R5 "2"
; Upgrading
${ElseIf} $R0 == 1
StrCpy $R1 "$(olderOrUnknownVersionInstalled)"
StrCpy $R2 "$(uninstallBeforeInstalling)"
StrCpy $R3 "$(dontUninstall)"
!insertmacro MUI_HEADER_TEXT "$(alreadyInstalled)" "$(choowHowToInstall)"
StrCpy $R5 "1"
; Downgrading
${ElseIf} $R0 == -1
StrCpy $R1 "$(newerVersionInstalled)"
StrCpy $R2 "$(uninstallBeforeInstalling)"
!if "${ALLOWDOWNGRADES}" == "true"
StrCpy $R3 "$(dontUninstall)"
!else
StrCpy $R3 "$(dontUninstallDowngrade)"
!endif
!insertmacro MUI_HEADER_TEXT "$(alreadyInstalled)" "$(choowHowToInstall)"
StrCpy $R5 "1"
${Else}
Abort
${EndIf}
Call SkipIfPassive
nsDialogs::Create 1018
Pop $R4
${IfThen} $(^RTL) == 1 ${|} nsDialogs::SetRTL $(^RTL) ${|}
${NSD_CreateLabel} 0 0 100% 24u $R1
Pop $R1
${NSD_CreateRadioButton} 30u 50u -30u 8u $R2
Pop $R2
${NSD_OnClick} $R2 PageReinstallUpdateSelection
${NSD_CreateRadioButton} 30u 70u -30u 8u $R3
Pop $R3
; disable this radio button if downgrading and downgrades are disabled
!if "${ALLOWDOWNGRADES}" == "false"
${IfThen} $R0 == -1 ${|} EnableWindow $R3 0 ${|}
!endif
${NSD_OnClick} $R3 PageReinstallUpdateSelection
; Check the first radio button if this the first time
; we enter this page or if the second button wasn't
; selected the last time we were on this page
${If} $ReinstallPageCheck != 2
SendMessage $R2 ${BM_SETCHECK} ${BST_CHECKED} 0
${Else}
SendMessage $R3 ${BM_SETCHECK} ${BST_CHECKED} 0
${EndIf}
${NSD_SetFocus} $R2
nsDialogs::Show
FunctionEnd
Function PageReinstallUpdateSelection
${NSD_GetState} $R2 $R1
${If} $R1 == ${BST_CHECKED}
StrCpy $ReinstallPageCheck 1
${Else}
StrCpy $ReinstallPageCheck 2
${EndIf}
FunctionEnd
Function PageLeaveReinstall
${NSD_GetState} $R2 $R1
; $R5 holds whether we are reinstalling the same version or not
; $R5 == "1" -> different versions
; $R5 == "2" -> same version
;
; $R1 holds the radio buttons state. its meaning is dependant on the context
StrCmp $R5 "1" 0 +2 ; Existing install is not the same version?
StrCmp $R1 "1" reinst_uninstall reinst_done ; $R1 == "1", then user chose to uninstall existing version, otherwise skip uninstalling
StrCmp $R1 "1" reinst_done ; Same version? skip uninstalling
reinst_uninstall:
HideWindow
ClearErrors
${If} $R7 == "msi"
ReadRegStr $R1 HKLM "$R6" "UninstallString"
ExecWait '$R1' $0
${Else}
ReadRegStr $4 SHCTX "${MANUPRODUCTKEY}" ""
ReadRegStr $R1 SHCTX "${UNINSTKEY}" "UninstallString"
ExecWait '$R1 /P _?=$4' $0
${EndIf}
BringToFront
${IfThen} ${Errors} ${|} StrCpy $0 2 ${|} ; ExecWait failed, set fake exit code
${If} $0 <> 0
${OrIf} ${FileExists} "$INSTDIR\${MAINBINARYNAME}.exe"
${If} $0 = 1 ; User aborted uninstaller?
StrCmp $R5 "2" 0 +2 ; Is the existing install the same version?
Quit ; ...yes, already installed, we are done
Abort
${EndIf}
MessageBox MB_ICONEXCLAMATION "$(unableToUninstall)"
Abort
${Else}
StrCpy $0 $R1 1
${IfThen} $0 == '"' ${|} StrCpy $R1 $R1 -1 1 ${|} ; Strip quotes from UninstallString
Delete $R1
RMDir $INSTDIR
${EndIf}
reinst_done:
FunctionEnd
; 5. Choose install directoy page
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
!insertmacro MUI_PAGE_DIRECTORY
; 6. Start menu shortcut page
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
Var AppStartMenuFolder
!insertmacro MUI_PAGE_STARTMENU Application $AppStartMenuFolder
; 7. Installation page
!insertmacro MUI_PAGE_INSTFILES
; 8. Finish page
;
; Don't auto jump to finish page after installation page,
; because the installation page has useful info that can be used debug any issues with the installer.
!define MUI_FINISHPAGE_NOAUTOCLOSE
; Use show readme button in the finish page as a button create a desktop shortcut
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT "$(createDesktop)"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortcut
; Show run app after installation.
!define MUI_FINISHPAGE_RUN "$INSTDIR\${MAINBINARYNAME}.exe"
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
!insertmacro MUI_PAGE_FINISH
; Uninstaller Pages
; 1. Confirm uninstall page
Var DeleteAppDataCheckbox
Var DeleteAppDataCheckboxState
!define /ifndef WS_EX_LAYOUTRTL 0x00400000
!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.ConfirmShow
Function un.ConfirmShow
FindWindow $1 "#32770" "" $HWNDPARENT ; Find inner dialog
${If} $(^RTL) == 1
System::Call 'USER32::CreateWindowEx(i${__NSD_CheckBox_EXSTYLE}|${WS_EX_LAYOUTRTL},t"${__NSD_CheckBox_CLASS}",t "$(deleteAppData)",i${__NSD_CheckBox_STYLE},i 50,i 100,i 400, i 25,i$1,i0,i0,i0)i.s'
${Else}
System::Call 'USER32::CreateWindowEx(i${__NSD_CheckBox_EXSTYLE},t"${__NSD_CheckBox_CLASS}",t "$(deleteAppData)",i${__NSD_CheckBox_STYLE},i 0,i 100,i 400, i 25,i$1,i0,i0,i0)i.s'
${EndIf}
Pop $DeleteAppDataCheckbox
SendMessage $HWNDPARENT ${WM_GETFONT} 0 0 $1
SendMessage $DeleteAppDataCheckbox ${WM_SETFONT} $1 1
FunctionEnd
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.ConfirmLeave
Function un.ConfirmLeave
SendMessage $DeleteAppDataCheckbox ${BM_GETCHECK} 0 0 $DeleteAppDataCheckboxState
FunctionEnd
!insertmacro MUI_UNPAGE_CONFIRM
; 2. Uninstalling Page
!insertmacro MUI_UNPAGE_INSTFILES
;Languages
{{#each languages}}
!insertmacro MUI_LANGUAGE "{{this}}"
{{/each}}
!insertmacro MUI_RESERVEFILE_LANGDLL
{{#each language_files}}
!include "{{this}}"
{{/each}}
!macro SetContext
!if "${INSTALLMODE}" == "currentUser"
SetShellVarContext current
!else if "${INSTALLMODE}" == "perMachine"
SetShellVarContext all
!endif
${If} ${RunningX64}
!if "${ARCH}" == "x64"
SetRegView 64
!else if "${ARCH}" == "arm64"
SetRegView 64
!else
SetRegView 32
!endif
${EndIf}
!macroend
Var PassiveMode
Function .onInit
${GetOptions} $CMDLINE "/P" $PassiveMode
IfErrors +2 0
StrCpy $PassiveMode 1
!if "${DISPLAYLANGUAGESELECTOR}" == "true"
!insertmacro MUI_LANGDLL_DISPLAY
!endif
!insertmacro SetContext
${If} $INSTDIR == ""
; Set default install location
!if "${INSTALLMODE}" == "perMachine"
${If} ${RunningX64}
!if "${ARCH}" == "x64"
StrCpy $INSTDIR "$PROGRAMFILES64\${PRODUCTNAME}"
!else if "${ARCH}" == "arm64"
StrCpy $INSTDIR "$PROGRAMFILES64\${PRODUCTNAME}"
!else
StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCTNAME}"
!endif
${Else}
StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCTNAME}"
${EndIf}
!else if "${INSTALLMODE}" == "currentUser"
StrCpy $INSTDIR "$LOCALAPPDATA\${PRODUCTNAME}"
!endif
Call RestorePreviousInstallLocation
${EndIf}
!if "${INSTALLMODE}" == "both"
!insertmacro MULTIUSER_INIT
!endif
FunctionEnd
Section EarlyChecks
; Abort silent installer if downgrades is disabled
!if "${ALLOWDOWNGRADES}" == "false"
IfSilent 0 silent_downgrades_done
; If downgrading
${If} $R0 == -1
System::Call 'kernel32::AttachConsole(i -1)i.r0'
${If} $0 != 0
System::Call 'kernel32::GetStdHandle(i -11)i.r0'
System::call 'kernel32::SetConsoleTextAttribute(i r0, i 0x0004)' ; set red color
FileWrite $0 "$(silentDowngrades)"
${EndIf}
Abort
${EndIf}
silent_downgrades_done:
!endif
SectionEnd
Section WebView2
; Check if Webview2 is already installed and skip this section
${If} ${RunningX64}
ReadRegStr $4 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
${Else}
ReadRegStr $4 HKLM "SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
${EndIf}
ReadRegStr $5 HKCU "SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
StrCmp $4 "" 0 webview2_done
StrCmp $5 "" 0 webview2_done
; Webview2 install modes
!if "${INSTALLWEBVIEW2MODE}" == "downloadBootstrapper"
Delete "$TEMP\MicrosoftEdgeWebview2Setup.exe"
DetailPrint "$(webview2Downloading)"
nsis_tauri_utils::download "https://go.microsoft.com/fwlink/p/?LinkId=2124703" "$TEMP\MicrosoftEdgeWebview2Setup.exe"
Pop $0
${If} $0 == 0
DetailPrint "$(webview2DownloadSuccess)"
${Else}
DetailPrint "$(webview2DownloadError)"
Abort "$(webview2AbortError)"
${EndIf}
StrCpy $6 "$TEMP\MicrosoftEdgeWebview2Setup.exe"
Goto install_webview2
!endif
!if "${INSTALLWEBVIEW2MODE}" == "embedBootstrapper"
Delete "$TEMP\MicrosoftEdgeWebview2Setup.exe"
File "/oname=$TEMP\MicrosoftEdgeWebview2Setup.exe" "${WEBVIEW2BOOTSTRAPPERPATH}"
DetailPrint "$(installingWebview2)"
StrCpy $6 "$TEMP\MicrosoftEdgeWebview2Setup.exe"
Goto install_webview2
!endif
!if "${INSTALLWEBVIEW2MODE}" == "offlineInstaller"
Delete "$TEMP\MicrosoftEdgeWebView2RuntimeInstaller.exe"
File "/oname=$TEMP\MicrosoftEdgeWebView2RuntimeInstaller.exe" "${WEBVIEW2INSTALLERPATH}"
DetailPrint "$(installingWebview2)"
StrCpy $6 "$TEMP\MicrosoftEdgeWebView2RuntimeInstaller.exe"
Goto install_webview2
!endif
Goto webview2_done
install_webview2:
DetailPrint "$(installingWebview2)"
; $6 holds the path to the webview2 installer
ExecWait "$6 ${WEBVIEW2INSTALLERARGS} /install" $1
${If} $1 == 0
DetailPrint "$(webview2InstallSuccess)"
${Else}
DetailPrint "$(webview2InstallError)"
Abort "$(webview2AbortError)"
${EndIf}
webview2_done:
SectionEnd
!macro CheckIfAppIsRunning
nsis_tauri_utils::FindProcess "${MAINBINARYNAME}.exe"
Pop $R0
${If} $R0 = 0
IfSilent kill 0
${IfThen} $PassiveMode != 1 ${|} MessageBox MB_OKCANCEL "$(appRunningOkKill)" IDOK kill IDCANCEL cancel ${|}
kill:
nsis_tauri_utils::KillProcess "${MAINBINARYNAME}.exe"
Pop $R0
Sleep 500
${If} $R0 = 0
Goto app_check_done
${Else}
IfSilent silent ui
silent:
System::Call 'kernel32::AttachConsole(i -1)i.r0'
${If} $0 != 0
System::Call 'kernel32::GetStdHandle(i -11)i.r0'
System::call 'kernel32::SetConsoleTextAttribute(i r0, i 0x0004)' ; set red color
FileWrite $0 "$(appRunning)$\n"
${EndIf}
Abort
ui:
Abort "$(failedToKillApp)"
${EndIf}
cancel:
Abort "$(appRunning)"
${EndIf}
app_check_done:
!macroend
Var AppSize
Section Install
SetOutPath $INSTDIR
StrCpy $AppSize 0
!insertmacro CheckIfAppIsRunning
; Copy main executable
File "${MAINBINARYSRCPATH}"
${GetSize} "$INSTDIR" "/M=${MAINBINARYNAME}.exe /S=0B" $0 $1 $2
IntOp $AppSize $AppSize + $0
; Copy resources
{{#each resources}}
CreateDirectory "$INSTDIR\\{{this.[0]}}"
File /a "/oname={{this.[1]}}" "{{@key}}"
${GetSize} "$INSTDIR" "/M={{this.[1]}} /S=0B" $0 $1 $2
IntOp $AppSize $AppSize + $0
{{/each}}
; Copy external binaries
{{#each binaries}}
File /a "/oname={{this}}" "{{@key}}"
${GetSize} "$INSTDIR" "/M={{this}} /S=0B" $0 $1 $2
IntOp $AppSize $AppSize + $0
{{/each}}
; Create uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
; Save $INSTDIR in registry for future installations
WriteRegStr SHCTX "${MANUPRODUCTKEY}" "" $INSTDIR
!if "${INSTALLMODE}" == "both"
; Save install mode to be selected by default for the next installation such as updating
; or when uninstalling
WriteRegStr SHCTX "${UNINSTKEY}" $MultiUser.InstallMode 1
!endif
; Registry information for add/remove programs
WriteRegStr SHCTX "${UNINSTKEY}" "DisplayName" "${PRODUCTNAME}"
WriteRegStr SHCTX "${UNINSTKEY}" "DisplayIcon" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\""
WriteRegStr SHCTX "${UNINSTKEY}" "DisplayVersion" "${VERSION}"
WriteRegStr SHCTX "${UNINSTKEY}" "Publisher" "${MANUFACTURER}"
WriteRegStr SHCTX "${UNINSTKEY}" "InstallLocation" "$\"$INSTDIR$\""
WriteRegStr SHCTX "${UNINSTKEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegDWORD SHCTX "${UNINSTKEY}" "NoModify" "1"
WriteRegDWORD SHCTX "${UNINSTKEY}" "NoRepair" "1"
IntOp $AppSize $AppSize / 1000
IntFmt $AppSize "0x%08X" $AppSize
WriteRegDWORD SHCTX "${UNINSTKEY}" "EstimatedSize" "$AppSize"
; Create start menu shortcut (GUI)
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
Call CreateStartMenuShortcut
!insertmacro MUI_STARTMENU_WRITE_END
; Create shortcuts for silent and passive installers, which
; can be disabled by passing `/NS` flag
; GUI installer has buttons for users to control creating them
IfSilent check_ns_flag 0
${IfThen} $PassiveMode == 1 ${|} Goto check_ns_flag ${|}
Goto shortcuts_done
check_ns_flag:
${GetOptions} $CMDLINE "/NS" $R0
IfErrors 0 shortcuts_done
Call CreateDesktopShortcut
Call CreateStartMenuShortcut
shortcuts_done:
; Auto close this page for passive mode
${IfThen} $PassiveMode == 1 ${|} SetAutoClose true ${|}
SectionEnd
Function .onInstSuccess
; Check for `/R` flag only in silent and passive installers because
; GUI installer has a toggle for the user to (re)start the app
IfSilent check_r_flag 0
${IfThen} $PassiveMode == 1 ${|} Goto check_r_flag ${|}
Goto run_done
check_r_flag:
${GetOptions} $CMDLINE "/R" $R0
IfErrors run_done 0
Exec '"$INSTDIR\${MAINBINARYNAME}.exe"'
run_done:
FunctionEnd
Function un.onInit
!insertmacro SetContext
!if "${INSTALLMODE}" == "both"
!insertmacro MULTIUSER_UNINIT
!endif
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
Section Uninstall
!insertmacro CheckIfAppIsRunning
; Delete the app directory and its content from disk
; Copy main executable
Delete "$INSTDIR\${MAINBINARYNAME}.exe"
; Delete resources
{{#each resources}}
Delete "$INSTDIR\\{{this.[1]}}"
RMDir "$INSTDIR\\{{this.[0]}}"
{{/each}}
; Delete external binaries
{{#each binaries}}
Delete "$INSTDIR\\{{this}}"
{{/each}}
; Delete uninstaller
Delete "$INSTDIR\uninstall.exe"
RMDir "$INSTDIR"
; Remove start menu shortcut
!insertmacro MUI_STARTMENU_GETFOLDER Application $AppStartMenuFolder
Delete "$SMPROGRAMS\$AppStartMenuFolder\${MAINBINARYNAME}.lnk"
RMDir "$SMPROGRAMS\$AppStartMenuFolder"
; Remove desktop shortcuts
Delete "$DESKTOP\${MAINBINARYNAME}.lnk"
; Remove registry information for add/remove programs
!if "${INSTALLMODE}" == "both"
DeleteRegKey SHCTX "${UNINSTKEY}"
!else if "${INSTALLMODE}" == "perMachine"
DeleteRegKey HKLM "${UNINSTKEY}"
!else
DeleteRegKey HKCU "${UNINSTKEY}"
!endif
DeleteRegValue HKCU "${MANUPRODUCTKEY}" "Installer Language"
; Delete app data
${If} $DeleteAppDataCheckboxState == 1
SetShellVarContext current
RmDir /r "$APPDATA\${BUNDLEID}"
RmDir /r "$LOCALAPPDATA\${BUNDLEID}"
${EndIf}
${GetOptions} $CMDLINE "/P" $R0
IfErrors +2 0
SetAutoClose true
SectionEnd
Function RestorePreviousInstallLocation
ReadRegStr $4 SHCTX "${MANUPRODUCTKEY}" ""
StrCmp $4 "" +2 0
StrCpy $INSTDIR $4
FunctionEnd
Function SkipIfPassive
${IfThen} $PassiveMode == 1 ${|} Abort ${|}
FunctionEnd
Function CreateDesktopShortcut
CreateShortcut "$DESKTOP\${MAINBINARYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
ApplicationID::Set "$DESKTOP\${MAINBINARYNAME}.lnk" "${BUNDLEID}"
FunctionEnd
Function CreateStartMenuShortcut
CreateDirectory "$SMPROGRAMS\$AppStartMenuFolder"
CreateShortcut "$SMPROGRAMS\$AppStartMenuFolder\${MAINBINARYNAME}.lnk" "$INSTDIR\${MAINBINARYNAME}.exe"
ApplicationID::Set "$SMPROGRAMS\$AppStartMenuFolder\${MAINBINARYNAME}.lnk" "${BUNDLEID}"
FunctionEnd
Var CurrentKey
Var KeyIdx
Function CheckOldMsiBloopInstall
StrCpy $KeyIdx 0
loop:
EnumRegKey $CurrentKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" $KeyIdx
; Check against each GUID in the provided list
; 0.5.7
StrCmp $CurrentKey "{2C8429F8-54EB-467C-BE37-C8DCD3FCE6BC}" found
; 0.5.6
StrCmp $CurrentKey "{4A778A50-FD64-4E96-BA76-35F5D66B8899}" found
; 0.5.5
StrCmp $CurrentKey "{ABCE7896-96F3-4DE1-885F-2634F0CAB59A}" found
; 0.5.4
StrCmp $CurrentKey "{6ED61500-55C2-4E6F-83EE-951F91904EA5}" found
; 0.5.3
StrCmp $CurrentKey "{E86D72B5-7DB3-4601-9926-77B2767730DB}" found
; 0.5.2
StrCmp $CurrentKey "{97C55FFD-6A65-4BA1-ABAE-40EDE303A5F6}" found
; 0.5.1
StrCmp $CurrentKey "{C84E9599-EAFF-4F07-B216-9EF97F07A25A}" found
; 0.5.0
StrCmp $CurrentKey "{0F439DE0-93F0-48E9-BEFE-6D43F203A231}" found
; 0.4.17
StrCmp $CurrentKey "{1302A8FE-5796-4B36-AD6C-2F525CC18158} " found
; 0.4.16
StrCmp $CurrentKey "{EC1C0015-E851-4D47-B758-78FAFDCDA9B5}" found
; 0.4.15
StrCmp $CurrentKey "{7BADAB06-87E8-4DF5-9262-0917D61D70F8}" found
; 0.4.14
StrCmp $CurrentKey "{B3030CB3-5DDC-41A8-84FA-A3A02BF1054B}" found
; 0.4.13
StrCmp $CurrentKey "{14515A1F-8824-49A1-80A6-E43F529627D2}" found
; 0.4.12
StrCmp $CurrentKey "{97594AB3-17EB-4B4D-BF6E-BC14AA55439C}" found
; 0.4.11
StrCmp $CurrentKey "{4B855395-4A08-4DF3-9EC9-21BD49658925}" found
; 0.4.10 (had no Windows build)
; ...
; 0.4.9
StrCmp $CurrentKey "{7954AC40-85A5-4705-93C8-7ECE1EA779A8}" found
; 0.4.8
StrCmp $CurrentKey "{756A33B8-AABE-4010-88E1-CD967371B26A}" found
StrCmp $CurrentKey "" notfound
; If none of the GUIDs match, continue with the next key
IntOp $KeyIdx $KeyIdx + 1
Goto loop
notfound:
StrCpy $R6 ""
Goto done
found:
StrCpy $R7 "msi"
StrCpy $R6 "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$CurrentKey"
done:
FunctionEnd
================================================
FILE: apps/desktop/src-tauri/model/ggml/tokenizer.json
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:65c14be98b474267fa3b8129ac643ca9356234b54bb19d8d1b95ca67b55f469f
size 466248
================================================
FILE: apps/desktop/src-tauri/model/model.onnx
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:712cda19c5e4803e4d2f1d5ae972083537ffc2531759b67641622251c8ec3caf
size 22998413
================================================
FILE: apps/desktop/src-tauri/model/special_tokens_map.json
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:b6d346be366a7d1d48332dbc9fdf3bf8960b5d879522b7799ddba59e76237ee3
size 125
================================================
FILE: apps/desktop/src-tauri/model/tokenizer.json
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:d241a60d5e8f04cc1b2b3e9ef7a4921b27bf526d9f6050ab90f9267a1f9e5c66
size 711396
================================================
FILE: apps/desktop/src-tauri/model/tokenizer_config.json
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:5a0279327ed471a6e4cfb88b6f62f73d8e8ddf3fdc1e9cbb98f692b1b9ae0d91
size 579
================================================
FILE: apps/desktop/src-tauri/model/vocab.txt
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3
size 231508
================================================
FILE: apps/desktop/src-tauri/src/QDRANT_CONFIG_TEMPLATE.yml
================================================
telemetry_disabled: true
storage:
# Where to store all the data
storage_path: {storage}
# Where to store snapshots
snapshots_path: {snapshots}
# If true - point's payload will not be stored in memory.
# It will be read from the disk every time it is requested.
# This setting saves RAM by (slightly) increasing the response time.
# Note: those payload values that are involved in filtering and are indexed - remain in RAM.
on_disk_payload: false
# Write-ahead-log related configuration
wal:
# Size of a single WAL segment
wal_capacity_mb: 32
# Number of WAL segments to create ahead of actual data requirement
wal_segments_ahead: 0
performance:
# Number of parallel threads used for search operations. If 0 - auto selection.
max_search_threads: 4
optimizers:
# The minimal fraction of deleted vectors in a segment, required to perform segment optimization
deleted_threshold: 0.2
# The minimal number of vectors in a segment, required to perform segment optimization
vacuum_min_vector_number: 1000
# Target amount of segments optimizer will try to keep.
# Real amount of segments may vary depending on multiple parameters:
# - Amount of stored points
# - Current write RPS
#
# It is recommended to select default number of segments as a factor of the number of search threads,
# so that each segment would be handled evenly by one of the threads.
# If `default_segment_number = 0`, will be automatically selected by the number of available CPUs
default_segment_number: 2
# Do not create segments larger this size (in KiloBytes).
# Large segments might require disproportionately long indexation times,
# therefore it makes sense to limit the size of segments.
#
# If indexation speed have more priority for your - make this parameter lower.
# If search speed is more important - make this parameter higher.
# Note: 1Kb = 1 vector of size 256
# If not set, will be automatically selected considering the number of available CPUs.
max_segment_size_kb: null
# Maximum size (in KiloBytes) of vectors to store in-memory per segment.
# Segments larger than this threshold will be stored as read-only memmaped file.
# To enable memmap storage, lower the threshold
# Note: 1Kb = 1 vector of size 256
# If not set, mmap will not be used.
memmap_threshold_kb: null
# Maximum size (in KiloBytes) of vectors allowed for plain index.
# Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md
# Note: 1Kb = 1 vector of size 256
indexing_threshold_kb: 20000
# Interval between forced flushes.
flush_interval_sec: 5
# Max number of threads, which can be used for optimization.
max_optimization_threads: 1
# Default parameters of HNSW Index. Could be overridden for each collection individually
hnsw_index:
# Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.
m: 16
# Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.
ef_construct: 100
# Minimal size (in KiloBytes) of vectors for additional payload-based indexing.
# If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used -
# in this case full-scan search should be preferred by query planner and additional indexing is not required.
# Note: 1Kb = 1 vector of size 256
full_scan_threshold_kb: 10000
# Number of parallel threads used for background index building. If 0 - auto selection.
max_indexing_threads: 0
service:
# Maximum size of POST data in a single request in megabytes
max_request_size_mb: 32
# Number of parallel workers used for serving the api. If 0 - equal to the number of available cores.
# If missing - Same as storage.max_search_threads
max_workers: 0
# Host to bind the service on
host: 127.0.0.1
# HTTP port to bind the service on
http_port: 6333
# gRPC port to bind the service on.
# If `null` - gRPC is disabled. Default: null
# Uncomment to enable gRPC:
grpc_port: 6334
# Enable CORS headers in REST API.
# If enabled, browsers would be allowed to query REST endpoints regardless of query origin.
# More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
# Default: true
enable_cors: true
cluster:
# Use `enabled: true` to run Qdrant in distributed deployment mode
enabled: false
# Configuration of the inter-cluster communication
p2p:
# Port for internal communication between peers
port: 6335
# Configuration related to distributed consensus algorithm
consensus:
# How frequently peers should ping each other.
# Setting this parameter to lower value will allow consensus
# to detect disconnected nodes earlier, but too frequent
# tick period may create significant network and CPU overhead.
# We encourage you NOT to change this parameter unless you know what you are doing.
tick_period_ms: 100
================================================
FILE: apps/desktop/src-tauri/src/backend.rs
================================================
use bleep::{Application, Configuration, Environment};
use tracing::error;
use super::{Manager, Payload, Runtime};
use std::thread;
use std::time::Duration;
#[tauri::command]
pub fn get_last_log_file(config: tauri::State<Configuration>) -> Option<String> {
let log_dir = config.log_dir();
let mut entries = std::fs::read_dir(log_dir)
.ok()?
.collect::<Result<Vec<_>, _>>()
.ok()?;
// Sort the entries by modified time (most recent first)
entries.sort_by_key(|entry| {
entry
.metadata()
.and_then(|m| m.modified())
.unwrap_or(std::time::SystemTime::UNIX_EPOCH)
});
entries.reverse();
// The first entry is the most recent log file
let filename = match entries.first() {
Some(path) => path.path().to_string_lossy().to_string(),
None => {
tracing::warn!("No log files found");
return None;
}
};
std::fs::read_to_string(filename).ok()
}
pub fn initialize<R: Runtime>(app: &mut tauri::App<R>) -> tauri::plugin::Result<()> {
let handle = app.handle();
let configuration = crate::config::init(&app.handle()).clone();
app.manage(configuration.clone());
let runtime = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.thread_name("bleep-backend")
.build()
.unwrap();
runtime.spawn(start_backend(configuration, handle));
app.manage(runtime);
Ok(())
}
async fn wait_for_qdrant() -> anyhow::Result<()> {
use qdrant_client::prelude::*;
let qdrant =
QdrantClient::new(Some(QdrantClientConfig::from_url("http://127.0.0.1:6334"))).unwrap();
for _ in 0..60 {
if qdrant.health_check().await.is_ok() {
return Ok(());
}
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
}
anyhow::bail!("qdrant cannot be started");
}
async fn start_backend<R: Runtime>(configuration: Configuration, app: tauri::AppHandle<R>) {
tracing::info!("booting bleep back-end");
if let Err(err) = wait_for_qdrant().await {
error!(?err, "qdrant failed to come up");
thread::sleep(Duration::from_secs(4));
app.emit_all(
"server-crashed",
Payload {
message: "Failed to start qdrant".into(),
},
)
.unwrap();
};
app.manage(configuration.clone());
let initialized = Application::initialize(Environment::insecure_local(), configuration).await;
match initialized {
Ok(backend) => {
if let Err(err) = backend.run().await {
error!(?err, "server crashed error");
app.emit_all(
"server-crashed",
Payload {
message: err.to_string(),
},
)
.unwrap()
}
}
Err(err) => {
error!(?err, "server failed to start");
app.emit_all(
"server-crashed",
Payload {
message: "Something bad happened".into(),
},
)
.unwrap();
}
}
}
// ensure that the leading header and trailer are stripped
#[cfg(windows)]
#[test]
fn device_id_on_single_line() {
assert_eq!(get_device_id().lines().count(), 1)
}
================================================
FILE: apps/desktop/src-tauri/src/config.rs
================================================
use bleep::Configuration;
use once_cell::sync::OnceCell;
use tauri::Runtime;
static CONFIG: OnceCell<Configuration> = OnceCell::new();
pub fn init<R: Runtime>(app: &tauri::AppHandle<R>) -> &Configuration {
CONFIG.get_or_init(|| {
let config = create_configuration(app);
// only after that set up bleep logging hooks
bleep::Application::install_logging(&config);
config
})
}
fn create_configuration<R: Runtime>(app: &tauri::AppHandle<R>) -> Configuration {
let path = app
.path_resolver()
.resolve_resource("config/config.json")
.expect("failed to resolve resource");
let mut bundled = Configuration::read(path).unwrap();
bundled.qdrant_url = "http://127.0.0.1:6334".into();
bundled.max_threads = bleep::default_parallelism() / 2;
bundled.model_dir = app
.path_resolver()
.resolve_resource("model")
.expect("bad bundle");
bundled.dylib_dir = Some(if cfg!(all(target_os = "macos", debug_assertions)) {
app.path_resolver()
.resolve_resource("dylibs")
.expect("missing `apps/desktop/src-tauri/dylibs`")
.parent()
.expect("invalid path")
.to_owned()
} else if cfg!(target_os = "macos") {
app.path_resolver()
.resolve_resource("dylibs")
.expect("missing `apps/desktop/src-tauri/dylibs`")
.parent()
.expect("invalid path")
.parent()
.expect("invalid path")
.join("Frameworks")
} else {
app.path_resolver()
.resolve_resource("dylibs")
.expect("missing `apps/desktop/src-tauri/dylibs`")
});
let data_dir = app.path_resolver().app_data_dir().unwrap();
bundled.index_dir = data_dir.join("bleep");
Configuration::merge(
bundled,
Configuration::cli_overriding_config_file().unwrap(),
)
}
================================================
FILE: apps/desktop/src-tauri/src/main.rs
================================================
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
mod backend;
mod config;
mod qdrant;
use sysinfo::{ProcessExt, ProcessRefreshKind, RefreshKind, Signal, System, SystemExt};
pub use tauri::{plugin, App, Manager, Runtime};
use std::{path::PathBuf, thread, time::Duration};
// the payload type must implement `Serialize` and `Clone`.
#[derive(Clone, serde::Serialize)]
struct Payload {
message: String,
}
fn relative_command_path(command: impl AsRef<str>) -> Option<PathBuf> {
let cmd = if cfg!(windows) {
format!("{}.exe", command.as_ref())
} else {
command.as_ref().into()
};
std::env::current_exe()
.ok()?
.parent()
.map(|dir| dir.join(cmd))
.filter(|path| path.is_file())
}
fn main() {
cleanup_old_processes();
_ = color_eyre::install();
tauri::Builder::default()
.plugin(qdrant::QdrantSupervisor::default())
.setup(backend::initialize)
.invoke_handler(tauri::generate_handler![
show_folder_in_finder,
show_main_window,
backend::get_last_log_file,
])
.run(tauri::generate_context!())
.expect("error running tauri application");
}
#[tauri::command]
fn show_main_window(app_handle: tauri::AppHandle) {
if let Some(window) = app_handle.get_window("main") {
if !cfg!(target_os = "macos") {
window.unminimize().unwrap();
}
window.unminimize().unwrap();
window.set_focus().unwrap();
window.show().unwrap();
}
}
#[tauri::command]
fn show_folder_in_finder(path: String) {
let path = PathBuf::from(path).canonicalize().unwrap();
#[cfg(target_os = "macos")]
{
std::process::Command::new("open")
.arg(path)
.arg("-R") // will reveal the file in finder instead of opening it
.spawn()
.unwrap();
}
#[cfg(target_os = "linux")]
{
std::process::Command::new("xdg-open")
.arg(path)
.spawn()
.unwrap();
}
#[cfg(target_os = "windows")]
{
std::process::Command::new("explorer")
.arg(path)
.spawn()
.unwrap();
}
}
fn cleanup_old_processes() {
const PROCESS_BLACKLIST: &[&str] = &["qdrant", "bleep"];
// Limit total open files from `sysinfo` crate on Linux.
sysinfo::set_open_files_limit(10);
let mut sys =
System::new_with_specifics(RefreshKind::new().with_processes(ProcessRefreshKind::new()));
for name in PROCESS_BLACKLIST {
for process in sys.processes_by_exact_name(name) {
if process.kill_with(Signal::Term).is_none() && !process.kill() {
tracing::error!(?name, "was not able to close existing process");
}
}
}
// We now wait for these processes to close.
let mut remaining_procs = vec![];
for _ in 0..10 {
thread::sleep(Duration::from_millis(500));
sys.refresh_processes();
remaining_procs = PROCESS_BLACKLIST
.iter()
.flat_map(|name| sys.processes_by_exact_name(name))
.collect();
if remaining_procs.is_empty() {
break;
}
}
// As a last-ditch resort, kill any remaining processes.
for proc in remaining_procs {
proc.kill();
}
}
================================================
FILE: apps/desktop/src-tauri/src/qdrant.rs
================================================
use std::{
fs::{create_dir_all, write, File},
path::{Path, PathBuf},
process::{Child, Command},
};
use tauri::{plugin::Plugin, Runtime};
use tracing::{error, info, warn};
use super::relative_command_path;
#[derive(Default)]
pub(super) struct QdrantSupervisor {
child: Option<Child>,
stdout_file: Option<PathBuf>,
stderr_file: Option<PathBuf>,
}
impl<R> Plugin<R> for QdrantSupervisor
where
R: Runtime,
{
fn name(&self) -> &'static str {
"qdrant"
}
fn initialize(
&mut self,
app: &tauri::AppHandle<R>,
_config: serde_json::Value,
) -> tauri::plugin::Result<()> {
// initialize the system configuration
let _initialize_config = crate::config::init(app);
let data_dir = app.path_resolver().app_data_dir().unwrap();
let qdrant_dir = data_dir.join("qdrant");
let qd_config_dir = qdrant_dir.join("config");
let qd_logs_dir = qdrant_dir.join("logs");
let stdout_file = qd_logs_dir.join("latest.stdout");
let stderr_file = qd_logs_dir.join("latest.stderr");
create_dir_all(&qd_config_dir).unwrap();
create_dir_all(&qd_logs_dir).unwrap();
write(
qd_config_dir.join("config.yaml"),
format!(
include_str!("./QDRANT_CONFIG_TEMPLATE.yml"),
storage = &qdrant_dir.join("storage").to_string_lossy(),
snapshots = &qdrant_dir.join("snapshots").to_string_lossy()
),
)
.unwrap();
let command = relative_command_path("qdrant").expect("bad bundle");
self.stdout_file = Some(stdout_file.clone());
self.stderr_file = Some(stderr_file.clone());
self.child = Some(run_command(
&command,
&qdrant_dir,
&stdout_file,
&stderr_file,
));
Ok(())
}
fn on_event(&mut self, _app: &tauri::AppHandle<R>, event: &tauri::RunEvent) {
use tauri::RunEvent::{Exit, ExitRequested};
if matches!(event, Exit | ExitRequested { .. }) {
let Some(mut child) = self.child.take() else {
warn!("qdrant has been killed");
return;
};
if let Err(err) = child.kill() {
warn!(?err, "failed to kill qdrant");
}
} else if let Some(ref mut child) = self.child {
match child.try_wait() {
Ok(Some(status)) if status.success() => {
// don't fire again
_ = self.child.take();
}
Ok(Some(_)) => {
// don't fire again
_ = self.child.take();
}
Ok(None) => {
// all is normal, this is what we want
}
Err(err) => {
error!(?err, "failed to monitor qdrant subprocess");
}
}
}
}
}
impl Drop for QdrantSupervisor {
fn drop(&mut self) {
if let Some(mut child) = self.child.take() {
if let Err(err) = child.kill() {
warn!(?err, "failed to kill qdrant");
}
}
}
}
#[cfg(unix)]
fn run_command(command: &Path, qdrant_dir: &Path, stdout: &Path, stderr: &Path) -> Child {
use nix::sys::resource::{getrlimit, setrlimit, Resource};
let logs_file = File::create(stdout).unwrap();
let stderr_logs_file = File::create(stderr).unwrap();
match getrlimit(Resource::RLIMIT_NOFILE) {
Ok((current_soft, current_hard)) => {
info!(current_soft, current_hard, "got rlimit/nofile");
let new_soft = current_soft.max(current_hard.min(10000));
if let Err(err) = setrlimit(Resource::RLIMIT_NOFILE, new_soft, current_hard) {
error!(
?err,
new_soft, current_soft, current_hard, "failed to set rlimit/nofile"
);
} else {
info!(new_soft, current_hard, "set rlimit/nofile");
}
}
Err(err) => {
error!(?err, "failed to get rlimit/nofile");
}
}
Command::new(command)
.current_dir(qdrant_dir)
.stdout(logs_file)
.stderr(stderr_logs_file)
.spawn()
.expect("failed to start qdrant")
}
#[cfg(windows)]
fn run_command(command: &Path, qdrant_dir: &Path, stdout: &Path, stderr: &Path) -> Child {
use std::os::windows::process::CommandExt;
let qd_logs_dir = qdrant_dir.join("logs");
create_dir_all(&qd_logs_dir).unwrap();
let logs_file = File::create(stdout).unwrap();
let stderr_logs_file = File::create(stderr).unwrap();
Command::new(command)
.current_dir(qdrant_dir)
// Add a CREATE_NO_WINDOW flag to prevent qdrant console popup
.creation_flags(0x08000000)
.stdout(logs_file)
.stderr(stderr_logs_file)
.spawn()
.expect("failed to start qdrant")
}
================================================
FILE: apps/desktop/src-tauri/tauri.conf.json
================================================
{
"$schema": "../../../node_modules/@tauri-apps/cli/schema.json",
"build": {
"beforeBuildCommand": "npm run build",
"beforeDevCommand": "npm run dev",
"devPath": "http://localhost:5173",
"distDir": "../dist"
},
"package": {
"productName": "bloop",
"version": "0.6.4"
},
"tauri": {
"allowlist": {
"fs": {
"all": true
},
"window": {
"all": true
},
"dialog": {
"open": true
},
"http": {
"all": true
},
"os": {
"all": true
},
"shell": {
"all": true
},
"path": {
"all": true
},
"process": {
"all": true
}
},
"bundle": {
"active": true,
"category": "DeveloperTool",
"copyright": "Bloop AI Limited",
"deb": {
"depends": []
},
"externalBin": [
"bin/qdrant"
],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "ai.bloop.bloop",
"longDescription": "Helping developers find code faster",
"macOS": {
"entitlements": null,
"exceptionDomain": "",
"frameworks": [
"frameworks/libonnxruntime.dylib"
],
"providerShortName": null,
"signingIdentity": null
},
"resources": [
"model/*",
"dylibs/*",
"config/config.json"
],
"shortDescription": "",
"targets": "all",
"windows": {
"certificateThumbprint": "b955de6f8483ad3b14497e798a6eef48a137931b",
"digestAlgorithm": "sha256",
"timestampUrl": "http://timestamp.sectigo.com",
"nsis": {
"installMode": "currentUser",
"template": "installer.nsi"
}
}
},
"security": {
"csp": null
},
"windows": [
{
"fullscreen": false,
"height": 900,
"resizable": true,
"title": "bloop",
"width": 1400,
"hiddenTitle": true,
"titleBarStyle": "Overlay",
"minHeight": 700,
"minWidth": 1000,
"fileDropEnabled": false
}
]
}
}
================================================
FILE: apps/desktop/tailwind.config.cjs
================================================
/** @type {import('tailwindcss').Config} */
const basicConfig = require("../../client/tailwind.config.cjs");
module.exports = {
...basicConfig,
content: ['../../client/src/**/*.{ts,tsx,js,jsx}', './src/**/*.tsx']
}
================================================
FILE: apps/desktop/tsconfig.json
================================================
{
"extends": "../../client/tsconfig.json",
"include": ["src"],
}
================================================
FILE: apps/desktop/tsconfig.node.json
================================================
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
================================================
FILE: apps/desktop/vite.config.ts
================================================
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import EnvironmentPlugin from 'vite-plugin-environment';
// https://vitejs.dev/config/
export default defineConfig({
build: {
sourcemap: true, // Source map generation must be turned on
},
envDir: '../../.',
plugins: [
react(),
EnvironmentPlugin(
{
ONBOARDING: '',
API_URL: '',
},
{
defineOn: 'import.meta.env',
},
),
],
publicDir: '../../client/public',
define: {
__APP_SESSION__: (Math.random() * 100000).toString(),
},
server: {
fs: {
strict: false,
},
},
});
================================================
FILE: client/.gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
storybook-static
coverage
.env
================================================
FILE: client/.storybook/main.cjs
================================================
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions"
],
framework: {
name: '@storybook/react-vite',
options: {},
},
"features": {
"storyStoreV7": true
}
}
================================================
FILE: client/.storybook/preview-head.html
================================================
<script>
window.global = window;
</script>
================================================
FILE: client/.storybook/preview.cjs
================================================
import '../src/index.css';
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
================================================
FILE: client/README.md
================================================
# Client
## Searching in the browser
You can use bloop in the browser, without running the Tauri app. First follow [the steps](./../server/README.md) to install and run the search server. Make sure that `API_URL` is set in `.env` (e.g. `API_URL=http://localhost:7878/api`). Then, in the root directory run:
```
npm install
npm run start-web
```
Open `localhost:5173` in a browser and, hey presto, you've got bloop in the browser.
================================================
FILE: client/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>bloop</title>
</head>
<body data-theme="system">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
================================================
FILE: client/jest.config.js
================================================
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.ts'],
collectCoverageFrom: [
'src/utils/{!(services),}.{js,jsx,ts,tsx}',
'!**/node_modules/**',
'!**/vendor/**',
],
coverageThreshold: {
global: {
branches: 10,
functions: 21,
lines: 18,
},
},
};
================================================
FILE: client/package.json
================================================
{
"name": "@bloop/client",
"private": true,
"version": "0.6.4",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint src --ext ts --ext tsx --fix",
"type-check": "tsc",
"storybook": "sb dev -p 6006",
"build-storybook": "sb build",
"test": "jest --collect-coverage --passWithNoTests",
"chromatic": "npx chromatic --project-token=6115d726666b"
}
}
================================================
FILE: client/postcss.config.cjs
================================================
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
================================================
FILE: client/src/App.tsx
================================================
import React, { memo } from 'react';
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { Toaster } from 'sonner';
import Project from './Project';
import CommandBar from './CommandBar';
import ProjectContextProvider from './context/providers/ProjectContextProvider';
import CommandBarContextProvider from './context/providers/CommandBarContextProvider';
import { UIContextProvider } from './context/providers/UIContextProvider';
import Settings from './Settings';
import ProjectSettings from './ProjectSettings';
import TabsContextProvider from './context/providers/TabsContextProvider';
import { FileHighlightsContextProvider } from './context/providers/FileHighlightsContextProvider';
import RepositoriesContextProvider from './context/providers/RepositoriesContextProvider';
const toastOptions = {
unStyled: true,
classNames: {
toast:
'w-[20.75rem] p-4 pl-5 grid grid-cols-[1rem_1fr] items-start gap-3 rounded-md border border-bg-border bg-bg-base shadow-high',
error: 'text-red',
info: 'text-label-title',
title: 'body-s-b',
description: '!text-label-muted body-s mt-1.5',
actionButton: 'col-span-full',
cancelButton: 'bg-orange-400',
closeButton:
'!bg-bg-base !text-label-muted !border-none !left-[unset] !right-2 !top-6 !w-6 !h-6',
},
};
const App = () => {
return (
<DndProvider backend={HTML5Backend}>
<UIContextProvider>
<ProjectContextProvider>
<Toaster closeButton toastOptions={toastOptions} />
<RepositoriesContextProvider>
<CommandBarContextProvider>
<Settings />
<ProjectSettings />
<FileHighlightsContextProvider>
<TabsContextProvider>
<CommandBar />
<Project />
</TabsContextProvider>
</FileHighlightsContextProvider>
</CommandBarContextProvider>
</RepositoriesContextProvider>
</ProjectContextProvider>
</UIContextProvider>
</DndProvider>
);
};
export default memo(App);
================================================
FILE: client/src/CloudApp.tsx
================================================
import React, { useEffect, useMemo, useState } from 'react';
import { BrowserRouter } from 'react-router-dom';
import packageJson from '../package.json';
import App from './App';
import { LocaleContext } from './context/localeContext';
import i18n from './i18n';
import './index.css';
import {
getPlainFromStorage,
LANGUAGE_KEY,
savePlainToStorage,
} from './services/storage';
import { LocaleType } from './types/general';
import { DeviceContextProvider } from './context/providers/DeviceContextProvider';
const CloudApp = () => {
const [locale, setLocale] = useState<LocaleType>(
(getPlainFromStorage(LANGUAGE_KEY) as LocaleType | null) || 'en',
);
const deviceContextValue = useMemo(
() => ({
openFolderInExplorer: () => {},
openLink: (p: string) => window.open(p),
chooseFolder: () => Promise.resolve(null),
homeDir: '$HOME',
listen: () => {},
os: {
arch: '',
type: '',
platform: '',
version: '',
},
invokeTauriCommand: () => Promise.resolve(''),
release: packageJson.version,
apiUrl: import.meta.env.API_URL || '/api',
isRepoManagementAllowed: true,
isSelfServe: true,
forceAnalytics: true,
showNativeMessage: alert,
relaunch: () => {},
}),
[],
);
useEffect(() => {
i18n.changeLanguage(locale);
savePlainToStorage(LANGUAGE_KEY, locale);
}, [locale]);
const localeContextValue = useMemo(
() => ({
locale,
setLocale,
}),
[locale],
);
return (
<DeviceContextProvider deviceContextValue={deviceContextValue}>
<LocaleContext.Provider value={localeContextValue}>
<BrowserRouter>
<App />
</BrowserRouter>
</LocaleContext.Provider>
</DeviceContextProvider>
);
};
export default CloudApp;
================================================
FILE: client/src/CommandBar/Body/Item.tsx
================================================
import React, {
memo,
ReactElement,
useCallback,
useContext,
useEffect,
useRef,
} from 'react';
import {
CommandBarItemGeneralType,
CommandBarStepEnum,
} from '../../types/general';
import useShortcuts from '../../hooks/useShortcuts';
import useKeyboardNavigation from '../../hooks/useKeyboardNavigation';
import { checkEventKeys } from '../../utils/keyboardUtils';
import { CommandBarContext } from '../../context/commandBarContext';
import { CheckmarkInSquareIcon } from '../../icons';
import {
RECENT_COMMANDS_KEY,
updateArrayInStorage,
} from '../../services/storage';
import { ArrowNavigationContext } from '../../context/arrowNavigationContext';
type Props = CommandBarItemGeneralType & {
index: string;
isFirst?: boolean;
isWithCheckmark?: boolean;
customRightElement?: ReactElement;
focusedItemProps?: Record<string, any>;
disableKeyNav?: boolean;
itemKey: string;
};
const CommandBarItem = ({
Icon,
label,
shortcut,
index,
id,
footerBtns,
isFirst,
iconContainerClassName,
footerHint,
customRightElement,
onClick,
focusedItemProps,
disableKeyNav,
isWithCheckmark,
closeOnClick,
itemKey,
}: Props) => {
const ref = useRef<HTMLButtonElement>(null);
const shortcutKeys = useShortcuts(shortcut);
const { setFocusedItem, setChosenStep, setIsVisible } = useContext(
CommandBarContext.Handlers,
);
const { setFocusedIndex, focusedIndex } = useContext(ArrowNavigationContext);
useEffect(() => {
if (focusedIndex === index) {
setFocusedItem({
footerHint,
footerBtns,
focusedItemProps,
});
ref.current?.scrollIntoView({ block: 'nearest' });
}
}, [focusedIndex, index, footerBtns, footerHint, focusedItemProps]);
const handleMouseMove = useCallback(
(e: React.MouseEvent) => {
if (e.movementX || e.movementY) {
setFocusedIndex(index);
}
},
[index, setFocusedIndex],
);
const handleClick = useCallback(
(e: React.MouseEvent | KeyboardEvent) => {
if (onClick) {
onClick(e);
if (closeOnClick) {
setIsVisible(false);
setChosenStep({ id: CommandBarStepEnum.INITIAL });
}
} else {
setChosenStep({
id: id as Exclude<
CommandBarStepEnum,
CommandBarStepEnum.ADD_TO_STUDIO | CommandBarStepEnum.SEARCH_DOCS
>,
});
}
updateArrayInStorage(RECENT_COMMANDS_KEY, itemKey);
},
[id, onClick, closeOnClick, itemKey],
);
const handleKeyEvent = useCallback(
(e: KeyboardEvent) => {
const shortAction = footerBtns.find((b) => checkEventKeys(e, b.shortcut));
if (
(focusedIndex === index && shortAction && !shortAction.action) ||
checkEventKeys(e, shortcut)
) {
e.preventDefault();
e.stopPropagation();
handleClick(e);
return;
}
if (focusedIndex === index && shortAction?.action) {
e.preventDefault();
e.stopPropagation();
shortAction.action();
}
},
[focusedIndex === index, shortcut, footerBtns, handleClick],
);
useKeyboardNavigation(handleKeyEvent, disableKeyNav);
return (
<button
className={`flex items-center gap-3 rounded-md px-2 h-10 ${
focusedIndex === index
? 'bg-bg-base-hover text-label-title'
: 'text-label-base'
} text-left ${isFirst ? 'scroll-mt-8' : ''}`}
onMouseMove={handleMouseMove}
onClick={handleClick}
data-node-index={index}
ref={ref}
>
<div
className={`rounded-6 w-6 h-6 flex items-center justify-center relative ${
iconContainerClassName || 'bg-bg-border'
}`}
>
<Icon sizeClassName="w-3.5 h-3.5" />
{isWithCheckmark && (
<CheckmarkInSquareIcon
sizeClassName="w-4 h-4"
className="text-blue bg-bg-base absolute -bottom-1.5 -right-1.5 z-10"
/>
)}
</div>
<p className="flex-1 body-s-b ellipsis">{label}</p>
{!!shortcutKeys && (
<div className="flex items-center gap-1">
{shortcutKeys.map((k) => (
<div
key={k}
className={`min-w-5 h-5 px-1 flex-shrink-0 flex items-center justify-center rounded
border border-bg-border bg-bg-base shadow-low body-mini-b text-label-base`}
>
{k}
</div>
))}
</div>
)}
{customRightElement}
</button>
);
};
export default memo(CommandBarItem);
================================================
FILE: client/src/CommandBar/Body/Section.tsx
================================================
import { Dispatch, memo, SetStateAction } from 'react';
import {
CommandBarItemCustomType,
CommandBarItemGeneralType,
} from '../../types/general';
import SectionDivider from './SectionDivider';
import Item from './Item';
type Props = {
title?: string;
items: (CommandBarItemCustomType | CommandBarItemGeneralType)[];
disableKeyNav?: boolean;
index: string;
};
const CommandBarBodySection = ({
title,
items,
disableKeyNav,
index,
}: Props) => {
return (
<div className="flex flex-col select-none">
{!!title && <SectionDivider text={title} />}
{items.map(({ key, ...Rest }, i) =>
'Component' in Rest ? (
<Rest.Component
{...Rest.componentProps}
key={key}
isFirst={i === 0}
index={`${index}-${key}`}
disableKeyNav={disableKeyNav}
/>
) : (
<Item
key={key}
{...Rest}
index={`${index}-${key}`}
isFirst={i === 0}
disableKeyNav={disableKeyNav}
itemKey={key}
/>
),
)}
</div>
);
};
export default memo(CommandBarBodySection);
================================================
FILE: client/src/CommandBar/Body/SectionDivider.tsx
================================================
import { memo } from 'react';
type Props = {
text: string;
};
const SectionDivider = ({ text }: Props) => {
return (
<div className="flex items-center gap-1 px-2 py-1 body-mini-b text-label-muted">
{text}
</div>
);
};
export default memo(SectionDivider);
================================================
FILE: client/src/CommandBar/Body/index.tsx
================================================
import { memo, useEffect, useMemo } from 'react';
import { CommandBarSectionType } from '../../types/general';
import useKeyboardNavigation from '../../hooks/useKeyboardNavigation';
import { useArrowNavigation } from '../../hooks/useArrowNavigation';
import { ArrowNavigationContext } from '../../context/arrowNavigationContext';
import { noOp } from '../../utils';
import Section from './Section';
type Props = {
sections: CommandBarSectionType[];
disableKeyNav?: boolean;
onFocusedIndexChange?: (i: string) => void;
};
const CommandBarBody = ({
sections,
disableKeyNav,
onFocusedIndexChange,
}: Props) => {
const { focusedIndex, setFocusedIndex, handleArrowKey, navContainerRef } =
useArrowNavigation();
useEffect(() => {
if (sections?.[0]?.items?.[0]) {
setFocusedIndex(`${sections[0].key}-${sections[0].items[0].key}`);
}
}, [sections]);
useEffect(() => {
if (onFocusedIndexChange) {
onFocusedIndexChange(focusedIndex);
}
}, [focusedIndex]);
useKeyboardNavigation(handleArrowKey, disableKeyNav);
const contextValue = useMemo(
() => ({
focusedIndex,
setFocusedIndex,
handleClose: noOp,
}),
[focusedIndex],
);
return (
<div
className="flex flex-col gap-1 flex-1 w-full p-2 overflow-auto show-scrollbar"
ref={navContainerRef}
>
<ArrowNavigationContext.Provider value={contextValue}>
{sections.map((s) => (
<Section
key={s.key}
title={s.label}
items={s.items}
disableKeyNav={disableKeyNav}
index={s.key}
/>
))}
</ArrowNavigationContext.Provider>
</div>
);
};
export default memo(CommandBarBody);
================================================
FILE: client/src/CommandBar/Footer/HintButton.tsx
================================================
import { ForwardedRef, forwardRef, memo } from 'react';
import useShortcuts from '../../hooks/useShortcuts';
type Props = {
label: string;
shortcut?: string[];
};
const HintButton = forwardRef(
({ label, shortcut }: Props, ref: ForwardedRef<HTMLDivElement>) => {
const shortcutKeys = useShortcuts(shortcut);
return (
<div
className="inline-flex pl-2 py-1 pr-1 items-center gap-1 rounded-6 bg-bg-base body-mini-b text-label-muted text-center"
ref={ref}
>
{label}
{shortcutKeys?.map((k) => (
<div
key={k}
className="min-w-[1.25rem] h-5 px-1 flex items-center justify-center rounded bg-bg-base-hover"
>
{k}
</div>
))}
</div>
);
},
);
HintButton.displayName = 'HintButtonWithRef';
export default memo(HintButton);
================================================
FILE: client/src/CommandBar/Footer/index.tsx
================================================
import { memo, useCallback, useContext, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { CommandBarContext } from '../../context/commandBarContext';
import Dropdown from '../../components/Dropdown';
import useKeyboardNavigation from '../../hooks/useKeyboardNavigation';
import HintButton from './HintButton';
type Props = {
ActionsDropdown?: (props: any) => JSX.Element | null;
actionsDropdownProps?: Record<string, any>;
onDropdownVisibilityChange?: (isVisible: boolean) => void;
};
const CommandBarFooter = ({
ActionsDropdown,
actionsDropdownProps,
onDropdownVisibilityChange,
}: Props) => {
const { t } = useTranslation();
const { focusedItem } = useContext(CommandBarContext.FooterValues);
const actionsBtn = useRef<HTMLDivElement>(null);
const handleKeyEvent = useCallback((e: KeyboardEvent) => {
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
e.preventDefault();
e.stopPropagation();
actionsBtn.current?.click();
}
}, []);
useKeyboardNavigation(handleKeyEvent, !ActionsDropdown);
return (
<div className="flex items-center gap-1 w-full py-2.5 pl-4 pr-3 border-t border-bg-border">
<p className="text-label-base code-mini flex-1">
{focusedItem?.footerHint}
</p>
{focusedItem?.footerBtns?.map((b) => <HintButton key={b.label} {...b} />)}
{!!ActionsDropdown && (
<Dropdown
dropdownPlacement="top-end"
color="base"
DropdownComponent={ActionsDropdown}
dropdownComponentProps={actionsDropdownProps}
appendTo={document.body}
onVisibilityChange={onDropdownVisibilityChange}
>
<HintButton
shortcut={['cmd', 'K']}
label={t('Actions')}
ref={actionsBtn}
/>
</Dropdown>
)}
</div>
);
};
export default memo(CommandBarFooter);
================================================
FILE: client/src/CommandBar/Header/ChipItem.tsx
================================================
import { memo } from 'react';
type Props = { text: string };
const CommandBarChipItem = ({ text }: Props) => {
return (
<div className="flex px-1 gap-1 items-center rounded bg-bg-border code-mini text-label-base ellipsis">
{text}
</div>
);
};
export default memo(CommandBarChipItem);
================================================
FILE: client/src/CommandBar/Header/index.tsx
================================================
import {
ChangeEvent,
memo,
ReactElement,
useCallback,
useContext,
useState,
} from 'react';
import { useTranslation } from 'react-i18next';
import Tooltip from '../../components/Tooltip';
import useKeyboardNavigation from '../../hooks/useKeyboardNavigation';
import { CommandBarContext } from '../../context/commandBarContext';
import { CommandBarStepEnum } from '../../types/general';
import ChipItem from './ChipItem';
type PropsWithoutInput = {
noInput: true;
customSubmitHandler?: never;
onChange?: never;
value?: never;
placeholder?: never;
};
type PropsWithInput = {
noInput?: false;
value: string;
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
customSubmitHandler?: (value: string) => void;
placeholder?: string;
};
type GeneralProps = {
handleBack?: () => void;
breadcrumbs?: string[];
customRightComponent?: ReactElement;
disableKeyNav?: boolean;
};
type Props = GeneralProps & (PropsWithInput | PropsWithoutInput);
const CommandBarHeader = ({
handleBack,
breadcrumbs,
customRightComponent,
customSubmitHandler,
onChange,
value,
placeholder,
noInput,
disableKeyNav,
}: Props) => {
const { t } = useTranslation();
const { isVisible } = useContext(CommandBarContext.General);
const { setIsVisible, setChosenStep } = useContext(
CommandBarContext.Handlers,
);
const [isComposing, setIsComposing] = useState(false);
const onCompositionStart = useCallback(() => {
setIsComposing(true);
}, []);
const onCompositionEnd = useCallback(() => {
// this event comes before keydown and sets state faster causing unintentional submit
setTimeout(() => setIsComposing(false), 10);
}, []);
const handleKeyEvent = useCallback(
(e: KeyboardEvent) => {
if (
e.key === 'Escape' ||
(e.key === 'Backspace' && !value && !isComposing)
) {
e.stopPropagation();
e.preventDefault();
if (handleBack) {
handleBack();
} else {
setChosenStep({ id: CommandBarStepEnum.INITIAL });
setIsVisible(false);
}
} else if (e.key === 'Enter' && customSubmitHandler && !isComposing) {
e.stopPropagation();
e.preventDefault();
customSubmitHandler(value);
}
},
[setIsVisible, handleBack, customSubmitHandler, value, isComposing],
);
useKeyboardNavigation(handleKeyEvent, !isVisible || disableKeyNav);
return (
<div className="w-full flex flex-col p-4 items-start gap-4 border-b border-bg-border">
<div className="flex gap-1 items-center justify-between w-full select-none">
<div className="flex gap-1 items-center">
{!!handleBack && (
<Tooltip text={t('Back')} placement={'top'}>
<button
className="w-5 flex gap-1 items-center justify-center rounded border border-bg-border code-mini text-label-base ellipsis"
onClick={handleBack}
>
←
</button>
</Tooltip>
)}
{breadcrumbs?.map((b) => <ChipItem key={b} text={b} />)}
</div>
{customRightComponent}
</div>
{!noInput && (
<input
value={value}
onChange={onChange}
placeholder={placeholder || t('Search projects or commands...')}
type="search"
id="command-input"
autoComplete="off"
autoCorrect="off"
className="w-full bg-transparent outline-none focus:outline-0 body-base placeholder:text-label-muted"
autoFocus
onCompositionStart={onCompositionStart}
onCompositionEnd={onCompositionEnd}
disabled={disableKeyNav}
/>
)}
</div>
);
};
export default memo(CommandBarHeader);
================================================
FILE: client/src/CommandBar/Tutorial/TutorialBody.tsx
================================================
import React, { memo, useCallback, useContext } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { UIContext } from '../../context/uiContext';
type Props = {
stepNumber: number;
title: string;
description: string;
hint?: string;
};
const TutorialBody = ({ stepNumber, title, hint, description }: Props) => {
useTranslation();
const { setOnBoardingState } = useContext(UIContext.Onboarding);
const onSkip = useCallback(() => {
setOnBoardingState({
isCommandBarTutorialFinished: true,
isCodeNavigated: true,
isCodeExplained: true,
isChatOpened: true,
isFileExplained: true,
});
}, []);
return (
<span
className={`inline-flex items-center flex-shrink-0 z-60 relative`}
onClick={(e) => e.stopPropagation()}
>
<span className="flex flex-col p-3 gap-4 w-max max-w-[18.625rem] rounded-md bg-bg-contrast shadow-high text-label-contrast">
<span className="flex flex-col gap-1.5 items-end select-none">
<span className="flex gap-3 items-center w-full">
<span className="w-5 h-5 rounded flex items-center justify-center bg-bg-base code-tiny-b text-label-title">
{stepNumber}
</span>
<p className="text-label-contrast body-s-b flex-1">{title}</p>
<button
className="body-mini text-label-contrast/60"
onClick={onSkip}
>
<Trans>Skip</Trans>
</button>
</span>
<span className="pl-8 flex flex-col">
<span className="body-s">{description}</span>
{!!hint && (
<>
<br />
<span className="body-s-b">{hint}</span>
</>
)}
</span>
</span>
</span>
<span className="relative -left-px z-10">
<svg
xmlns="http://www.w3.org/2000/svg"
width="8"
height="16"
viewBox="0 0 8 16"
fill="none"
>
<path
d="M7.31833 6.50518C8.21336 7.30076 8.21336 8.69924 7.31833 9.49482L2.54292e-07 16L9.53674e-07 -3.93402e-07L7.31833 6.50518Z"
className="fill-bg-contrast"
/>
</svg>
</span>
</span>
);
};
export default memo(TutorialBody);
================================================
FILE: client/src/CommandBar/Tutorial/TutorialTooltip.tsx
================================================
import React, { memo, PropsWithChildren, useEffect, useState } from 'react';
import Tippy from '@tippyjs/react/headless';
type Props = {
content: React.ReactElement;
wrapperClassName?: string;
};
const TutorialTooltip = ({
children,
content,
wrapperClassName,
}: PropsWithChildren<Props>) => {
const [isVisible, setIsVisible] = useState(false);
useEffect(() => {
setTimeout(() => setIsVisible(true), 150);
}, []);
return (
<Tippy
animation={false}
visible={isVisible}
placement="left"
render={() => content}
interactive
>
<div className={wrapperClassName || 'flex flex-col w-full'}>
{children}
</div>
</Tippy>
);
};
export default memo(TutorialTooltip);
================================================
FILE: client/src/CommandBar/index.tsx
================================================
import { memo, useCallback, useContext, useMemo } from 'react';
import Modal from '../components/Modal';
import useKeyboardNavigation from '../hooks/useKeyboardNavigation';
import { CommandBarStepEnum } from '../types/general';
import { CommandBarContext } from '../context/commandBarContext';
import { useGlobalShortcuts } from '../hooks/useGlobalShortcuts';
import { checkEventKeys } from '../utils/keyboardUtils';
import { UIContext } from '../context/uiContext';
import Initial from './steps/Initial';
import PrivateRepos from './steps/PrivateRepos';
import PublicRepos from './steps/PublicRepos';
import LocalRepos from './steps/LocalRepos';
import Documentation from './steps/Documentation';
import CreateProject from './steps/CreateProject';
import ManageRepos from './steps/ManageRepos';
import AddNewRepo from './steps/AddNewRepo';
import ToggleTheme from './steps/ToggleTheme';
import SearchFiles from './steps/SeachFiles';
import AddFileToStudio from './steps/AddToStudio';
import SearchDocs from './steps/SeachDocs';
type Props = {};
const CommandBar = ({}: Props) => {
const { chosenStep } = useContext(CommandBarContext.CurrentStep);
const { isVisible } = useContext(CommandBarContext.General);
const { setChosenStep, setIsVisible } = useContext(
CommandBarContext.Handlers,
);
const { onBoardingState } = useContext(UIContext.Onboarding);
const globalShortcuts = useGlobalShortcuts();
const handleClose = useCallback(() => {
setIsVisible(false);
setChosenStep({
id: CommandBarStepEnum.INITIAL,
});
}, []);
const shouldShowTutorial = useMemo(() => {
return !onBoardingState.isCommandBarTutorialFinished;
}, [onBoardingState]);
const handleKeyEvent = useCallback(
(e: KeyboardEvent) => {
if (checkEventKeys(e, ['cmd', 'K'])) {
e.stopPropagation();
e.preventDefault();
setIsVisible(true);
}
Object.values(globalShortcuts).forEach((s) => {
if (checkEventKeys(e, s.shortcut)) {
e.stopPropagation();
e.preventDefault();
s.action();
}
});
},
[isVisible, globalShortcuts],
);
useKeyboardNavigation(handleKeyEvent);
return (
<Modal
isVisible={isVisible}
onClose={handleClose}
noBg
containerClassName={
'h-[28.875rem] !z-90 bg-bg-base border border-bg-border backdrop-blur-8 shadow-float'
}
>
{chosenStep.id === CommandBarStepEnum.INITIAL ? (
<Initial shouldShowTutorial={shouldShowTutorial} />
) : chosenStep.id === CommandBarStepEnum.PRIVATE_REPOS ? (
<PrivateRepos shouldShowTutorial={shouldShowTutorial} />
) : chosenStep.id === CommandBarStepEnum.PUBLIC_REPOS ? (
<PublicRepos />
) : chosenStep.id === CommandBarStepEnum.LOCAL_REPOS ? (
<LocalRepos />
) : chosenStep.id === CommandBarStepEnum.DOCS ? (
<Documentation />
) : chosenStep.id === CommandBarStepEnum.CREATE_PROJECT ? (
<CreateProject />
) : chosenStep.id === CommandBarStepEnum.MANAGE_REPOS ? (
<ManageRepos shouldShowTutorial={shouldShowTutorial} />
) : chosenStep.id === CommandBarStepEnum.ADD_NEW_REPO ? (
<AddNewRepo shouldShowTutorial={shouldShowTutorial} />
) : chosenStep.id === CommandBarStepEnum.TOGGLE_THEME ? (
<ToggleTheme />
) : chosenStep.id === CommandBarStepEnum.SEARCH_FILES ? (
<SearchFiles {...(chosenStep.data || {})} />
) : chosenStep.id === CommandBarStepEnum.SEARCH_DOCS ? (
<SearchDocs {...chosenStep.data} />
) : chosenStep.id === CommandBarStepEnum.ADD_TO_STUDIO ? (
<AddFileToStudio {...chosenStep.data} />
) : null}
</Modal>
);
};
export default memo(CommandBar);
================================================
FILE: client/src/CommandBar/steps/AddNewRepo.tsx
================================================
import React, { memo, useCallback, useContext, useMemo } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { toast } from 'sonner';
import { useGlobalShortcuts } from '../../hooks/useGlobalShortcuts';
import {
CommandBarItemGeneralType,
CommandBarStepEnum,
} from '../../types/general';
import { GlobeIcon, HardDriveIcon, RepositoryIcon } from '../../icons';
import Header from '../Header';
import Body from '../Body';
import Footer from '../Footer';
import { CommandBarContext } from '../../context/commandBarContext';
import { DeviceContext } from '../../context/deviceContext';
import { scanLocalRepos, syncRepo } from '../../services/api';
import SpinLoaderContainer from '../../components/Loaders/SpinnerLoader';
import TutorialBody from '../Tutorial/TutorialBody';
import TutorialTooltip from '../Tutorial/TutorialTooltip';
import { tutorialSteps } from '../../consts/tutorialSteps';
type Props = {
shouldShowTutorial?: boolean;
};
const AddNewRepo = ({ shouldShowTutorial }: Props) => {
const { t } = useTranslation();
const globalShortcuts = useGlobalShortcuts();
const { setChosenStep } = useContext(CommandBarContext.Handlers);
const { homeDir, chooseFolder } = useContext(DeviceContext);
const handleBack = useCallback(() => {
setChosenStep({ id: CommandBarStepEnum.MANAGE_REPOS });
}, []);
const handleChooseFolder = useCallback(async () => {
let folder: string | string[] | null;
if (chooseFolder) {
try {
folder = await chooseFolder({
directory: true,
defaultPath: homeDir,
});
} catch (err) {
console.log(err);
}
}
// @ts-ignore
if (typeof folder === 'string') {
scanLocalRepos(folder).then((data) => {
if (data.list.length === 1) {
syncRepo(data.list[0].ref);
toast(t('Indexing repository'), {
description: (
<Trans values={{ repoName: data.list[0].name }}>
<span className="text-label-base body-s-b">repoName</span> has
started indexing. You’ll receive a notification as soon as this
process completes.
</Trans>
),
icon: <SpinLoaderContainer sizeClassName="w-4 h-4" />,
unstyled: true,
});
handleBack();
return;
} else if (!data.list.length) {
toast.error(t('Not a git repository'), {
description: t('The folder you selected is not a git repository.'),
icon: <HardDriveIcon sizeClassName="w-4 h-4" />,
unstyled: true,
});
} else if (data.list.length > 1) {
toast.error(t('Folder too large'), {
description: t(
'The folder you selected has multiple git repositories nested inside.',
),
icon: <HardDriveIcon sizeClassName="w-4 h-4" />,
unstyled: true,
});
}
});
}
}, [chooseFolder, homeDir, handleBack]);
const initialSections = useMemo(() => {
const contextItems: CommandBarItemGeneralType[] = [
{
label: t('Private repository'),
Icon: RepositoryIcon,
id: CommandBarStepEnum.PRIVATE_REPOS,
key: 'private',
shortcut: globalShortcuts.openPrivateRepos.shortcut,
footerHint: '',
footerBtns: [{ label: t('Next'), shortcut: ['entr'] }],
},
{
label: t('Public repository'),
Icon: GlobeIcon,
id: CommandBarStepEnum.PUBLIC_REPOS,
key: 'public',
shortcut: globalShortcuts.openPublicRepos.shortcut,
footerHint: '',
footerBtns: [{ label: t('Next'), shortcut: ['entr'] }],
},
{
label: t('Local repository'),
Icon: HardDriveIcon,
id: CommandBarStepEnum.LOCAL_REPOS,
onClick: handleChooseFolder,
key: 'local',
shortcut: globalShortcuts.openLocalRepos.shortcut,
footerHint: '',
footerBtns: [{ label: t('Next'), shortcut: ['entr'] }],
},
];
return [
{
items: contextItems,
itemsOffset: 0,
key: 'context-items',
},
];
}, [t, globalShortcuts]);
return (
<div className="flex flex-col h-[28.875rem] w-[40rem] overflow-auto">
<Header
breadcrumbs={[t('Add repository')]}
noInput
handleBack={handleBack}
/>
{shouldShowTutorial ? (
<TutorialTooltip
content={
<TutorialBody
stepNumber={2}
title={t(tutorialSteps[1].title)}
description={t(tutorialSteps[1].description)}
hint={t(tutorialSteps[1].hint[0])}
/>
}
wrapperClassName="absolute top-[5rem] left-0 right-0"
>
<div className="" />
</TutorialTooltip>
) : null}
<Body sections={initialSections} />
<Footer />
</div>
);
};
export default memo(AddNewRepo);
================================================
FILE: client/src/CommandBar/steps/AddToStudio.tsx
================================================
import {
ChangeEvent,
memo,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from 'react';
import { useTranslation } from 'react-i18next';
import {
AddDocToStudioDataType,
AddFileToStudioDataType,
CommandBarItemGeneralType,
CommandBarSectionType,
CommandBarStepEnum,
TabTypesEnum,
} from '../../types/general';
import { PlusSignIcon } from '../../icons';
import Header from '../Header';
import Body from '../Body';
import Footer from '../Footer';
import { CommandBarContext } from '../../context/commandBarContext';
import { ProjectContext } from '../../context/projectContext';
import { TabsContext } from '../../context/tabsContext';
import { postCodeStudio } from '../../services/api';
import TokenUsage from '../../components/TokenUsage';
import { TOKEN_LIMIT } from '../../consts/codeStudio';
type Props = (AddFileToStudioDataType | AddDocToStudioDataType) & {};
const AddToStudio = (props: Props) => {
const { t } = useTranslation();
const { setChosenStep } = useContext(CommandBarContext.Handlers);
const { project, refreshCurrentProjectStudios } = useContext(
ProjectContext.Current,
);
const { openNewTab } = useContext(TabsContext.Handlers);
const [inputValue, setInputValue] = useState('');
const [sectionsToShow, setSectionsToShow] = useState<CommandBarSectionType[]>(
[],
);
const handleChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
setInputValue(e.target.value);
}, []);
const handleBack = useCallback(() => {
setChosenStep({ id: CommandBarStepEnum.INITIAL });
}, []);
const handleNewCodeStudio = useCallback(async () => {
if (project?.id) {
const newId = await postCodeStudio(project.id);
refreshCurrentProjectStudios();
if ('path' in props) {
openNewTab(
{
type: TabTypesEnum.FILE,
studioId: newId,
...props,
},
'left',
);
} else {
openNewTab(
{
type: TabTypesEnum.DOC,
studioId: newId,
...props,
},
'left',
);
}
openNewTab({ type: TabTypesEnum.STUDIO, studioId: newId }, 'right');
}
}, [project?.id, props, openNewTab, refreshCurrentProjectStudios]);
const handleAddToCodeStudio = useCallback(
async (studioId: string) => {
if (project?.id) {
if ('path' in props) {
openNewTab(
{
type: TabTypesEnum.FILE,
studioId,
...props,
},
'left',
);
} else {
openNewTab(
{
type: TabTypesEnum.DOC,
studioId,
...props,
},
'left',
);
}
openNewTab({ type: TabTypesEnum.STUDIO, studioId }, 'right');
}
},
[project?.id, props, openNewTab],
);
const initialSections = useMemo(() => {
return [
{
items: [
{
label: t('New studio conversation'),
Icon: PlusSignIcon,
id: 'new_code_studio',
key: 'new_code_studio',
onClick: handleNewCodeStudio,
closeOnClick: true,
footerHint: '',
footerBtns: [{ label: t('Create new'), shortcut: ['entr'] }],
},
],
itemsOffset: 0,
key: 'new-items',
},
{
items: (project?.studios || []).map((s) => ({
label: s.name,
Icon: () => (
<TokenUsage
percent={(s.token_counts.total / TOKEN_LIMIT) * 100}
sizeClassName={'w-6 h-6'}
/>
),
iconContainerClassName: 'bg-transparent',
id: s.id,
key: s.id,
onClick: () => handleAddToCodeStudio(s.id),
closeOnClick: true,
footerHint: t('{{count}} context files used', {
count: s.context.length,
}),
footerBtns: [{ label: t('Add to existing'), shortcut: ['entr'] }],
})),
label: t('Existing studio conversations'),
itemsOffset: 1,
key: 'studio-items',
},
];
}, [t, project?.studios, handleNewCodeStudio, openNewTab, props]);
useEffect(() => {
if (!inputValue) {
setSectionsToShow(initialSections);
return;
}
const newSectionsToShow: CommandBarSectionType[] = [];
initialSections.forEach((s) => {
const items = (s.items as CommandBarItemGeneralType[]).filter((item) => {
return item.label?.toLowerCase().includes(inputValue?.toLowerCase());
});
if (items.length) {
newSectionsToShow.push({
...s,
items,
});
}
});
setSectionsToShow(newSectionsToShow);
}, [initialSections, inputValue]);
const breadcrumbs = useMemo(() => {
return [t(`Add ${'path' in props ? 'file' : 'doc'} to studio`)];
}, [props, t]);
return (
<div className="flex flex-col h-[28.875rem] w-[40rem] overflow-auto">
<Header
value={inputValue}
onChange={handleChange}
breadcrumbs={breadcrumbs}
handleBack={handleBack}
placeholder={t('Search studio conversations...')}
/>
<Body sections={sectionsToShow} />
<Footer />
</div>
);
};
export default memo(AddToStudio);
================================================
FILE: client/src/CommandBar/steps/CreateProject.tsx
================================================
import {
ChangeEvent,
memo,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from 'react';
import { useTranslation } from 'react-i18next';
import Header from '../Header';
import Footer from '../Footer';
import { CommandBarStepEnum } from '../../types/general';
import { CommandBarContext } from '../../context/commandBarContext';
import { createProject } from '../../services/api';
import { ProjectContext } from '../../context/projectContext';
type Props = {};
const CreateProject = ({}: Props) => {
const { t } = useTranslation();
const [inputValue, setInputValue] = useState('');
const { setChosenStep, setFocusedItem, setIsVisible } = useContext(
CommandBarContext.Handlers,
);
const { setCurrentProjectId } = useContext(ProjectContext.Current);
const { refreshAllProjects } = useContext(ProjectContext.All);
const handleInputChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
setInputValue(e.target.value);
}, []);
useEffect(() => {
setFocusedItem({
footerHint: t('Provide a short, concise title for your project'),
footerBtns: [{ label: t('Create project'), shortcut: ['entr'] }],
});
}, [t]);
const switchProject = useCallback((id: string) => {
setCurrentProjectId(id);
setIsVisible(false);
refreshAllProjects();
setChosenStep({
id: CommandBarStepEnum.INITIAL,
});
}, []);
const breadcrumbs = useMemo(() => {
return [t('Create project')];
}, [t]);
const handleBack = useCallback(() => {
setChosenStep({ id: CommandBarStepEnum.INITIAL });
}, []);
const submitHandler = useCallback(
async (value: string) => {
setInputValue('');
const newId = await createProject(value);
switchProject(newId);
},
[switchProject],
);
return (
<div className="flex flex-col h-[28.875rem] w-[40rem] overflow-auto">
<Header
breadcrumbs={breadcrumbs}
handleBack={handleBack}
customSubmitHandler={submitHandler}
placeholder={t('Untitled project')}
value={inputValue}
onChange={handleInputChange}
/>
<div className="flex-1" />
<Footer />
</div>
);
};
export default memo(CreateProject);
================================================
FILE: client/src/CommandBar/steps/Documentation/ActionsDropdown.tsx
================================================
import { memo, useContext, useEffect, useMemo } from 'react';
import SectionItem from '../../../components/Dropdown/Section/SectionItem';
import DropdownSection from '../../../components/Dropdown/Section';
import { CommandBarContext } from '../../../context/commandBarContext';
type Props = {
handleClose: () => void;
};
const ActionsDropDown = ({ handleClose }: Props) => {
const { focusedItem } = useContext(CommandBarContext.FooterValues);
const focusedDropdownItems = useMemo(() => {
return (
(focusedItem &&
'focusedItemProps' in focusedItem &&
focusedItem.focusedItemProps?.dropdownItems) ||
[]
);
}, [focusedItem]);
const focusedDropdownItemsLength = useMemo(() => {
return focusedDropdownItems.reduce(
(prev: number, curr: { items: Record<string, any>[]; key: string }) =>
prev + curr.items.length,
0,
);
}, [focusedDropdownItems]);
useEffect(() => {
if (!focusedDropdownItemsLength) {
handleClose();
}
}, [focusedDropdownItemsLength]);
return (
<div>
{!!focusedDropdownItems.length &&
focusedDropdownItems.map(
(section: { items: Record<string, any>[]; key: string }) => (
<DropdownSection key={section.key}>
{section.items.map((item: Record<string, any>) => (
<SectionItem
color="base"
shortcut={item.shortcut}
key={item.key}
onClick={item.onClick}
label={item.label}
icon={item.icon}
index={item.key}
/>
))}
</DropdownSection>
),
)}
</div>
);
};
export default memo(ActionsDropDown);
================================================
FILE: client/src/CommandBar/steps/Documentation/index.tsx
================================================
import {
ChangeEvent,
memo,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from 'react';
import { useTranslation } from 'react-i18next';
import {
CommandBarSectionType,
CommandBarStepEnum,
} from '../../../types/general';
import { CommandBarContext } from '../../../context/commandBarContext';
import {
getIndexedDocs,
indexDocsUrl,
verifyDocsUrl,
} from '../../../services/api';
import { PlusSignIcon } from '../../../icons';
import { DocShortType } from '../../../types/api';
import Header from '../../Header';
import Body from '../../Body';
import Footer from '../../Footer';
import DocItem from '../items/DocItem';
import ActionsDropdown from './ActionsDropdown';
type Props = {};
const Documentation = ({}: Props) => {
const { t } = useTranslation();
const [isAddMode, setIsAddMode] = useState(false);
const [hasFetched, setHasFetched] = useState(false);
const [indexedDocs, setIndexedDocs] = useState<DocShortType[]>([]);
const [addedDoc, setAddedDoc] = useState<null | { id: string; url: string }>(
null,
);
const [isDropdownVisible, setIsDropdownVisible] = useState(false);
const { setChosenStep, setFocusedItem } = useContext(
CommandBarContext.Handlers,
);
const [inputValue, setInputValue] = useState('');
const handleInputChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
setInputValue(e.target.value);
}, []);
const enterAddMode = useCallback(() => {
setFocusedItem({
footerHint: t('Paste a link to any documentation web page'),
footerBtns: [{ label: t('Sync'), shortcut: ['entr'] }],
});
setIsAddMode(true);
}, []);
const addItem = useMemo(() => {
return {
itemsOffset: 0,
key: 'add-docs',
items: [
{
label: t('Add documentation'),
Icon: PlusSignIcon,
footerHint: t('Add any library documentation'),
footerBtns: [
{
label: t('Add'),
shortcut: ['entr'],
},
],
key: 'add',
id: 'Add',
onClick: enterAddMode,
},
],
};
}, [t]);
const [sections, setSections] = useState<CommandBarSectionType[]>([addItem]);
const breadcrumbs = useMemo(() => {
const arr = [t('Docs')];
if (isAddMode) {
arr.push(t('Add docs'));
}
return arr;
}, [t, isAddMode]);
const handleBack = useCallback(() => {
if (isAddMode) {
setIsAddMode(false);
} else {
setChosenStep({ id: CommandBarStepEnum.INITIAL });
}
}, [isAddMode]);
const refetchDocs = useCallback(() => {
getIndexedDocs().then((data) => {
setIndexedDocs(data);
setHasFetched(true);
if (addedDoc && data.find((d) => d.id === addedDoc.id)) {
setAddedDoc(null);
}
});
}, [addedDoc]);
useEffect(() => {
const mapped = indexedDocs.map((d) => ({
Component: DocItem,
componentProps: {
doc: d,
isIndexed: d.index_status === 'done',
refetchDocs,
},
key: d.id,
}));
if (addedDoc) {
mapped.unshift({
Component: DocItem,
componentProps: {
doc: {
url: addedDoc.url,
id: addedDoc.id,
name: '',
favicon: '',
index_status: 'indexing',
},
isIndexed: false,
refetchDocs: () => {
refetchDocs();
setAddedDoc(null);
},
},
key: `doc-${addedDoc.id}`,
});
}
setSections([
addItem,
{
key: 'indexed-docs',
label: t('Indexed documentation web pages'),
items: mapped,
},
]);
}, [indexedDocs, addedDoc, hasFetched, refetchDocs]);
useEffect(() => {
if (!isAddMode || !hasFetched) {
refetchDocs();
}
}, [isAddMode]);
const handleAddSubmit = useCallback(async (inputValue: string) => {
setFocusedItem({
footerHint: t('Verifying access...'),
footerBtns: [],
});
setInputValue('');
try {
await verifyDocsUrl(inputValue.trim());
setIsAddMode(false);
const newId = await indexDocsUrl(inputValue);
setAddedDoc({ id: newId, url: inputValue });
} catch (err) {
setFocusedItem({
footerHint: t(
"We couldn't find any docs at that link. Try again or make sure the link is correct!",
),
footerBtns: [],
});
}
}, []);
const sectionsToShow = useMemo(() => {
if (!inputValue) {
return sections;
}
const newSections: CommandBarSectionType[] = [];
sections.forEach((s) => {
const newItems = s.items.filter(
(i) =>
('label' in i ? i.label : i.componentProps.doc.name)
?.toLowerCase()
.includes(inputValue?.toLowerCase()),
);
if (newItems.length) {
newSections.push({ ...s, items: newItems });
}
});
return newSections;
}, [inputValue, sections]);
return (
<div className="flex flex-col h-[28.875rem] w-[40rem] overflow-auto">
<Header
breadcrumbs={breadcrumbs}
handleBack={handleBack}
customSubmitHandler={isAddMode ? handleAddSubmit : undefined}
placeholder={
isAddMode ? t('Documentation URL...') : t('Search docs...')
}
onChange={handleInputChange}
value={inputValue}
disableKeyNav={!isAddMode && isDropdownVisible}
/>
{isAddMode ? (
<div className="flex-1" />
) : (
<Body
sections={sectionsToShow}
disableKeyNav={!isAddMode && isDropdownVisible}
/>
)}
<Footer
onDropdownVisibilityChange={setIsDropdownVisible}
ActionsDropdown={isAddMode ? undefined : ActionsDropdown}
/>
</div>
);
};
export default memo(Documentation);
================================================
FILE: client/src/CommandBar/steps/Initial.tsx
================================================
import React, {
ChangeEvent,
memo,
useCallback,
useContext,
useMemo,
useState,
} from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { ProjectContext } from '../../context/projectContext';
import {
BugIcon,
ChatBubblesIcon,
CloseSignInCircleIcon,
CodeStudioIcon,
CogIcon,
ColorSwitchIcon,
DocumentsIcon,
MagazineIcon,
MagnifyToolIcon,
PlusSignIcon,
RegexIcon,
RepositoryIcon,
} from '../../icons';
import { CommandBarContext } from '../../context/commandBarContext';
import Header from '../Header';
import Body from '../Body';
import Footer from '../Footer';
import {
CommandBarItemGeneralType,
CommandBarSectionType,
CommandBarStepEnum,
TabTypesEnum,
} from '../../types/general';
import { UIContext } from '../../context/uiContext';
import { useGlobalShortcuts } from '../../hooks/useGlobalShortcuts';
import {
getJsonFromStorage,
RECENT_COMMANDS_KEY,
} from '../../services/storage';
import { bubbleUpRecentItems } from '../../utils/commandBarUtils';
import { TabsContext } from '../../context/tabsContext';
import TutorialBody from '../Tutorial/TutorialBody';
import TutorialTooltip from '../Tutorial/TutorialTooltip';
import { tutorialSteps } from '../../consts/tutorialSteps';
import {
closeTabShortcut,
newChatTabShortcut,
newStudioTabShortcut,
} from '../../consts/shortcuts';
import { postCodeStudio } from '../../services/api';
type Props = {
shouldShowTutorial?: boolean;
};
const InitialCommandBar = ({ shouldShowTutorial }: Props) => {
const { t } = useTranslation();
const { setIsVisible } = useContext(CommandBarContext.Handlers);
const { tabItems } = useContext(CommandBarContext.FocusedTab);
const { openNewTab, closeCurrentTab } = useContext(TabsContext.Handlers);
const { tab: leftTab } = useContext(TabsContext.CurrentLeft);
const { tab: rightTab } = useContext(TabsContext.CurrentRight);
const { projects } = useContext(ProjectContext.All);
const { setCurrentProjectId, project } = useContext(ProjectContext.Current);
const { theme } = useContext(UIContext.Theme);
const [inputValue, setInputValue] = useState('');
const globalShortcuts = useGlobalShortcuts();
const handleInputChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
setInputValue(e.target.value);
}, []);
const switchProject = useCallback((id: string) => {
setCurrentProjectId(id);
setIsVisible(false);
}, []);
const initialSections = useMemo(() => {
const recentKeys = getJsonFromStorage<string[]>(RECENT_COMMANDS_KEY);
const contextItems: CommandBarItemGeneralType[] = [
{
label: t('Add new repository'),
Icon: PlusSignIcon,
id: CommandBarStepEnum.ADD_NEW_REPO,
key: CommandBarStepEnum.ADD_NEW_REPO,
shortcut: ['cmd', 'A'],
footerHint: '',
footerBtns: [
{
label: t('Add'),
shortcut: ['entr'],
},
],
},
{
label: t('Manage repositories'),
Icon: RepositoryIcon,
id: CommandBarStepEnum.MANAGE_REPOS,
key: CommandBarStepEnum.MANAGE_REPOS,
shortcut: globalShortcuts.openManageRepos.shortcut,
footerHint: '',
footerBtns: [{ label: t('Manage'), shortcut: ['entr'] }],
},
{
label: t('Manage docs'),
Icon: MagazineIcon,
id: CommandBarStepEnum.DOCS,
key: CommandBarStepEnum.DOCS,
shortcut: globalShortcuts.openAddDocs.shortcut,
footerHint: '',
footerBtns: [{ label: t('Manage'), shortcut: ['entr'] }],
},
];
const projectItems: CommandBarItemGeneralType[] = projects
.map(
(p): CommandBarItemGeneralType => ({
label: p.name,
Icon: MagazineIcon,
id: `project-${p.id}`,
key: `project-${p.id}`,
onClick: () => switchProject(p.id),
footerHint:
project?.id === p.id
? t('Manage project')
: t(`Switch to`) + ' ' + p.name,
footerBtns:
project?.id === p.id
? [{ label: t('Manage'), shortcut: ['entr'] }]
: [
{
label: t('Open'),
shortcut: ['entr'],
},
],
}),
)
.concat({
label: t('New project'),
Icon: MagazineIcon,
id: CommandBarStepEnum.CREATE_PROJECT,
key: CommandBarStepEnum.CREATE_PROJECT,
shortcut: globalShortcuts.createNewProject.shortcut,
footerHint: t('Create new project'),
footerBtns: [
{
label: t('Manage'),
shortcut: ['entr'],
},
],
});
const themeItems: CommandBarItemGeneralType[] = [
{
label: t(`Theme`),
Icon: ColorSwitchIcon,
id: CommandBarStepEnum.TOGGLE_THEME,
key: CommandBarStepEnum.TOGGLE_THEME,
shortcut: globalShortcuts.toggleTheme.shortcut,
footerHint: t(`Change application colour theme`),
footerBtns: [
{
label: t('Select'),
shortcut: ['entr'],
},
],
},
];
const otherCommands: CommandBarItemGeneralType[] = [
...(!!leftTab || !!rightTab
? [
{
label: t(`Close current tab`),
Icon: CloseSignInCircleIcon,
id: `close-tab`,
key: `close-tab`,
onClick: closeCurrentTab,
shortcut: closeTabShortcut,
closeOnClick: true,
footerHint: t(`Close currently focused tab`),
footerBtns: [
{
label: t('Close'),
shortcut: ['entr'],
},
],
},
{
label: t(`Close all tabs`),
Icon: CloseSignInCircleIcon,
id: `close-tabs`,
key: `close-tabs`,
onClick: globalShortcuts.closeAllTabs.action,
shortcut: globalShortcuts.closeAllTabs.shortcut,
closeOnClick: true,
footerHint: t(`Close all open tabs`),
footerBtns: [
{
label: t('Close'),
shortcut: ['entr'],
},
],
},
]
: []),
{
label: t(`Account settings`),
Icon: CogIcon,
id: `account-settings`,
key: `account-settings`,
onClick: globalShortcuts.openSettings.action,
shortcut: globalShortcuts.openSettings.shortcut,
footerHint: t(`Open account settings`),
footerBtns: [
{
label: t('Open'),
shortcut: ['entr'],
},
],
},
{
label: t(`Documentation`),
Icon: DocumentsIcon,
id: `app-docs`,
key: `app-docs`,
onClick: globalShortcuts.openAppDocs.action,
shortcut: globalShortcuts.openAppDocs.shortcut,
footerHint: t(`View bloop app documentation on our website`),
footerBtns: [
{
label: t('Open'),
shortcut: ['entr'],
},
],
},
{
label: t(`Report a bug`),
Icon: BugIcon,
id: `bug`,
key: `bug`,
onClick: globalShortcuts.reportABug.action,
shortcut: globalShortcuts.reportABug.shortcut,
footerHint: t(`Report a bug`),
footerBtns: [
{
label: t('Open'),
shortcut: ['entr'],
},
],
},
{
label: t(`Code search`),
Icon: RegexIcon,
id: `toggle-regex`,
key: `toggle-regex`,
onClick: globalShortcuts.toggleRegex.action,
shortcut: globalShortcuts.toggleRegex.shortcut,
footerHint: t(`Search your repositories using RegExp`),
footerBtns: [
{
label: t('Toggle'),
shortcut: ['entr'],
},
],
},
{
label: t(`File search`),
Icon: MagnifyToolIcon,
id: CommandBarStepEnum.SEARCH_FILES,
key: CommandBarStepEnum.SEARCH_FILES,
shortcut: globalShortcuts.openSearchFiles.shortcut,
footerHint: t(`Search your files in this project`),
footerBtns: [
{
label: t('Search'),
shortcut: ['entr'],
},
],
},
];
const commandsItems = [...themeItems, ...otherCommands];
const newTabItems = project?.repos.length
? [
{
label: t('New conversation'),
Icon: ChatBubblesIcon,
id: 'new chat',
key: 'new_chat',
onClick: () => openNewTab({ type: TabTypesEnum.CHAT }),
shortcut: newChatTabShortcut,
closeOnClick: true,
footerHint: '',
footerBtns: [
{
label: t('Open'),
shortcut: ['entr'],
},
],
},
{
label: t('New studio conversation'),
Icon: CodeStudioIcon,
id: 'new studio',
key: 'new_studio',
onClick: async () => {
const newId = await postCodeStudio(project.id);
openNewTab({ type: TabTypesEnum.STUDIO, studioId: newId });
},
shortcut: newStudioTabShortcut,
closeOnClick: true,
footerHint: '',
footerBtns: [
{
label: t('Open'),
shortcut: ['entr'],
},
],
},
]
: [];
const chatItems: CommandBarItemGeneralType[] = (
project?.conversations || []
)
.slice(-5)
.map((c) => ({
label: c.title,
id: `chat-${c.id}`,
key: `chat-${c.id}`,
Icon: ChatBubblesIcon,
closeOnClick: true,
onClick: () => {
openNewTab({
type: TabTypesEnum.CHAT,
title: c.title,
conversationId: c.id,
});
},
footerHint: '',
footerBtns: [{ label: t('Open'), shortcut: ['entr'] }],
}));
return bubbleUpRecentItems(
[
...(newTabItems.length
? [
{
items: newTabItems,
key: 'new-tab-items',
},
]
: []),
...(tabItems.length
? [
{
items: tabItems,
key: 'tab-items',
},
]
: []),
...(chatItems.length
? [
{
label: t('Recent conversations'),
items: chatItems,
key: 'chat-items',
},
]
: []),
{
items: contextItems,
label: t('Manage context'),
key: 'context-items',
},
{
items: projectItems,
label: t('Recent projects'),
key: 'recent-projects',
},
{
items: commandsItems,
label: t('Commands'),
key: 'general-commands',
},
],
recentKeys || [],
t('Recently used'),
);
}, [
t,
projects,
project,
theme,
globalShortcuts,
tabItems,
openNewTab,
shouldShowTutorial,
closeCurrentTab,
!!leftTab || !!rightTab,
]);
const sectionsToShow = useMemo(() => {
if (!inputValue) {
return initialSections;
}
const newSections: CommandBarSectionType[] = [];
initialSections.forEach((s) => {
const newItems = (s.items as CommandBarItemGeneralType[]).filter(
(i) => i.label?.toLowerCase().includes(inputValue?.toLowerCase()),
);
if (newItems.length) {
newSections.push({
...s,
items: newItems,
});
}
});
return newSections;
}, [inputValue, initialSections]);
return (
<div className="flex flex-col h-[28.875rem] w-[40rem] overflow-auto">
<Header
breadcrumbs={[project?.name || 'Default project']}
value={inputValue}
onChange={handleInputChange}
/>
{shouldShowTutorial ? (
<TutorialTooltip
content={
<TutorialBody
stepNumber={1}
title={t(tutorialSteps[0].title)}
description={t(tutorialSteps[0].description)}
hint={
t(tutorialSteps[0].hint[0]) + t(tutorialSteps[0].hint[1]) + '.'
}
/>
}
wrapperClassName="absolute top-[8.5rem] left-0 right-0"
>
<div className="" />
</TutorialTooltip>
) : null}
{!!sectionsToShow.length ? (
<Body sections={sectionsToShow} />
) : (
<div className="flex-1 items-center justify-center text-label-muted text-center py-2">
<Trans>No commands found...</Trans>
</div>
)}
<Footer />
</div>
);
};
export default memo(InitialCommandBar);
================================================
FILE: client/src/CommandBar/steps/LocalRepos.tsx
================================================
import {
ChangeEvent,
memo,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from 'react';
import { useTranslation } from 'react-i18next';
import { CommandBarContext } from '../../context/commandBarContext';
import { PlusSignIcon } from '../../icons';
import {
CommandBarSectionType,
CommandBarStepEnum,
RepoProvider,
} from '../../types/general';
import { getIndexedRepos, scanLocalRepos, syncRepo } from '../../services/api';
import { DeviceContext } from '../../context/deviceContext';
import Footer from '../Footer';
import Body from '../Body';
import Header from '../Header';
import RepoItem from './items/RepoItem';
type Props = {};
const LocalRepos = ({}: Props) => {
const { t } = useTranslation();
const [chosenFolder, setChosenFolder] = useState<string | null>(null);
const [inputValue, setInputValue] = useState('');
const { homeDir, chooseFolder } = useContext(DeviceContext);
const { setChosenStep, setFocusedItem } = useContext(
CommandBarContext.Handlers,
);
const handleInputChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
setInputValue(e.target.value);
}, []);
const handleChooseFolder = useCallback(async () => {
let folder: string | string[] | null;
if (chooseFolder) {
try {
folder = await chooseFolder({
directory: true,
defaultPath: homeDir,
});
} catch (err) {
console.log(err);
}
}
// @ts-ignore
if (typeof folder === 'string') {
setChosenFolder(folder);
}
}, [chooseFolder, homeDir]);
const enterAddMode = useCallback(async () => {
setFocusedItem({
footerHint: t('Select a folder containing a git repository'),
footerBtns: [{ label: t('Start indexing'), shortcut: ['entr'] }],
});
await handleChooseFolder();
}, []);
useEffect(() => {
if (chosenFolder) {
scanLocalRepos(chosenFolder).then((data) => {
if (data.list.length === 1) {
syncRepo(data.list[0].ref);
refetchRepos();
return;
}
});
}
}, [chosenFolder]);
const addItem = useMemo(() => {
return {
itemsOffset: 0,
key: 'add',
items: [
{
label: t('Add local repository'),
Icon: PlusSignIcon,
footerHint: t('Add a repository from your local machine'),
footerBtns: [
{
label: t('Select folder'),
shortcut: ['entr'],
},
],
key: 'add',
id: 'Add',
onClick: enterAddMode,
},
],
};
}, []);
const [sections, setSections] = useState<CommandBarSectionType[]>([addItem]);
const breadcrumbs = useMemo(() => {
return [t('Local repositories')];
}, [t]);
const handleBack = useCallback(() => {
setChosenStep({ id: CommandBarStepEnum.INITIAL });
}, []);
const refetchRepos = useCallback(() => {
getIndexedRepos().then((data) => {
const mapped = data.list
.filter((r) => r.provider === RepoProvider.Local)
.map((r) => ({
Component: RepoItem,
componentProps: { repo: { ...r, shortName: r.name }, refetchRepos },
key: r.ref,
}));
if (!mapped.length) {
enterAddMode();
}
setSections([
addItem,
{
key: 'indexed-repos',
label: t('Indexed local repositories'),
items: mapped,
},
]);
});
}, []);
useEffect(() => {
refetchRepos();
}, []);
const sectionsToShow = useMemo(() => {
if (!inputValue) {
return sections;
}
const newSections: CommandBarSectionType[] = [];
sections.forEach((s) => {
const newItems = s.items.filter(
(i) =>
('label' in i ? i.label : i.componentProps.repo.shortName)
?.toLowerCase()
.includes(inputValue?.toLowerCase()),
);
if (newItems.length) {
newSections.push({ ...s, items: newItems });
}
});
return newSections;
}, [inputValue, sections]);
return (
<div className="flex flex-col h-[28.875rem] w-[40rem] overflow-auto">
<Header
breadcrumbs={breadcrumbs}
handleBack={handleBack}
value={inputValue}
onChange={handleInputChange}
placeholder={t('Search local repos...')}
/>
<Body sections={sectionsToShow} />
<Footer />
</div>
);
};
export default memo(LocalRepos);
================================================
FILE: client/src/CommandBar/steps/ManageRepos/ActionsDropdown.tsx
================================================
import { Dispatch, memo, SetStateAction, useContext, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import SectionLabel from '../../../components/Dropdown/Section/SectionLabel';
import SectionItem from '../../../components/Dropdown/Section/SectionItem';
import DropdownSection from '../../../components/Dropdown/Section';
import { CommandBarContext } from '../../../context/commandBarContext';
import { HardDriveIcon, ShapesIcon } from '../../../icons';
import GitHubIcon from '../../../icons/GitHubIcon';
import { Filter, Provider } from './index';
type Props = {
setRepoType: Dispatch<SetStateAction<Provider>>;
repoType: Provider;
setFilter: Dispatch<SetStateAction<Filter>>;
filter: Filter;
handleClose: () => void;
};
const ActionsDropDown = ({
setRepoType,
repoType,
setFilter,
filter,
handleClose,
}: Props) => {
const { t } = useTranslation();
const { focusedItem } = useContext(CommandBarContext.FooterValues);
const providerIconMap = useMemo(
() => ({
[Provider.All]: ShapesIcon,
[Provider.GitHub]: GitHubIcon,
[Provider.Local]: HardDriveIcon,
}),
[],
);
const providerOptions = useMemo(
() => [Provider.All, Provider.GitHub, Provider.Local],
[],
);
const filterOptions = useMemo(
() => [Filter.All, Filter.Indexed, Filter.Indexing, Filter.InThisProject],
[],
);
const focusedDropdownItems = useMemo(() => {
return (
(focusedItem &&
'focusedItemProps' in focusedItem &&
focusedItem.focusedItemProps?.dropdownItems) ||
[]
);
}, [focusedItem]);
return (
<div>
{!!focusedDropdownItems.length &&
focusedDropdownItems.map(
(section: { items: Record<string, any>[]; key: string }) => (
<DropdownSection borderBottom key={section.key}>
{section.items.map((item: Record<string, any>) => (
<SectionItem
color="base"
shortcut={item.shortcut}
key={item.key}
onClick={() => {
item.onClick();
handleClose();
}}
label={item.label}
icon={item.icon}
index={item.key}
/>
))}
</DropdownSection>
),
)}
<DropdownSection>
<SectionLabel text={t('Filter repositories by')} />
{providerOptions.map((type, i) => {
const Icon = providerIconMap[type];
return (
<SectionItem
color="base"
shortcut={['shift', (i + 1).toString()]}
key={type}
index={`provider-${type}`}
isSelected={repoType === type}
onClick={() => {
setRepoType(type);
handleClose();
}}
label={t(type)}
icon={<Icon sizeClassName="w-4 h-4" />}
/>
);
})}
</DropdownSection>
<DropdownSection>
<SectionLabel text={t('Display')} />
{filterOptions.map((type) => (
<SectionItem
color="base"
key={type}
isSelected={filter === type}
index={`display-${type}`}
onClick={() => {
setFilter(type);
handleClose();
}}
label={t(type)}
/>
))}
</DropdownSection>
</div>
);
};
export default memo(ActionsDropDown);
================================================
FILE: client/src/CommandBar/steps/ManageRepos/index.tsx
================================================
import React, {
ChangeEvent,
memo,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from 'react';
import { Trans, useTranslation } from 'react-i18next';
import {
CommandBarItemCustomType,
CommandBarItemGeneralType,
CommandBarItemType,
CommandBarSectionType,
CommandBarStepEnum,
RepoProvider,
SyncStatus,
} from '../../../types/general';
import { PlusSignIcon } from '../../../icons';
import Header from '../../Header';
import Body from '../../Body';
import Footer from '../../Footer';
import { getIndexedRepos } from '../../../services/api';
import { mapReposBySections } from '../../../utils/mappers';
import { ProjectContext } from '../../../context/projectContext';
import { CommandBarContext } from '../../../context/commandBarContext';
import RepoItem from '../items/RepoItem';
import TutorialTooltip from '../../Tutorial/TutorialTooltip';
import TutorialBody from '
gitextract_xgg_tbnw/
├── .dockerignore
├── .envrc
├── .eslintrc.json
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── request-for-comments.md
│ └── workflows/
│ ├── build-on-pr-command.yml
│ ├── build-on-pr.yml
│ ├── build-on-release.yml
│ ├── client-test.yml
│ ├── dependencies.yml
│ ├── dummy.yml
│ ├── server-test.yml
│ ├── tauri-release.yml
│ └── tauri-test.yml
├── .gitignore
├── .gitpod.Dockerfile
├── .gitpod.yml
├── .taurignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── Dockerfile
├── LICENSE
├── README.md
├── apps/
│ └── desktop/
│ ├── .gitignore
│ ├── README.md
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.cjs
│ ├── src/
│ │ ├── App.tsx
│ │ ├── TextSearch.tsx
│ │ ├── global.d.ts
│ │ ├── main.tsx
│ │ └── vite-env.d.ts
│ ├── src-tauri/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── bin/
│ │ │ ├── qdrant-aarch64-apple-darwin
│ │ │ ├── qdrant-x86_64-apple-darwin
│ │ │ └── qdrant-x86_64-unknown-linux-gnu
│ │ ├── build.rs
│ │ ├── config/
│ │ │ └── config.json
│ │ ├── dylibs/
│ │ │ └── .keep
│ │ ├── frameworks/
│ │ │ └── .keep
│ │ ├── icons/
│ │ │ └── icon.icns
│ │ ├── installer.nsi
│ │ ├── model/
│ │ │ ├── ggml/
│ │ │ │ └── tokenizer.json
│ │ │ ├── model.onnx
│ │ │ ├── special_tokens_map.json
│ │ │ ├── tokenizer.json
│ │ │ ├── tokenizer_config.json
│ │ │ └── vocab.txt
│ │ ├── src/
│ │ │ ├── QDRANT_CONFIG_TEMPLATE.yml
│ │ │ ├── backend.rs
│ │ │ ├── config.rs
│ │ │ ├── main.rs
│ │ │ └── qdrant.rs
│ │ └── tauri.conf.json
│ ├── tailwind.config.cjs
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ └── vite.config.ts
├── client/
│ ├── .gitignore
│ ├── .storybook/
│ │ ├── main.cjs
│ │ ├── preview-head.html
│ │ └── preview.cjs
│ ├── README.md
│ ├── index.html
│ ├── jest.config.js
│ ├── package.json
│ ├── postcss.config.cjs
│ ├── public/
│ │ ├── gray-to-blue.riv
│ │ ├── gray-to-red.riv
│ │ ├── like-blue.riv
│ │ ├── like-red.riv
│ │ └── like_button.riv
│ ├── src/
│ │ ├── App.tsx
│ │ ├── CloudApp.tsx
│ │ ├── CommandBar/
│ │ │ ├── Body/
│ │ │ │ ├── Item.tsx
│ │ │ │ ├── Section.tsx
│ │ │ │ ├── SectionDivider.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Footer/
│ │ │ │ ├── HintButton.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Header/
│ │ │ │ ├── ChipItem.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Tutorial/
│ │ │ │ ├── TutorialBody.tsx
│ │ │ │ └── TutorialTooltip.tsx
│ │ │ ├── index.tsx
│ │ │ └── steps/
│ │ │ ├── AddNewRepo.tsx
│ │ │ ├── AddToStudio.tsx
│ │ │ ├── CreateProject.tsx
│ │ │ ├── Documentation/
│ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Initial.tsx
│ │ │ ├── LocalRepos.tsx
│ │ │ ├── ManageRepos/
│ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── PrivateRepos/
│ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── PublicRepos.tsx
│ │ │ ├── SeachDocs.tsx
│ │ │ ├── SeachFiles.tsx
│ │ │ ├── ToggleTheme.tsx
│ │ │ └── items/
│ │ │ ├── DocItem.tsx
│ │ │ └── RepoItem.tsx
│ │ ├── Project/
│ │ │ ├── CurrentTabContent/
│ │ │ │ ├── ChatTab/
│ │ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ │ ├── ChatPersistentState.tsx
│ │ │ │ │ ├── Conversation.tsx
│ │ │ │ │ ├── DeprecatedClientModal.tsx
│ │ │ │ │ ├── Input/
│ │ │ │ │ │ ├── ProseMirror/
│ │ │ │ │ │ │ ├── index.tsx
│ │ │ │ │ │ │ ├── mentionPlugin.ts
│ │ │ │ │ │ │ ├── nodes.ts
│ │ │ │ │ │ │ ├── placeholderPlugin.ts
│ │ │ │ │ │ │ └── utils.ts
│ │ │ │ │ │ ├── ReactMentions/
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Message/
│ │ │ │ │ │ ├── LoadingStep.tsx
│ │ │ │ │ │ ├── UserParsedQuery/
│ │ │ │ │ │ │ ├── LangChip.tsx
│ │ │ │ │ │ │ ├── PathChip.tsx
│ │ │ │ │ │ │ ├── RepoChip.tsx
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── ScrollableContent.tsx
│ │ │ │ │ ├── StarterMessage.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── DocTab/
│ │ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ │ ├── DocSection.tsx
│ │ │ │ │ ├── RenderedSection.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── DropTarget.tsx
│ │ │ │ ├── EmptyTab.tsx
│ │ │ │ ├── FileTab/
│ │ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Header/
│ │ │ │ │ ├── AddTabButton.tsx
│ │ │ │ │ ├── AddTabDropdown.tsx
│ │ │ │ │ ├── TabButton.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── StudioTab/
│ │ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ │ ├── Conversation/
│ │ │ │ │ │ ├── ContextError.tsx
│ │ │ │ │ │ ├── GeneratedDiff.tsx
│ │ │ │ │ │ ├── Input/
│ │ │ │ │ │ │ ├── TemplatesDropdown.tsx
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ │ ├── NoFilesMessage.tsx
│ │ │ │ │ │ ├── StarterMessage.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── DeprecatedClientModal.tsx
│ │ │ │ │ ├── StudioPersistentState.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── EmptyProject.tsx
│ │ │ ├── LeftSidebar/
│ │ │ │ ├── NavPanel/
│ │ │ │ │ ├── Conversations/
│ │ │ │ │ │ ├── ConversationsDropdown.tsx
│ │ │ │ │ │ ├── CoversationEntry.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Doc/
│ │ │ │ │ │ ├── DocDropdown.tsx
│ │ │ │ │ │ ├── DocEntry.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Repo/
│ │ │ │ │ │ ├── RepoDropdown.tsx
│ │ │ │ │ │ ├── RepoEntry.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Studios/
│ │ │ │ │ │ ├── AddContextFile.tsx
│ │ │ │ │ │ ├── StudioEntry.tsx
│ │ │ │ │ │ ├── StudioFile.tsx
│ │ │ │ │ │ ├── StudioHistory.tsx
│ │ │ │ │ │ ├── StudioSubItem.tsx
│ │ │ │ │ │ ├── StudiosDropdown.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── RegexSearchPanel/
│ │ │ │ │ ├── AutocompleteMenu.tsx
│ │ │ │ │ ├── AutocompleteMenuItem.tsx
│ │ │ │ │ ├── Results/
│ │ │ │ │ │ ├── CodeLine.tsx
│ │ │ │ │ │ ├── CodeResult.tsx
│ │ │ │ │ │ ├── FileResult.tsx
│ │ │ │ │ │ └── RepoResult.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── RightTab.tsx
│ │ │ ├── TutorialCards.tsx
│ │ │ └── index.tsx
│ │ ├── ProjectSettings/
│ │ │ ├── General.tsx
│ │ │ ├── Templates/
│ │ │ │ ├── ActionsDropdown.tsx
│ │ │ │ ├── TemplateItem.tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Settings/
│ │ │ ├── General/
│ │ │ │ └── index.tsx
│ │ │ ├── Preferences/
│ │ │ │ ├── ChatInputTypeDropdown.tsx
│ │ │ │ ├── LanguageDropdown.tsx
│ │ │ │ ├── ThemeDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── components/
│ │ │ ├── Badge/
│ │ │ │ └── index.tsx
│ │ │ ├── Breadcrumbs/
│ │ │ │ ├── BreadcrumbSection.tsx
│ │ │ │ ├── BreadcrumbsCollapsed.tsx
│ │ │ │ ├── PathContainer.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Button/
│ │ │ │ ├── KeyHintButton.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Checkbox/
│ │ │ │ ├── Checkbox.stories.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Chips/
│ │ │ │ └── FileChip.tsx
│ │ │ ├── Code/
│ │ │ │ ├── CodeBlockSearch/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeDiff/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeFragment/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeFull/
│ │ │ │ │ ├── SelectionPopup.tsx
│ │ │ │ │ ├── Token.tsx
│ │ │ │ │ ├── VirtualizedCode.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeFullSelectable/
│ │ │ │ │ ├── CodeContainer.tsx
│ │ │ │ │ ├── LazyLinesContainer.tsx
│ │ │ │ │ ├── SelectionHandler.tsx
│ │ │ │ │ ├── SelectionHint.tsx
│ │ │ │ │ ├── SelectionRect.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── CodeLine.tsx
│ │ │ │ └── CodeToken.tsx
│ │ │ ├── Dropdown/
│ │ │ │ ├── Section/
│ │ │ │ │ ├── SectionItem.tsx
│ │ │ │ │ ├── SectionLabel.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── FileIcon/
│ │ │ │ └── index.tsx
│ │ │ ├── Header/
│ │ │ │ ├── HeaderRightPart.tsx
│ │ │ │ ├── ProjectsDropdown.tsx
│ │ │ │ ├── UserDropdown.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── IpynbRenderer/
│ │ │ │ ├── IpynbCell.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── KeyboardHint/
│ │ │ │ ├── MultiKey.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Loaders/
│ │ │ │ ├── LiteLoader.tsx
│ │ │ │ └── SpinnerLoader.tsx
│ │ │ ├── MarkdownWithCode/
│ │ │ │ ├── CodeRenderer.tsx
│ │ │ │ ├── CodeWithBreadcrumbs.tsx
│ │ │ │ ├── CopyButton.tsx
│ │ │ │ ├── DiffCode.tsx
│ │ │ │ ├── FolderChip.tsx
│ │ │ │ ├── LinkRenderer.tsx
│ │ │ │ ├── NewCode.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Modal/
│ │ │ │ └── index.tsx
│ │ │ ├── OverflowTracker/
│ │ │ │ └── index.tsx
│ │ │ ├── RefsDefsPopup/
│ │ │ │ ├── Badge.tsx
│ │ │ │ ├── RefDefFileItem.tsx
│ │ │ │ ├── RefDefFileLine.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── ScrollToBottom/
│ │ │ │ ├── Composer.tsx
│ │ │ │ ├── EventSpy.ts
│ │ │ │ ├── FunctionContext.ts
│ │ │ │ ├── InternalContext.ts
│ │ │ │ ├── Panel.tsx
│ │ │ │ ├── SpineTo.tsx
│ │ │ │ ├── debounce.ts
│ │ │ │ └── index.tsx
│ │ │ ├── SearchOnPage/
│ │ │ │ └── index.tsx
│ │ │ ├── SectionsNav/
│ │ │ │ ├── SectionButton.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── TextField/
│ │ │ │ └── index.tsx
│ │ │ ├── TextInput/
│ │ │ │ ├── ClearButton/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── RegexButton/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── TokenUsage/
│ │ │ │ └── index.tsx
│ │ │ └── Tooltip/
│ │ │ └── index.tsx
│ │ ├── consts/
│ │ │ ├── animations.ts
│ │ │ ├── code.ts
│ │ │ ├── codeStudio.ts
│ │ │ ├── commandBar.ts
│ │ │ ├── general.ts
│ │ │ ├── shortcuts.ts
│ │ │ ├── tutorialSteps.ts
│ │ │ └── validations.ts
│ │ ├── context/
│ │ │ ├── arrowNavigationContext.ts
│ │ │ ├── chatsContext.tsx
│ │ │ ├── commandBarContext.ts
│ │ │ ├── deviceContext.ts
│ │ │ ├── fileHighlightsContext.ts
│ │ │ ├── localeContext.ts
│ │ │ ├── projectContext.ts
│ │ │ ├── providers/
│ │ │ │ ├── ChatsContextProvider.tsx
│ │ │ │ ├── CommandBarContextProvider.tsx
│ │ │ │ ├── DeviceContextProvider.tsx
│ │ │ │ ├── FileHighlightsContextProvider.tsx
│ │ │ │ ├── ProjectContextProvider.tsx
│ │ │ │ ├── RepositoriesContextProvider.tsx
│ │ │ │ ├── StudiosContextProvider.tsx
│ │ │ │ ├── TabsContextProvider.tsx
│ │ │ │ └── UIContextProvider.tsx
│ │ │ ├── repositoriesContext.ts
│ │ │ ├── studiosContext.tsx
│ │ │ ├── tabsContext.tsx
│ │ │ └── uiContext.ts
│ │ ├── file-icons.css
│ │ ├── global.d.ts
│ │ ├── hooks/
│ │ │ ├── useArrowNavigation.ts
│ │ │ ├── useArrowNavigationItemProps.ts
│ │ │ ├── useCodeSearch.ts
│ │ │ ├── useComponentWillMount.ts
│ │ │ ├── useDiffLines.ts
│ │ │ ├── useEnterKey.ts
│ │ │ ├── useGlobalShortcuts.ts
│ │ │ ├── useKeyboardNavigation.ts
│ │ │ ├── useNavPanel.ts
│ │ │ ├── useOnClickOutsideHook.ts
│ │ │ ├── usePersistentState.tsx
│ │ │ ├── useResizeableWidth.ts
│ │ │ ├── useScrollToBottom.ts
│ │ │ ├── useShortcuts.ts
│ │ │ └── useStateRef.ts
│ │ ├── i18n.ts
│ │ ├── icons/
│ │ │ ├── ArrowHistory.tsx
│ │ │ ├── ArrowLeft.tsx
│ │ │ ├── ArrowOut.tsx
│ │ │ ├── ArrowTriangleBottom.tsx
│ │ │ ├── BloopLogo.tsx
│ │ │ ├── Branch.tsx
│ │ │ ├── Broom.tsx
│ │ │ ├── Bug.tsx
│ │ │ ├── ChatBubbles.tsx
│ │ │ ├── Check.tsx
│ │ │ ├── CheckList.tsx
│ │ │ ├── CheckmarkInSquare.tsx
│ │ │ ├── ChevronDown.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── ChevronUp.tsx
│ │ │ ├── Clipboard.tsx
│ │ │ ├── CloseSign.tsx
│ │ │ ├── CloseSignInCircle.tsx
│ │ │ ├── Code.tsx
│ │ │ ├── CodeLineWithSparkle.tsx
│ │ │ ├── CodeStudio.tsx
│ │ │ ├── CodeSymbols/
│ │ │ │ ├── Class.tsx
│ │ │ │ ├── Color.tsx
│ │ │ │ ├── Constant.tsx
│ │ │ │ ├── Enum.tsx
│ │ │ │ ├── Event.tsx
│ │ │ │ ├── Field.tsx
│ │ │ │ ├── File.tsx
│ │ │ │ ├── Folder.tsx
│ │ │ │ ├── Interface.tsx
│ │ │ │ ├── Keyword.tsx
│ │ │ │ ├── Method.tsx
│ │ │ │ ├── Module.tsx
│ │ │ │ ├── Multiple.tsx
│ │ │ │ ├── Operator.tsx
│ │ │ │ ├── Property.tsx
│ │ │ │ ├── Reference.tsx
│ │ │ │ ├── Snippet.tsx
│ │ │ │ ├── Struct.tsx
│ │ │ │ ├── Symbol.tsx
│ │ │ │ ├── Text.tsx
│ │ │ │ ├── TypeParameter.tsx
│ │ │ │ ├── Unit.tsx
│ │ │ │ ├── Value.tsx
│ │ │ │ └── Variable.tsx
│ │ │ ├── Cog.tsx
│ │ │ ├── ColorSwitch.tsx
│ │ │ ├── Conversation.tsx
│ │ │ ├── CopyText.tsx
│ │ │ ├── DateTimeCalendar.tsx
│ │ │ ├── Def.tsx
│ │ │ ├── Documents.tsx
│ │ │ ├── DoorOut.tsx
│ │ │ ├── DoubleChevronIn.tsx
│ │ │ ├── DoubleChevronOut.tsx
│ │ │ ├── EyeCut.tsx
│ │ │ ├── File.tsx
│ │ │ ├── FileWithSparks.tsx
│ │ │ ├── Filter.tsx
│ │ │ ├── Folder.tsx
│ │ │ ├── GitHubIcon.tsx
│ │ │ ├── Globe.tsx
│ │ │ ├── HardDrive.tsx
│ │ │ ├── InfoBadge.tsx
│ │ │ ├── KLetter.tsx
│ │ │ ├── Like.tsx
│ │ │ ├── LinkChain.tsx
│ │ │ ├── LiteLoader.tsx
│ │ │ ├── LogoFull.tsx
│ │ │ ├── Macintosh.tsx
│ │ │ ├── Magazine.tsx
│ │ │ ├── MagnifyTool.tsx
│ │ │ ├── MailIcon.tsx
│ │ │ ├── MoreHorizontal.tsx
│ │ │ ├── Pencil.tsx
│ │ │ ├── Person.tsx
│ │ │ ├── PlusSign.tsx
│ │ │ ├── Prompt.tsx
│ │ │ ├── Range.tsx
│ │ │ ├── Ref.tsx
│ │ │ ├── Refresh.tsx
│ │ │ ├── Regex.tsx
│ │ │ ├── RegexSearch.tsx
│ │ │ ├── Repository.tsx
│ │ │ ├── Run.tsx
│ │ │ ├── Send.tsx
│ │ │ ├── Shapes.tsx
│ │ │ ├── SpinLoader.tsx
│ │ │ ├── SplitView.tsx
│ │ │ ├── StudioCloseSign.tsx
│ │ │ ├── StudioPlusSign.tsx
│ │ │ ├── Template.tsx
│ │ │ ├── Templates.tsx
│ │ │ ├── ThemeBlack.tsx
│ │ │ ├── ThemeDark.tsx
│ │ │ ├── ThemeLight.tsx
│ │ │ ├── TooltipTailBottom.tsx
│ │ │ ├── TooltipTailLeft.tsx
│ │ │ ├── TooltipTailRight.tsx
│ │ │ ├── TooltipTailTop.tsx
│ │ │ ├── TrashCan.tsx
│ │ │ ├── Unlike.tsx
│ │ │ ├── Walk.tsx
│ │ │ ├── Wallet.tsx
│ │ │ ├── WarningSign.tsx
│ │ │ ├── Wrapper.tsx
│ │ │ └── index.ts
│ │ ├── index.css
│ │ ├── locales/
│ │ │ ├── en.json
│ │ │ ├── es.json
│ │ │ ├── it.json
│ │ │ ├── ja.json
│ │ │ ├── zh-CN.json
│ │ │ └── zh-TW.json
│ │ ├── main.tsx
│ │ ├── mappers/
│ │ │ ├── conversation.ts
│ │ │ └── results.ts
│ │ ├── services/
│ │ │ ├── api.ts
│ │ │ ├── cache.ts
│ │ │ └── storage.ts
│ │ ├── themes/
│ │ │ ├── default-dark.css
│ │ │ └── default-light.css
│ │ ├── types/
│ │ │ ├── api.ts
│ │ │ ├── file-icons-js/
│ │ │ │ └── index.d.ts
│ │ │ ├── general.ts
│ │ │ ├── index.ts
│ │ │ ├── prism.ts
│ │ │ └── results.ts
│ │ ├── utils/
│ │ │ ├── commandBarUtils.test.ts
│ │ │ ├── commandBarUtils.ts
│ │ │ ├── domUtils.ts
│ │ │ ├── file.ts
│ │ │ ├── index.test.ts
│ │ │ ├── index.ts
│ │ │ ├── keyboardUtils.ts
│ │ │ ├── langs.json
│ │ │ ├── mappers.ts
│ │ │ ├── navigationUtils.ts
│ │ │ ├── prism.ts
│ │ │ ├── requestUtils.ts
│ │ │ ├── scrollUtils.ts
│ │ │ └── textSearch.ts
│ │ └── vite-env.d.ts
│ ├── tailwind.config.cjs
│ ├── tests/
│ │ └── setupTests.ts
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ └── vite.config.ts
├── docker-compose.yml
├── flake.nix
├── package.json
├── playwright.config.js
├── release_description_template.txt
├── server/
│ ├── README.md
│ ├── bleep/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── migrations/
│ │ │ ├── 20230424095042_conversations.sql
│ │ │ ├── 20230613143506_file-cache.sql
│ │ │ ├── 20230616140930_query-log.sql
│ │ │ ├── 20230725183450_remove_conversation_llm_history_code_chunks_path.sql
│ │ │ ├── 20230821131141_code_studio.sql
│ │ │ ├── 20230831165918_templates.sql
│ │ │ ├── 20230831170927_code_studio_uuid_blob.sql
│ │ │ ├── 20230831184906_code_studio_history.sql
│ │ │ ├── 20230901200307_code_studio_user_id.sql
│ │ │ ├── 20230907154037_studio_int_id.sql
│ │ │ ├── 20230911161509_template_user_id.sql
│ │ │ ├── 20230912084309_nullable_studio_name.sql
│ │ │ ├── 20230915091923_tutorial-questions.sql
│ │ │ ├── 20230919100529_code_studio_docs.sql
│ │ │ ├── 20231004101827_refactor_template.sql
│ │ │ ├── 20231122012638_projects.sql
│ │ │ └── 20231201200442_project_docs.sql
│ │ ├── sqlx-data.json
│ │ └── src/
│ │ ├── agent/
│ │ │ ├── exchange.rs
│ │ │ ├── model.rs
│ │ │ ├── prompts.rs
│ │ │ ├── symbol.rs
│ │ │ ├── tools/
│ │ │ │ ├── answer.rs
│ │ │ │ ├── code.rs
│ │ │ │ ├── path.rs
│ │ │ │ └── proc.rs
│ │ │ └── transcoder.rs
│ │ ├── agent.rs
│ │ ├── background/
│ │ │ ├── control.rs
│ │ │ ├── notifyqueue.rs
│ │ │ └── sync.rs
│ │ ├── background.rs
│ │ ├── bin/
│ │ │ └── bleep.rs
│ │ ├── cache.rs
│ │ ├── collector/
│ │ │ ├── bytes_filter.rs
│ │ │ ├── frequency.rs
│ │ │ └── group.rs
│ │ ├── collector.rs
│ │ ├── commits.rs
│ │ ├── config.rs
│ │ ├── db/
│ │ │ └── query_log.rs
│ │ ├── db.rs
│ │ ├── env.rs
│ │ ├── indexes/
│ │ │ ├── analytics.rs
│ │ │ ├── doc.rs
│ │ │ ├── file.rs
│ │ │ ├── reader.rs
│ │ │ ├── repo.rs
│ │ │ └── schema.rs
│ │ ├── indexes.rs
│ │ ├── intelligence/
│ │ │ ├── code_navigation.rs
│ │ │ ├── language/
│ │ │ │ ├── c/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── c_sharp/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── cobol/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── cpp/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── go/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── java/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── javascript/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── php/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── python/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── r/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── ruby/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── rust/
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── scopes.scm
│ │ │ │ ├── test_utils.rs
│ │ │ │ └── typescript/
│ │ │ │ ├── mod.rs
│ │ │ │ └── scopes.scm
│ │ │ ├── language.rs
│ │ │ ├── namespace.rs
│ │ │ ├── scope_resolution/
│ │ │ │ ├── debug.rs
│ │ │ │ ├── def.rs
│ │ │ │ ├── import.rs
│ │ │ │ ├── reference.rs
│ │ │ │ └── scope.rs
│ │ │ └── scope_resolution.rs
│ │ ├── intelligence.rs
│ │ ├── lib.rs
│ │ ├── llm/
│ │ │ ├── call.rs
│ │ │ └── client.rs
│ │ ├── llm.rs
│ │ ├── periodic/
│ │ │ ├── logrotate.rs
│ │ │ └── remotes.rs
│ │ ├── periodic.rs
│ │ ├── query/
│ │ │ ├── compiler.rs
│ │ │ ├── execute.rs
│ │ │ ├── grammar.pest
│ │ │ ├── languages.rs
│ │ │ ├── parser.rs
│ │ │ ├── planner/
│ │ │ │ └── optimize.rs
│ │ │ ├── planner.rs
│ │ │ ├── ranking.rs
│ │ │ ├── stopwords.rs
│ │ │ └── stopwords.txt
│ │ ├── query.rs
│ │ ├── remotes/
│ │ │ ├── github.rs
│ │ │ └── poll.rs
│ │ ├── remotes.rs
│ │ ├── repo/
│ │ │ ├── iterator/
│ │ │ │ ├── filters.rs
│ │ │ │ ├── fs.rs
│ │ │ │ ├── git.rs
│ │ │ │ └── language.rs
│ │ │ └── iterator.rs
│ │ ├── repo.rs
│ │ ├── scraper/
│ │ │ ├── article.rs
│ │ │ └── chunk.rs
│ │ ├── scraper.rs
│ │ ├── semantic/
│ │ │ ├── chunk.rs
│ │ │ ├── embedder.rs
│ │ │ ├── execute.rs
│ │ │ └── schema.rs
│ │ ├── semantic.rs
│ │ ├── snippet.rs
│ │ ├── state.rs
│ │ ├── symbol.rs
│ │ ├── text_range.rs
│ │ ├── user.rs
│ │ ├── webserver/
│ │ │ ├── answer.rs
│ │ │ ├── autocomplete.rs
│ │ │ ├── commits.rs
│ │ │ ├── config.rs
│ │ │ ├── conversation.rs
│ │ │ ├── docs.rs
│ │ │ ├── file.rs
│ │ │ ├── hoverable.rs
│ │ │ ├── index.rs
│ │ │ ├── intelligence.rs
│ │ │ ├── middleware.rs
│ │ │ ├── project/
│ │ │ │ ├── doc.rs
│ │ │ │ └── repo.rs
│ │ │ ├── project.rs
│ │ │ ├── query.rs
│ │ │ ├── repos.rs
│ │ │ ├── search.rs
│ │ │ ├── studio/
│ │ │ │ └── diff.rs
│ │ │ ├── studio.rs
│ │ │ └── template.rs
│ │ └── webserver.rs
│ └── languages.yml
└── tests/
├── .example.env
├── .gitignore
├── all_onboarding.spec.js_
├── github_onboarding.spec.js_
├── local_onboarding.spec.js_
├── onboarding.spec.ts
├── onboarding.ts
├── repository.spec.ts
├── search.spec.ts
├── settings.spec.ts
└── tsconfig.json
SYMBOL INDEX (2114 symbols across 343 files)
FILE: apps/desktop/src-tauri/build.rs
function main (line 8) | fn main() {
function copy (line 33) | fn copy(profile_dir: &Path) {
function wait_for (line 62) | fn wait_for(dylib_path: &Path) {
function is_apple_silicon (line 75) | fn is_apple_silicon() -> bool {
FILE: apps/desktop/src-tauri/src/backend.rs
function get_last_log_file (line 9) | pub fn get_last_log_file(config: tauri::State<Configuration>) -> Option<...
function initialize (line 38) | pub fn initialize<R: Runtime>(app: &mut tauri::App<R>) -> tauri::plugin:...
function wait_for_qdrant (line 55) | async fn wait_for_qdrant() -> anyhow::Result<()> {
function start_backend (line 71) | async fn start_backend<R: Runtime>(configuration: Configuration, app: ta...
function device_id_on_single_line (line 119) | fn device_id_on_single_line() {
FILE: apps/desktop/src-tauri/src/config.rs
function init (line 7) | pub fn init<R: Runtime>(app: &tauri::AppHandle<R>) -> &Configuration {
function create_configuration (line 17) | fn create_configuration<R: Runtime>(app: &tauri::AppHandle<R>) -> Config...
FILE: apps/desktop/src-tauri/src/main.rs
type Payload (line 17) | struct Payload {
function relative_command_path (line 21) | fn relative_command_path(command: impl AsRef<str>) -> Option<PathBuf> {
function main (line 35) | fn main() {
function show_main_window (line 53) | fn show_main_window(app_handle: tauri::AppHandle) {
function show_folder_in_finder (line 65) | fn show_folder_in_finder(path: String) {
function cleanup_old_processes (line 92) | fn cleanup_old_processes() {
FILE: apps/desktop/src-tauri/src/qdrant.rs
type QdrantSupervisor (line 13) | pub(super) struct QdrantSupervisor {
method name (line 23) | fn name(&self) -> &'static str {
method initialize (line 27) | fn initialize(
method on_event (line 70) | fn on_event(&mut self, _app: &tauri::AppHandle<R>, event: &tauri::RunE...
method drop (line 103) | fn drop(&mut self) {
function run_command (line 113) | fn run_command(command: &Path, qdrant_dir: &Path, stdout: &Path, stderr:...
function run_command (line 146) | fn run_command(command: &Path, qdrant_dir: &Path, stdout: &Path, stderr:...
FILE: apps/desktop/src/App.tsx
function App (line 32) | function App() {
FILE: client/src/CommandBar/Body/Item.tsx
type Props (line 24) | type Props = CommandBarItemGeneralType & {
FILE: client/src/CommandBar/Body/Section.tsx
type Props (line 9) | type Props = {
FILE: client/src/CommandBar/Body/SectionDivider.tsx
type Props (line 3) | type Props = {
FILE: client/src/CommandBar/Body/index.tsx
type Props (line 9) | type Props = {
FILE: client/src/CommandBar/Footer/HintButton.tsx
type Props (line 4) | type Props = {
FILE: client/src/CommandBar/Footer/index.tsx
type Props (line 8) | type Props = {
FILE: client/src/CommandBar/Header/ChipItem.tsx
type Props (line 3) | type Props = { text: string };
FILE: client/src/CommandBar/Header/index.tsx
type PropsWithoutInput (line 16) | type PropsWithoutInput = {
type PropsWithInput (line 24) | type PropsWithInput = {
type GeneralProps (line 32) | type GeneralProps = {
type Props (line 39) | type Props = GeneralProps & (PropsWithInput | PropsWithoutInput);
FILE: client/src/CommandBar/Tutorial/TutorialBody.tsx
type Props (line 5) | type Props = {
FILE: client/src/CommandBar/Tutorial/TutorialTooltip.tsx
type Props (line 4) | type Props = {
FILE: client/src/CommandBar/index.tsx
type Props (line 22) | type Props = {};
FILE: client/src/CommandBar/steps/AddNewRepo.tsx
type Props (line 21) | type Props = {
FILE: client/src/CommandBar/steps/AddToStudio.tsx
type Props (line 30) | type Props = (AddFileToStudioDataType | AddDocToStudioDataType) & {};
FILE: client/src/CommandBar/steps/CreateProject.tsx
type Props (line 18) | type Props = {};
FILE: client/src/CommandBar/steps/Documentation/ActionsDropdown.tsx
type Props (line 6) | type Props = {
FILE: client/src/CommandBar/steps/Documentation/index.tsx
type Props (line 29) | type Props = {};
FILE: client/src/CommandBar/steps/Initial.tsx
type Props (line 53) | type Props = {
FILE: client/src/CommandBar/steps/LocalRepos.tsx
type Props (line 25) | type Props = {};
FILE: client/src/CommandBar/steps/ManageRepos/ActionsDropdown.tsx
type Props (line 11) | type Props = {
FILE: client/src/CommandBar/steps/ManageRepos/index.tsx
type Props (line 35) | type Props = {
type Filter (line 39) | enum Filter {
type Provider (line 46) | enum Provider {
FILE: client/src/CommandBar/steps/PrivateRepos/ActionsDropdown.tsx
type Props (line 6) | type Props = {};
FILE: client/src/CommandBar/steps/PrivateRepos/index.tsx
type Props (line 30) | type Props = {
FILE: client/src/CommandBar/steps/PublicRepos.tsx
type Props (line 18) | type Props = {};
FILE: client/src/CommandBar/steps/SeachDocs.tsx
type Props (line 24) | type Props = {
FILE: client/src/CommandBar/steps/SeachFiles.tsx
type Props (line 31) | type Props = {
FILE: client/src/CommandBar/steps/ToggleTheme.tsx
type Props (line 20) | type Props = {};
FILE: client/src/CommandBar/steps/items/DocItem.tsx
type Props (line 34) | type Props = {
FILE: client/src/CommandBar/steps/items/RepoItem.tsx
type Props (line 38) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/ActionsDropdown.tsx
type Props (line 9) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/ChatPersistentState.tsx
type Options (line 33) | type Options = {
type Props (line 40) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Conversation.tsx
type Props (line 17) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/DeprecatedClientModal.tsx
type Props (line 8) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/index.tsx
function Paragraph (line 33) | function Paragraph({ children }: NodeViewComponentProps) {
type Props (line 45) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/mentionPlugin.ts
function getRegexp (line 6) | function getRegexp(mentionTrigger: string, allowSpace?: boolean) {
function getMatch (line 14) | function getMatch(
type State (line 85) | type State = {
type Options (line 111) | type Options = {
function getMentionsPlugin (line 125) | function getMentionsPlugin(opts: Partial<Options>) {
FILE: client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/placeholderPlugin.ts
method view (line 14) | view(view) {
FILE: client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/utils.ts
function addMentionNodes (line 9) | function addMentionNodes(nodes: OrderedMap<NodeSpec>) {
FILE: client/src/Project/CurrentTabContent/ChatTab/Input/ReactMentions/index.tsx
type Props (line 23) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Input/index.tsx
type Props (line 36) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Message/LoadingStep.tsx
type Props (line 7) | type Props = ChatLoadingStep & {
FILE: client/src/Project/CurrentTabContent/ChatTab/Message/UserParsedQuery/LangChip.tsx
type Props (line 4) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Message/UserParsedQuery/PathChip.tsx
type Props (line 6) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Message/UserParsedQuery/RepoChip.tsx
type Props (line 4) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Message/UserParsedQuery/index.tsx
type Props (line 10) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/Message/index.tsx
type Props (line 32) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/ScrollableContent.tsx
type Props (line 10) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/StarterMessage.tsx
type Props (line 8) | type Props = {
FILE: client/src/Project/CurrentTabContent/ChatTab/index.tsx
type Props (line 27) | type Props = ChatTabType & {
FILE: client/src/Project/CurrentTabContent/DocTab/ActionsDropdown.tsx
type Props (line 16) | type Props = {
FILE: client/src/Project/CurrentTabContent/DocTab/DocSection.tsx
type Props (line 7) | type Props = DocSectionType & {
FILE: client/src/Project/CurrentTabContent/DocTab/RenderedSection.tsx
method highlight (line 8) | highlight(str: string, lang: string): string {
type Props (line 19) | type Props = {
FILE: client/src/Project/CurrentTabContent/DocTab/index.tsx
type Props (line 52) | type Props = DocTabType & {
FILE: client/src/Project/CurrentTabContent/DropTarget.tsx
type Props (line 7) | type Props = {
FILE: client/src/Project/CurrentTabContent/EmptyTab.tsx
type Props (line 5) | type Props = {};
FILE: client/src/Project/CurrentTabContent/FileTab/ActionsDropdown.tsx
type Props (line 18) | type Props = {
FILE: client/src/Project/CurrentTabContent/FileTab/index.tsx
type Props (line 65) | type Props = {
FILE: client/src/Project/CurrentTabContent/Header/AddTabButton.tsx
type Props (line 18) | type Props = {
FILE: client/src/Project/CurrentTabContent/Header/AddTabDropdown.tsx
type Props (line 14) | type Props = {
FILE: client/src/Project/CurrentTabContent/Header/TabButton.tsx
type Props (line 27) | type Props = TabType & {
method collect (line 98) | collect(monitor) {
method hover (line 103) | hover(item: DraggableTabItem, monitor) {
FILE: client/src/Project/CurrentTabContent/Header/index.tsx
type Props (line 8) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/ActionsDropdown.tsx
type Props (line 9) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/Conversation/ContextError.tsx
type Props (line 5) | type Props = {};
FILE: client/src/Project/CurrentTabContent/StudioTab/Conversation/GeneratedDiff.tsx
type Props (line 7) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/Conversation/Input/TemplatesDropdown.tsx
type Props (line 20) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/Conversation/Input/index.tsx
type Props (line 30) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/Conversation/NoFilesMessage.tsx
type Props (line 9) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/Conversation/StarterMessage.tsx
type Props (line 5) | type Props = {};
FILE: client/src/Project/CurrentTabContent/StudioTab/Conversation/index.tsx
type Props (line 35) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/DeprecatedClientModal.tsx
type Props (line 8) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/StudioPersistentState.tsx
type Props (line 34) | type Props = {
FILE: client/src/Project/CurrentTabContent/StudioTab/index.tsx
type Props (line 41) | type Props = StudioTabType & {
FILE: client/src/Project/CurrentTabContent/index.tsx
type Props (line 15) | type Props = {
FILE: client/src/Project/EmptyProject.tsx
type Props (line 10) | type Props = {};
FILE: client/src/Project/LeftSidebar/NavPanel/Conversations/ConversationsDropdown.tsx
type Props (line 9) | type Props = {};
FILE: client/src/Project/LeftSidebar/NavPanel/Conversations/CoversationEntry.tsx
type Props (line 7) | type Props = ConversationShortType & {
FILE: client/src/Project/LeftSidebar/NavPanel/Conversations/index.tsx
type Props (line 15) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Doc/DocDropdown.tsx
type Props (line 9) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Doc/DocEntry.tsx
type Props (line 8) | type Props = DocPageType & {
FILE: client/src/Project/LeftSidebar/NavPanel/Doc/index.tsx
type Props (line 28) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Repo/RepoDropdown.tsx
type Props (line 33) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Repo/RepoEntry.tsx
type Props (line 20) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Repo/index.tsx
type Props (line 30) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Studios/AddContextFile.tsx
type Props (line 9) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Studios/StudioEntry.tsx
type Props (line 31) | type Props = CodeStudioType & {
FILE: client/src/Project/LeftSidebar/NavPanel/Studios/StudioFile.tsx
type Props (line 16) | type Props = StudioContextFile & {
FILE: client/src/Project/LeftSidebar/NavPanel/Studios/StudioHistory.tsx
type Props (line 20) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Studios/StudioSubItem.tsx
type Props (line 8) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/Studios/StudiosDropdown.tsx
type Props (line 9) | type Props = {};
FILE: client/src/Project/LeftSidebar/NavPanel/Studios/index.tsx
type Props (line 29) | type Props = {
FILE: client/src/Project/LeftSidebar/NavPanel/index.tsx
type Props (line 12) | type Props = {};
FILE: client/src/Project/LeftSidebar/RegexSearchPanel/AutocompleteMenu.tsx
type Props (line 6) | type Props = {
FILE: client/src/Project/LeftSidebar/RegexSearchPanel/AutocompleteMenuItem.tsx
type Props (line 6) | type Props = {
FILE: client/src/Project/LeftSidebar/RegexSearchPanel/Results/CodeLine.tsx
type Props (line 11) | type Props = {
FILE: client/src/Project/LeftSidebar/RegexSearchPanel/Results/CodeResult.tsx
type Props (line 8) | type Props = {
FILE: client/src/Project/LeftSidebar/RegexSearchPanel/Results/FileResult.tsx
type Props (line 17) | type Props = {
FILE: client/src/Project/LeftSidebar/RegexSearchPanel/Results/RepoResult.tsx
type Props (line 10) | type Props = {
FILE: client/src/Project/LeftSidebar/RegexSearchPanel/index.tsx
type Props (line 32) | type Props = {
type ResultType (line 49) | type ResultType = CodeItem | RepoItem | FileResItem | DirectoryItem | Fi...
FILE: client/src/Project/LeftSidebar/index.tsx
type Props (line 25) | type Props = {};
FILE: client/src/Project/RightTab.tsx
type Props (line 7) | type Props = {
FILE: client/src/Project/TutorialCards.tsx
type Props (line 24) | type Props = {};
FILE: client/src/Project/index.tsx
type Props (line 21) | type Props = {};
FILE: client/src/ProjectSettings/General.tsx
type Props (line 16) | type Props = {};
FILE: client/src/ProjectSettings/Templates/ActionsDropdown.tsx
type Props (line 7) | type Props = {
FILE: client/src/ProjectSettings/Templates/TemplateItem.tsx
type Props (line 10) | type Props = StudioTemplateType & {
FILE: client/src/ProjectSettings/Templates/index.tsx
type Props (line 17) | type Props = {};
FILE: client/src/ProjectSettings/index.tsx
type Props (line 12) | type Props = {};
FILE: client/src/Settings/General/index.tsx
type Props (line 17) | type Props = {};
type Form (line 19) | type Form = {
FILE: client/src/Settings/Preferences/ChatInputTypeDropdown.tsx
type Props (line 7) | type Props = {};
FILE: client/src/Settings/Preferences/LanguageDropdown.tsx
type Props (line 9) | type Props = {};
FILE: client/src/Settings/Preferences/ThemeDropdown.tsx
type Props (line 12) | type Props = {};
FILE: client/src/Settings/Preferences/index.tsx
type Props (line 19) | type Props = {};
FILE: client/src/Settings/index.tsx
type Props (line 12) | type Props = {};
FILE: client/src/components/Badge/index.tsx
type Props (line 3) | type Props = {
FILE: client/src/components/Breadcrumbs/BreadcrumbSection.tsx
type HighlightedString (line 4) | type HighlightedString = {
type ItemElement (line 9) | type ItemElement = {
type Props (line 14) | type Props = {
FILE: client/src/components/Breadcrumbs/BreadcrumbsCollapsed.tsx
type Props (line 10) | type Props = {
FILE: client/src/components/Breadcrumbs/PathContainer.tsx
type BProps (line 11) | type BProps = React.ComponentProps<typeof Breadcrumbs>;
type Props (line 13) | type Props = {
FILE: client/src/components/Breadcrumbs/index.tsx
type HighlightedString (line 17) | type HighlightedString = {
type ItemElement (line 22) | type ItemElement = {
type PathParts (line 27) | type PathParts = {
type Props (line 34) | type Props = {
FILE: client/src/components/Button/KeyHintButton.tsx
type Props (line 4) | type Props = {
FILE: client/src/components/Button/index.tsx
type Props (line 12) | type Props = {
type OnlyIconProps (line 27) | type OnlyIconProps = {
type TextBtnProps (line 35) | type TextBtnProps = {
FILE: client/src/components/Checkbox/index.tsx
type Props (line 4) | type Props = {
FILE: client/src/components/Chips/FileChip.tsx
type Props (line 15) | type Props = {
FILE: client/src/components/Code/CodeBlockSearch/index.tsx
type Props (line 10) | type Props = {
constant PREVIEW_NUM (line 22) | const PREVIEW_NUM = 3;
FILE: client/src/components/Code/CodeDiff/index.tsx
type Props (line 12) | type Props = DiffChunkType & {
FILE: client/src/components/Code/CodeFragment/index.tsx
type Props (line 8) | type Props = {
FILE: client/src/components/Code/CodeFull/SelectionPopup.tsx
type Props (line 16) | type Props = {
FILE: client/src/components/Code/CodeFull/Token.tsx
type Props (line 6) | type Props = {
FILE: client/src/components/Code/CodeFull/VirtualizedCode.tsx
type Props (line 10) | type Props = {
FILE: client/src/components/Code/CodeFull/index.tsx
type Props (line 25) | type Props = {
FILE: client/src/components/Code/CodeFullSelectable/CodeContainer.tsx
type Props (line 30) | type Props = {
FILE: client/src/components/Code/CodeFullSelectable/LazyLinesContainer.tsx
type Props (line 14) | type Props = {
FILE: client/src/components/Code/CodeFullSelectable/SelectionHandler.tsx
type Props (line 12) | type Props = {
FILE: client/src/components/Code/CodeFullSelectable/SelectionHint.tsx
type Props (line 6) | type Props = {
FILE: client/src/components/Code/CodeFullSelectable/SelectionRect.tsx
type TemporaryRangeProps (line 6) | type TemporaryRangeProps = {
type StaticRangeProps (line 15) | type StaticRangeProps = {
type Props (line 24) | type Props = TemporaryRangeProps | StaticRangeProps;
FILE: client/src/components/Code/CodeFullSelectable/index.tsx
type Props (line 28) | type Props = {
FILE: client/src/components/Code/CodeLine.tsx
type Props (line 14) | type Props = {
FILE: client/src/components/Code/CodeToken.tsx
type Props (line 5) | type Props = {
FILE: client/src/components/Dropdown/Section/SectionItem.tsx
type Props (line 16) | type Props = {
FILE: client/src/components/Dropdown/Section/SectionLabel.tsx
type Props (line 3) | type Props = { text: string };
FILE: client/src/components/Dropdown/Section/index.tsx
type Props (line 3) | type Props = {
FILE: client/src/components/Dropdown/index.tsx
type Props (line 17) | type Props = {
FILE: client/src/components/FileIcon/index.tsx
type Props (line 4) | type Props = { filename: string; noMargin?: boolean };
FILE: client/src/components/Header/HeaderRightPart.tsx
type Props (line 10) | type Props = {};
FILE: client/src/components/Header/ProjectsDropdown.tsx
type Props (line 18) | type Props = {};
FILE: client/src/components/Header/UserDropdown.tsx
type Props (line 15) | type Props = {};
FILE: client/src/components/Header/index.tsx
type Props (line 12) | type Props = {
FILE: client/src/components/IpynbRenderer/IpynbCell.tsx
type CellProps (line 13) | type CellProps = {
FILE: client/src/components/IpynbRenderer/index.tsx
type Props (line 5) | type Props = {
FILE: client/src/components/KeyboardHint/MultiKey.tsx
type Props (line 4) | type Props = {
FILE: client/src/components/KeyboardHint/index.tsx
type Props (line 4) | type Props = {
FILE: client/src/components/Loaders/LiteLoader.tsx
type Props (line 3) | type Props = {
FILE: client/src/components/Loaders/SpinnerLoader.tsx
type Props (line 3) | type Props = {
FILE: client/src/components/MarkdownWithCode/CodeRenderer.tsx
type Props (line 7) | type Props = {
FILE: client/src/components/MarkdownWithCode/CodeWithBreadcrumbs.tsx
type Props (line 8) | type Props = {
FILE: client/src/components/MarkdownWithCode/CopyButton.tsx
type Props (line 7) | type Props = {
FILE: client/src/components/MarkdownWithCode/DiffCode.tsx
type Props (line 11) | type Props = {
FILE: client/src/components/MarkdownWithCode/FolderChip.tsx
type Props (line 7) | type Props = {
FILE: client/src/components/MarkdownWithCode/LinkRenderer.tsx
type Props (line 18) | type Props = {
FILE: client/src/components/MarkdownWithCode/NewCode.tsx
type Props (line 6) | type Props = {
FILE: client/src/components/MarkdownWithCode/index.tsx
type Props (line 16) | type Props = {
method a (line 43) | a(
method code (line 66) | code({ node, inline, className, children, ...props }: CodeProps) {
FILE: client/src/components/Modal/index.tsx
type Props (line 7) | type Props = {
FILE: client/src/components/RefsDefsPopup/Badge.tsx
type Props (line 8) | type Props = {
FILE: client/src/components/RefsDefsPopup/RefDefFileItem.tsx
type Props (line 9) | type Props = {
FILE: client/src/components/RefsDefsPopup/RefDefFileLine.tsx
type Props (line 7) | type Props = {
FILE: client/src/components/RefsDefsPopup/index.tsx
type Props (line 52) | type Props = {
FILE: client/src/components/ScrollToBottom/Composer.tsx
constant MIN_CHECK_INTERVAL (line 15) | const MIN_CHECK_INTERVAL = 17;
constant NEAR_END_THRESHOLD (line 16) | const NEAR_END_THRESHOLD = 1;
constant SCROLL_DECISION_DURATION (line 17) | const SCROLL_DECISION_DURATION = 34;
function setImmediateInterval (line 19) | function setImmediateInterval(fn: () => void, ms: number) {
function computeViewState (line 25) | function computeViewState({
FILE: client/src/components/ScrollToBottom/EventSpy.ts
type Props (line 5) | type Props = {
FILE: client/src/components/ScrollToBottom/SpineTo.tsx
function squareStepper (line 3) | function squareStepper(current: number, to: number) {
function step (line 15) | function step(
type Props (line 30) | type Props = {
FILE: client/src/components/ScrollToBottom/index.tsx
type CoreProps (line 5) | type CoreProps = {
type Props (line 22) | type Props = {
FILE: client/src/components/SearchOnPage/index.tsx
type Props (line 11) | type Props = {
FILE: client/src/components/SectionsNav/SectionButton.tsx
type Props (line 4) | type Props<T> = {
FILE: client/src/components/SectionsNav/index.tsx
type Props (line 5) | interface Props<T> {
function SectionsNav (line 22) | function SectionsNav<T extends SettingsTypesSections>({
FILE: client/src/components/TextField/index.tsx
type Props (line 3) | type Props = {
FILE: client/src/components/TextInput/RegexButton/index.tsx
type Props (line 5) | type Props = {
FILE: client/src/components/TextInput/index.tsx
type Props (line 14) | type Props = {
type SingleLineProps (line 37) | type SingleLineProps = Props & {
type MultilineProps (line 42) | type MultilineProps = Props & {
FILE: client/src/components/TokenUsage/index.tsx
type Props (line 3) | type Props = {
type UsageProps (line 8) | type UsageProps = {
function setPercentage (line 16) | function setPercentage(percentage: number) {
FILE: client/src/components/Tooltip/index.tsx
type Props (line 5) | type Props = {
FILE: client/src/consts/animations.ts
constant MODAL_APPEAR_ANIMATION (line 1) | const MODAL_APPEAR_ANIMATION = {
FILE: client/src/consts/code.ts
constant MAX_LINES_BEFORE_VIRTUALIZE (line 1) | const MAX_LINES_BEFORE_VIRTUALIZE = 1200;
constant CODE_LINE_HEIGHT (line 24) | const CODE_LINE_HEIGHT = 20;
FILE: client/src/consts/codeStudio.ts
constant TOKEN_LIMIT (line 1) | const TOKEN_LIMIT = 21000;
FILE: client/src/consts/commandBar.ts
constant INITIAL (line 1) | const INITIAL = 'initial';
constant PRIVATE_REPOS (line 2) | const PRIVATE_REPOS = 'private_repos';
constant PUBLIC_REPOS (line 3) | const PUBLIC_REPOS = 'public_repos';
constant LOCAL_REPOS (line 4) | const LOCAL_REPOS = 'local_repos';
constant DOCUMENTATION (line 5) | const DOCUMENTATION = 'documentation';
FILE: client/src/consts/validations.ts
constant EMAIL_REGEX (line 1) | const EMAIL_REGEX = /^[\w-.+]+@([\w-]+\.)+[\w-]{2,8}$/;
FILE: client/src/context/chatsContext.tsx
type ChatContext (line 4) | type ChatContext = {
type ContextType (line 27) | type ContextType = {
FILE: client/src/context/commandBarContext.ts
type FooterValuesContext (line 9) | type FooterValuesContext = {
type HandlersContext (line 13) | type HandlersContext = {
type GeneralContextType (line 24) | type GeneralContextType = {
FILE: client/src/context/deviceContext.ts
type DeviceContextType (line 3) | type DeviceContextType = {
FILE: client/src/context/fileHighlightsContext.ts
type ContextTypeValues (line 4) | type ContextTypeValues = {
type ContextTypeSetters (line 8) | type ContextTypeSetters = {
FILE: client/src/context/localeContext.ts
type ContextType (line 4) | type ContextType = {
FILE: client/src/context/providers/ChatsContextProvider.tsx
type Props (line 4) | type Props = {};
FILE: client/src/context/providers/CommandBarContextProvider.tsx
type Props (line 10) | type Props = {};
FILE: client/src/context/providers/DeviceContextProvider.tsx
type Props (line 4) | type Props = {
FILE: client/src/context/providers/ProjectContextProvider.tsx
type Props (line 29) | type Props = {};
FILE: client/src/context/providers/RepositoriesContextProvider.tsx
type Props (line 25) | type Props = {};
FILE: client/src/context/providers/StudiosContextProvider.tsx
type Props (line 4) | type Props = {};
FILE: client/src/context/providers/TabsContextProvider.tsx
type Props (line 29) | type Props = {};
FILE: client/src/context/providers/UIContextProvider.tsx
type Props (line 26) | type Props = {};
FILE: client/src/context/repositoriesContext.ts
type ContextType (line 4) | type ContextType = {
FILE: client/src/context/studiosContext.tsx
type StudioContext (line 8) | type StudioContext = {
type ContextType (line 36) | type ContextType = {
FILE: client/src/context/tabsContext.tsx
type HandlersContextType (line 10) | type HandlersContextType = {
FILE: client/src/hooks/useCodeSearch.ts
type Props (line 5) | type Props = {
FILE: client/src/hooks/useOnClickOutsideHook.ts
function useOnClickOutside (line 3) | function useOnClickOutside(
FILE: client/src/hooks/useStateRef.ts
function useStateRef (line 3) | function useStateRef(initialState: any) {
FILE: client/src/services/api.ts
constant API_BASE_URL (line 25) | const API_BASE_URL = 'http://localhost:7878/api';
FILE: client/src/services/storage.ts
constant ONBOARDING_DONE_KEY (line 31) | const ONBOARDING_DONE_KEY = 'onboarding_done';
constant USER_DATA_FORM (line 32) | const USER_DATA_FORM = 'user_data_form';
constant THEME (line 33) | const THEME = 'theme';
constant STUDIO_GUIDE_DONE (line 34) | const STUDIO_GUIDE_DONE = 'studio_guide_done';
constant LANGUAGE_KEY (line 35) | const LANGUAGE_KEY = 'language';
constant RIGHT_SIDEBAR_WIDTH_KEY (line 36) | const RIGHT_SIDEBAR_WIDTH_KEY = 'right_sidebar_width';
constant LEFT_SIDEBAR_WIDTH_KEY (line 37) | const LEFT_SIDEBAR_WIDTH_KEY = 'left_nav_width_key';
constant LOADING_STEPS_SHOWN_KEY (line 38) | const LOADING_STEPS_SHOWN_KEY = 'loading_steps_shown';
constant ANSWER_SPEED_KEY (line 39) | const ANSWER_SPEED_KEY = 'answer_speed_key';
constant ACCESS_TOKEN_KEY (line 40) | const ACCESS_TOKEN_KEY = 'access_token';
constant REFRESH_TOKEN_KEY (line 41) | const REFRESH_TOKEN_KEY = 'refresh_token';
constant USER_FONT_SIZE_KEY (line 42) | const USER_FONT_SIZE_KEY = 'user_font_size';
constant PROJECT_KEY (line 43) | const PROJECT_KEY = 'project';
constant RECENT_COMMANDS_KEY (line 44) | const RECENT_COMMANDS_KEY = 'recent_commands';
constant RECENT_FILES_KEY (line 45) | const RECENT_FILES_KEY = 'recent_files';
constant CHAT_INPUT_TYPE_KEY (line 46) | const CHAT_INPUT_TYPE_KEY = 'chat_input_type';
FILE: client/src/types/api.ts
type RangeLine (line 10) | interface RangeLine {
type SearchResponseStats (line 16) | interface SearchResponseStats {
type SearchResponse (line 22) | interface SearchResponse {
type FileSearchResponse (line 33) | interface FileSearchResponse extends SearchResponse {
type GeneralSearchResponse (line 37) | interface GeneralSearchResponse extends SearchResponse {
type DirectorySearchResponse (line 41) | interface DirectorySearchResponse extends SearchResponse {
type SymbolSnippetItem (line 45) | interface SymbolSnippetItem {
type SnippetItem (line 53) | interface SnippetItem {
type Snippet (line 60) | interface Snippet {
type RepoFileNameItem (line 68) | interface RepoFileNameItem {
type Repository (line 73) | interface Repository {
type SearchResponseFile (line 78) | interface SearchResponseFile {
type FlagItem (line 87) | interface FlagItem {
type LangItem (line 92) | interface LangItem {
type CodeItem (line 97) | interface CodeItem {
type RepoItem (line 102) | interface RepoItem {
type FileResItem (line 107) | interface FileResItem {
type DirectoryItem (line 112) | interface DirectoryItem {
type FileItem (line 117) | interface FileItem {
type Directory (line 122) | interface Directory {
type DirectoryFileEntryData (line 129) | interface DirectoryFileEntryData {
type DirectoryEntry (line 136) | interface DirectoryEntry {
type File (line 141) | interface File {
type FileResponse (line 154) | interface FileResponse {
type FiltersItem (line 159) | interface FiltersItem {
type FiltersResponse (line 164) | interface FiltersResponse {
type HoverablesResponse (line 171) | interface HoverablesResponse {
type RangeWithLine (line 178) | interface RangeWithLine extends Range {
type TokenInfoSnippet (line 181) | interface TokenInfoSnippet {
type TokenInfoDataItem (line 188) | interface TokenInfoDataItem {
type TokenInfoItem (line 194) | interface TokenInfoItem {
type RefDefDataItem (line 199) | type RefDefDataItem = {
type TokenInfoResponse (line 222) | interface TokenInfoResponse {
type ConversationShortType (line 229) | type ConversationShortType = {
type AllConversationsResponse (line 236) | type AllConversationsResponse = ConversationShortType[];
type ProcStep (line 238) | type ProcStep = {
type CodeStep (line 243) | type CodeStep = {
type PathStep (line 248) | type PathStep = {
type SearchStepType (line 253) | type SearchStepType = ProcStep | CodeStep | PathStep;
type ConversationType (line 255) | type ConversationType = {
type ConversationExchangeType (line 260) | type ConversationExchangeType = {
type CodeStudioMessageType (line 304) | type CodeStudioMessageType =
type CodeStudioTokenCountType (line 310) | type CodeStudioTokenCountType = {
type CodeStudioType (line 317) | type CodeStudioType = {
type SuggestionsResponse (line 327) | interface SuggestionsResponse {
type NLSnippet (line 340) | interface NLSnippet {
type NLSearchResponse (line 348) | interface NLSearchResponse {
type StudioTemplateType (line 355) | type StudioTemplateType = {
type HistoryConversationTurn (line 363) | type HistoryConversationTurn = Omit<CodeStudioType, 'name'> & {
type TutorialQuestionType (line 368) | type TutorialQuestionType = {
type DocShortType (line 373) | type DocShortType = {
type DocPageType (line 381) | type DocPageType = {
type DocSectionType (line 389) | type DocSectionType = {
type GeneratedCodeDiff (line 402) | type GeneratedCodeDiff = {
type ProjectShortType (line 406) | type ProjectShortType = {
type ProjectFullType (line 413) | type ProjectFullType = ProjectShortType & {
FILE: client/src/types/general.ts
type MenuItemType (line 4) | enum MenuItemType {
type ExtendedMenuItemType (line 12) | enum ExtendedMenuItemType {
type SearchHistoryType (line 18) | type SearchHistoryType = {
type FilterName (line 24) | enum FilterName {
type FilterType (line 31) | type FilterType = {
type SyncStatus (line 45) | enum SyncStatus {
type RepoProvider (line 58) | enum RepoProvider {
type RepoType (line 63) | type RepoType = {
type RepoUi (line 76) | type RepoUi = RepoType & {
type CodeStudioShortType (line 83) | type CodeStudioShortType = {
type TabTypesEnum (line 91) | enum TabTypesEnum {
type FileTabType (line 98) | type FileTabType = {
type ChatTabType (line 112) | type ChatTabType = {
type StudioTabType (line 125) | type StudioTabType = {
type DocTabType (line 133) | type DocTabType = {
type TabType (line 145) | type TabType = FileTabType | ChatTabType | StudioTabType | DocTabType;
type DraggableTabItem (line 147) | type DraggableTabItem = {
type ConversationMessage (line 154) | type ConversationMessage = {
type ChatMessageType (line 168) | enum ChatMessageType {
type ChatMessageAuthor (line 173) | enum ChatMessageAuthor {
type ParsedQueryTypeEnum (line 178) | enum ParsedQueryTypeEnum {
type ParsedQueryType (line 185) | type ParsedQueryType = { type: ParsedQueryTypeEnum; text: string };
type ChatMessageUser (line 187) | type ChatMessageUser = {
type MessageResultCite (line 194) | type MessageResultCite = {
type MessageResultDirectory (line 204) | type MessageResultDirectory = {
type MessageResultNew (line 211) | type MessageResultNew = {
type MessageResultModify (line 218) | type MessageResultModify = {
type ChatLoadingStep (line 234) | type ChatLoadingStep = SearchStepType & {
type FileSystemResult (line 239) | type FileSystemResult = {
type ArticleResult (line 248) | type ArticleResult = {
type ChatMessageServer (line 252) | type ChatMessageServer = {
type ChatMessage (line 265) | type ChatMessage = ChatMessageUser | ChatMessageServer;
type IpynbOutputType (line 267) | type IpynbOutputType = {
type IpynbCellType (line 298) | type IpynbCellType = {
type FileHighlightsType (line 315) | type FileHighlightsType = Record<
type LocaleType (line 320) | type LocaleType = 'en' | 'ja' | 'zhCN' | 'zhTW' | 'es' | 'it';
type StudioConversationMessageAuthor (line 322) | enum StudioConversationMessageAuthor {
type StudioConversationMessage (line 327) | type StudioConversationMessage = {
type DiffChunkType (line 334) | type DiffChunkType = {
type DiffHunkType (line 343) | type DiffHunkType = {
type StudioLeftPanelType (line 348) | enum StudioLeftPanelType {
type StudioRightPanelType (line 356) | enum StudioRightPanelType {
type FileStudioPanelType (line 360) | type FileStudioPanelType = {
type DocsStudioPanelType (line 371) | type DocsStudioPanelType = {
type DiffPanelType (line 384) | type DiffPanelType = {
type StudioLeftPanelDataType (line 394) | type StudioLeftPanelDataType =
type StudioRightPanelDataType (line 403) | type StudioRightPanelDataType = {
type StudioContextFile (line 408) | type StudioContextFile = {
type StudioContextDoc (line 416) | type StudioContextDoc = {
type CommandBarItemCustomType (line 427) | type CommandBarItemCustomType = {
type CommandBarItemGeneralType (line 434) | type CommandBarItemGeneralType = {
type CommandBarItemInvisibleType (line 456) | type CommandBarItemInvisibleType = {
type CommandBarItemType (line 466) | type CommandBarItemType =
type CommandBarSectionType (line 471) | type CommandBarSectionType = {
type CommandBarStepType (line 477) | type CommandBarStepType = {
type CommandBarActiveStepType (line 483) | type CommandBarActiveStepType =
type AddFileToStudioDataType (line 497) | type AddFileToStudioDataType = {
type AddDocToStudioDataType (line 503) | type AddDocToStudioDataType = {
type AddToStudioStepType (line 510) | type AddToStudioStepType = {
type SearchFilesStepType (line 515) | type SearchFilesStepType = {
type SearchDocsStepType (line 520) | type SearchDocsStepType = {
type CommandBarStepEnum (line 525) | enum CommandBarStepEnum {
type SettingSections (line 541) | enum SettingSections {
type ProjectSettingSections (line 546) | enum ProjectSettingSections {
type SettingsTypesSections (line 551) | type SettingsTypesSections = SettingSections | ProjectSettingSections;
type InputEditorTextContent (line 553) | type InputEditorTextContent = {
type InputEditorMentionContent (line 558) | type InputEditorMentionContent = {
type InputEditorContent (line 567) | type InputEditorContent =
type InputValueType (line 571) | type InputValueType = {
type ToastType (line 576) | type ToastType = {
type RepoIndexingStatusType (line 588) | type RepoIndexingStatusType = {
type IndexingStatusType (line 594) | type IndexingStatusType = Record<string, RepoIndexingStatusType>;
type OnboardingStateType (line 596) | type OnboardingStateType = {
type ChatInputType (line 604) | type ChatInputType = 'default' | 'simplified';
FILE: client/src/types/index.ts
type Window (line 3) | interface Window {
type Commit (line 8) | interface Commit {
type FileTreeFileType (line 15) | enum FileTreeFileType {
type RepositoryFile (line 19) | interface RepositoryFile {
type RepositoryBranch (line 29) | interface RepositoryBranch {
type RepoSource (line 37) | enum RepoSource {
type Repository (line 42) | interface Repository {
type Theme (line 55) | type Theme = 'system' | 'dark' | 'light' | 'black';
FILE: client/src/types/prism.ts
type PrismToken (line 3) | type PrismToken = {
type Token (line 9) | type Token = {
FILE: client/src/types/results.ts
type BaseSymbolType (line 5) | type BaseSymbolType =
type ExtendedSymbolType (line 28) | type ExtendedSymbolType =
type SymbolType (line 45) | type SymbolType = BaseSymbolType | ExtendedSymbolType | 'multiple';
type ResultItemType (line 47) | enum ResultItemType {
type BaseResultType (line 55) | type BaseResultType = {
type CodeResult (line 61) | interface CodeResult extends BaseResultType {
type FlagResult (line 69) | interface FlagResult {
type LangResult (line 74) | interface LangResult {
type RepoResult (line 79) | interface RepoResult extends BaseResultType {
type FileResult (line 87) | interface FileResult extends BaseResultType {
type SnippetSymbol (line 96) | interface SnippetSymbol {
type Snippet (line 101) | interface Snippet {
type HighlightMap (line 108) | type HighlightMap = {
type TokensLine (line 115) | type TokensLine = {
type Range (line 120) | type Range = { start: number; end: number };
type ResultType (line 122) | type ResultType = CodeResult | RepoResult | FileResult;
type SuggestionType (line 123) | type SuggestionType = ResultType | FlagResult | LangResult;
type FullResult (line 125) | type FullResult = {
type DirectoryResult (line 137) | type DirectoryResult = {
type TokenInfoItem (line 148) | type TokenInfoItem = {
type TokenInfoFile (line 154) | type TokenInfoFile = {
type TokenInfoType (line 159) | type TokenInfoType = 'reference' | 'definition';
type TokenInfo (line 161) | type TokenInfo = {
type TokenInfoWrapped (line 166) | type TokenInfoWrapped = {
type ResultClick (line 177) | type ResultClick = (
type FileTreeItem (line 183) | type FileTreeItem = RepositoryFile & {
type MentionOptionType (line 188) | type MentionOptionType = {
FILE: client/src/utils/index.ts
function groupReposByParentFolder (line 165) | function groupReposByParentFolder(repos: RepoType[]): RepoUi[] {
function getLineNumber (line 314) | function getLineNumber(element: HTMLElement | null) {
function getSelectionLines (line 324) | function getSelectionLines(element: HTMLElement): null | number {
function humanFileSize (line 343) | function humanFileSize(
function humanNumber (line 371) | function humanNumber(num: number) {
function mergeRanges (line 396) | function mergeRanges(ranges: [number, number][]): [number, number][] {
function splitUserInputAfterAutocomplete (line 423) | function splitUserInputAfterAutocomplete(
function concatenateParsedQuery (line 459) | function concatenateParsedQuery(query: ParsedQueryType[]) {
FILE: client/src/utils/mappers.ts
function mapConversation (line 72) | function mapConversation(
function filterOutDuplicates (line 81) | function filterOutDuplicates<T>(arr: T[], key: keyof T): T[] {
FILE: client/src/utils/prism.ts
type LineEndings (line 45) | type LineEndings = 'CRLF' | 'LF';
function getLineEnding (line 228) | function getLineEnding(content: string): LineEndings | undefined {
FILE: client/src/utils/requestUtils.ts
function polling (line 1) | function polling(func: () => Promise<any>, interval: number): number {
FILE: client/src/utils/scrollUtils.ts
type ReactWindowProps (line 3) | type ReactWindowProps = {
FILE: client/src/utils/textSearch.ts
constant HIGHLIGHT_CLASSNAME (line 1) | const HIGHLIGHT_CLASSNAME = 'search-highlight';
constant ACTIVE_HIGHLIGHT_CLASSNAME (line 2) | const ACTIVE_HIGHLIGHT_CLASSNAME = 'search-highlight-active';
function unmark (line 4) | function unmark(parentNode?: HTMLElement): void {
function joinTextNodes (line 18) | function joinTextNodes(parentNode: HTMLElement): void {
function markNode (line 45) | function markNode(node: HTMLElement, regex: RegExp): void {
FILE: server/bleep/build.rs
type Language (line 11) | struct Language {
function main (line 15) | fn main() {
function set_index_version (line 22) | fn set_index_version() {
function process_languages (line 69) | fn process_languages() {
function determine_embedder_backend (line 102) | fn determine_embedder_backend() {
function is_apple_silicon (line 110) | fn is_apple_silicon() -> bool {
FILE: server/bleep/migrations/20230424095042_conversations.sql
type conversations (line 1) | CREATE TABLE conversations (
FILE: server/bleep/migrations/20230613143506_file-cache.sql
type file_cache (line 2) | CREATE TABLE file_cache (
type chunk_cache (line 7) | CREATE TABLE chunk_cache (
FILE: server/bleep/migrations/20230616140930_query-log.sql
type query_log (line 1) | CREATE TABLE query_log (
FILE: server/bleep/migrations/20230821131141_code_studio.sql
type studios (line 1) | CREATE TABLE studios (
FILE: server/bleep/migrations/20230831165918_templates.sql
type templates (line 1) | CREATE TABLE templates (
FILE: server/bleep/migrations/20230831170927_code_studio_uuid_blob.sql
type studios (line 4) | CREATE TABLE studios (
FILE: server/bleep/migrations/20230831184906_code_studio_history.sql
type studios (line 3) | CREATE TABLE studios (
type studio_snapshots (line 10) | CREATE TABLE studio_snapshots (
FILE: server/bleep/migrations/20230907154037_studio_int_id.sql
type studios (line 5) | CREATE TABLE studios (
type studio_snapshots (line 12) | CREATE TABLE studio_snapshots (
FILE: server/bleep/migrations/20230912084309_nullable_studio_name.sql
type studios (line 5) | CREATE TABLE studios (
type studio_snapshots (line 11) | CREATE TABLE studio_snapshots (
FILE: server/bleep/migrations/20230915091923_tutorial-questions.sql
type tutorial_questions (line 1) | CREATE TABLE tutorial_questions (
FILE: server/bleep/migrations/20230919100529_code_studio_docs.sql
type docs (line 1) | CREATE TABLE docs (
FILE: server/bleep/migrations/20231122012638_projects.sql
type projects (line 7) | CREATE TABLE projects (
type studios (line 29) | CREATE TABLE studios (
type studio_snapshots (line 35) | CREATE TABLE studio_snapshots (
type conversations (line 70) | CREATE TABLE conversations (
type project_repos (line 86) | CREATE TABLE project_repos (
type rust_migrations (line 102) | CREATE TABLE rust_migrations (
FILE: server/bleep/migrations/20231201200442_project_docs.sql
type project_docs (line 1) | CREATE TABLE project_docs (
FILE: server/bleep/src/agent.rs
constant MAX_STEPS (line 22) | const MAX_STEPS: usize = 10;
type Error (line 42) | pub enum Error {
type Agent (line 47) | pub struct Agent {
method complete (line 108) | pub fn complete(&mut self, success: bool) {
method update (line 119) | async fn update(&mut self, update: Update) -> Result<()> {
method last_exchange (line 131) | fn last_exchange(&self) -> &Exchange {
method last_exchange_mut (line 138) | fn last_exchange_mut(&mut self) -> &mut Exchange {
method paths (line 145) | fn paths(&self) -> impl Iterator<Item = &RepoPath> {
method get_path_alias (line 152) | fn get_path_alias(&mut self, repo_path: &RepoPath) -> usize {
method relevant_repos (line 165) | fn relevant_repos(&self) -> Vec<RepoRef> {
method step (line 179) | pub async fn step(&mut self, action: Action) -> Result<Option<Action>> {
method history (line 253) | fn history(&self) -> Result<Vec<api::Message>> {
method semantic_search (line 329) | async fn semantic_search(
method get_file_content (line 388) | async fn get_file_content(
method fuzzy_path_search (line 403) | async fn fuzzy_path_search<'a>(
method store (line 441) | fn store(&mut self) -> impl Future<Output = ()> {
type ExchangeState (line 66) | pub enum ExchangeState {
type AgentSemanticSearchParams (line 72) | pub struct AgentSemanticSearchParams<'a> {
method drop (line 88) | fn drop(&mut self) {
function trim_history (line 465) | fn trim_history(
type Action (line 511) | pub enum Action {
method deserialize_gpt (line 549) | fn deserialize_gpt(call: &api::FunctionCall) -> Result<Self> {
FILE: server/bleep/src/agent/exchange.rs
type RepoPath (line 7) | pub struct RepoPath {
method fmt (line 13) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Exchange (line 23) | pub struct Exchange {
method new (line 49) | pub fn new(id: uuid::Uuid, query: SemanticQuery<'static>) -> Self {
method apply_update (line 61) | pub fn apply_update(&mut self, update: Update) {
method query (line 83) | pub fn query(&self) -> Option<String> {
method answer (line 90) | pub fn answer(&self) -> Option<&str> {
method compressed (line 98) | pub fn compressed(mut self) -> Self {
type SearchStep (line 114) | pub enum SearchStep {
method compressed (line 134) | fn compressed(&self) -> Self {
method get_response (line 152) | pub fn get_response(&self) -> String {
type CodeChunk (line 162) | pub struct CodeChunk {
method is_empty (line 176) | pub fn is_empty(&self) -> bool {
method fmt (line 182) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
type FocusedChunk (line 192) | pub struct FocusedChunk {
type Update (line 199) | pub enum Update {
FILE: server/bleep/src/agent/model.rs
type LLMModel (line 5) | pub struct LLMModel {
method deserialize (line 73) | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
constant GPT_3_5_TURBO_FINETUNED (line 25) | pub const GPT_3_5_TURBO_FINETUNED: LLMModel = LLMModel {
constant GPT_4_TURBO_MAX_TOKENS (line 35) | const GPT_4_TURBO_MAX_TOKENS: usize = 128_000;
constant ACTUAL_MAX_TOKENS (line 37) | const ACTUAL_MAX_TOKENS: usize = 24_000;
constant HEADROOM_CORRECTION (line 40) | const HEADROOM_CORRECTION: usize = GPT_4_TURBO_MAX_TOKENS - ACTUAL_MAX_T...
constant GPT_4_TURBO_24K (line 42) | pub const GPT_4_TURBO_24K: LLMModel = LLMModel {
constant GPT_4 (line 51) | pub const GPT_4: LLMModel = LLMModel {
type Err (line 61) | type Err = ();
method from_str (line 62) | fn from_str(s: &str) -> Result<Self, Self::Err> {
FILE: server/bleep/src/agent/prompts.rs
function functions (line 5) | pub fn functions(add_proc: bool) -> serde_json::Value {
function system (line 86) | pub fn system<'a>(paths: impl IntoIterator<Item = &'a RepoPath>) -> Stri...
function answer_article_prompt (line 132) | pub fn answer_article_prompt(context: &str) -> String {
function answer_article_prompt_finetuned (line 192) | pub fn answer_article_prompt_finetuned(context: &str) -> String {
function studio_article_prompt (line 251) | pub fn studio_article_prompt(context: &str) -> String {
function studio_name_prompt (line 288) | pub fn studio_name_prompt(context_json: &str, messages_json: &str) -> St...
function studio_diff_prompt (line 317) | pub fn studio_diff_prompt(context_formatted: &str) -> String {
function studio_diff_regen_hunk_prompt (line 394) | pub fn studio_diff_regen_hunk_prompt(context_formatted: &str) -> String {
function symbol_classification_prompt (line 406) | pub fn symbol_classification_prompt(snippets: &str) -> String {
function hypothetical_document_prompt (line 423) | pub fn hypothetical_document_prompt(query: &str) -> String {
function try_parse_hypothetical_documents (line 449) | pub fn try_parse_hypothetical_documents(document: &str) -> Vec<String> {
function test_parse_hypothetical_document (line 463) | fn test_parse_hypothetical_document() {
FILE: server/bleep/src/agent/symbol.rs
type ChunkWithHoverableSymbols (line 11) | pub struct ChunkWithHoverableSymbols {
method extract_hoverable_symbols (line 25) | pub async fn extract_hoverable_symbols(
method expand_symbol_into_chunks (line 92) | pub async fn expand_symbol_into_chunks(&self, symbol: Symbol) -> Vec<Cod...
method filter_symbols (line 120) | pub async fn filter_symbols(
method get_related_chunks (line 267) | pub async fn get_related_chunks(&mut self, chunks: Vec<CodeChunk>) -> Re...
type HoverableSymbol (line 326) | pub struct HoverableSymbol {
type Symbol (line 331) | pub struct Symbol {
type SymbolError (line 337) | pub enum SymbolError {
FILE: server/bleep/src/agent/tools/answer.rs
constant CHUNK_MERGE_DISTANCE (line 15) | const CHUNK_MERGE_DISTANCE: usize = 20;
method answer (line 19) | pub async fn answer(&mut self, aliases: &[usize]) -> Result<()> {
method answer_context (line 92) | async fn answer_context(&mut self, aliases: &[usize]) -> Result<String> {
method utter_history (line 189) | fn utter_history(&self) -> impl Iterator<Item = llm::client::api::Messag...
method code_chunks (line 217) | fn code_chunks(&self) -> impl Iterator<Item = CodeChunk> + '_ {
method canonicalize_code_chunks (line 225) | async fn canonicalize_code_chunks(&mut self, aliases: &[usize]) -> Vec<C...
function trim_utter_history (line 394) | fn trim_utter_history(
function merge_overlapping (line 419) | fn merge_overlapping(a: &mut Range<usize>, b: Range<usize>) -> Option<Ra...
function test_trimming_utter_history (line 437) | fn test_trimming_utter_history() {
FILE: server/bleep/src/agent/tools/code.rs
method code_search (line 15) | pub async fn code_search(&mut self, query: &str) -> Result<String> {
method hyde (line 133) | async fn hyde(&self, query: &str) -> Result<Vec<String>> {
FILE: server/bleep/src/agent/tools/path.rs
method path_search (line 16) | pub async fn path_search(&mut self, query: &String) -> Result<String> {
FILE: server/bleep/src/agent/tools/proc.rs
method process_files (line 15) | pub async fn process_files(&mut self, query: &str, aliases: &[usize]) ->...
FILE: server/bleep/src/agent/transcoder.rs
function decode (line 19) | pub fn decode(llm_message: &str) -> String {
function offset_embedded_link_ranges (line 55) | fn offset_embedded_link_ranges<'a>(element: &'a comrak::nodes::AstNode<'...
function encode (line 104) | pub fn encode(markdown: &str) -> String {
function encode_summarized (line 183) | pub fn encode_summarized(markdown: &str, model: &str) -> Result<String> {
function sanitize (line 189) | fn sanitize(article: &str) -> String {
function fixup_xml_code (line 194) | fn fixup_xml_code(xml: &str) -> Cow<str> {
function xml_to_markdown (line 274) | fn xml_to_markdown(xml: &str) -> Result<String> {
type CodeChunk (line 283) | enum CodeChunk {
method to_markdown (line 318) | fn to_markdown(&self) -> String {
function deserialize_lineno (line 304) | fn deserialize_lineno<'a, D: serde::Deserializer<'a>>(de: D) -> Result<O...
function xml_for_each (line 387) | fn xml_for_each(article: &str, f: impl Fn(&str) -> Option<String>) -> St...
function try_trim_code_xml (line 428) | fn try_trim_code_xml(xml: &str) -> Result<String> {
function limit_tokens (line 437) | pub fn limit_tokens(text: &str, bpe: CoreBPE, max_tokens: usize) -> &str {
function test_trim_code (line 459) | fn test_trim_code() {
function test_trim_code_with_regular_xml (line 503) | fn test_trim_code_with_regular_xml() {
function test_fixup_quoted_code (line 551) | fn test_fixup_quoted_code() {
function test_fixup_generated_code (line 580) | fn test_fixup_generated_code() {
function test_sanitize_article (line 603) | fn test_sanitize_article() {
function test_sanitize_article_partial_generation (line 668) | fn test_sanitize_article_partial_generation() {
function test_decode_2 (line 689) | fn test_decode_2() {
function test_decode_partial_xml (line 744) | fn test_decode_partial_xml() {
function test_decode_partial_xml_no_path (line 770) | fn test_decode_partial_xml_no_path() {
function test_sanitize_multi_blocks (line 800) | fn test_sanitize_multi_blocks() {
function test_decode_partial_xml_empty_line_number (line 829) | fn test_decode_partial_xml_empty_line_number() {
function test_encode (line 858) | fn test_encode() {
function test_encode_summarized (line 908) | fn test_encode_summarized() {
function test_xml_empty_lines (line 941) | fn test_xml_empty_lines() {
function test_limit_tokens (line 981) | fn test_limit_tokens() {
function test_decode_erroneous_endlist (line 997) | fn test_decode_erroneous_endlist() {
function test_decode_indexing_base (line 1139) | fn test_decode_indexing_base() {
function test_encode_indexing_base (line 1156) | fn test_encode_indexing_base() {
function test_bug_short_circuit_link_offset (line 1174) | fn test_bug_short_circuit_link_offset() {
function test_markdown_wrapped_generated_xml_block_info_string (line 1200) | fn test_markdown_wrapped_generated_xml_block_info_string() {
function test_markdown_wrapped_quoted_xml_block (line 1227) | fn test_markdown_wrapped_quoted_xml_block() {
function test_xml_code_with_markdown_doc_comment (line 1261) | fn test_xml_code_with_markdown_doc_comment() {
function test_xml_code_with_markdown_doc_comment_meta (line 1300) | fn test_xml_code_with_markdown_doc_comment_meta() {
FILE: server/bleep/src/background.rs
type ProgressStream (line 23) | type ProgressStream = tokio::sync::broadcast::Sender<Progress>;
function rayon_pool (line 28) | pub fn rayon_pool() -> &'static ThreadPool {
type Progress (line 35) | pub struct Progress {
type ProgressEvent (line 48) | pub enum ProgressEvent {
type Task (line 53) | type Task = Pin<Box<dyn Future<Output = ()> + Send + Sync>>;
type SyncQueue (line 55) | pub struct SyncQueue {
method start (line 137) | pub fn start(config: Arc<Configuration>) -> Self {
method broadcast (line 190) | pub fn broadcast(&self) -> tokio::sync::broadcast::Sender<Progress> {
method subscribe (line 194) | pub fn subscribe(&self) -> tokio::sync::broadcast::Receiver<Progress> {
method read_queue (line 198) | pub(crate) async fn read_queue(&self) -> Vec<QueuedRepoStatus> {
type BackgroundExecutor (line 66) | pub struct BackgroundExecutor {
method start (line 71) | fn start(config: Arc<Configuration>) -> Self {
method spawn (line 117) | fn spawn<T>(&self, job: impl Future<Output = T> + Send + Sync + 'stati...
method wait_for (line 126) | pub async fn wait_for<T: Send + Sync + 'static>(
type QueuedRepoStatus (line 223) | pub(crate) struct QueuedRepoStatus {
type QueueState (line 231) | pub(crate) enum QueueState {
type BoundSyncQueue (line 236) | pub struct BoundSyncQueue(pub(crate) Application);
method enqueue (line 239) | pub(crate) async fn enqueue(self, config: SyncConfig) {
method enqueue_all (line 251) | pub(crate) async fn enqueue_all(self, repositories: Vec<RepoRef>) -> u...
method block_until_synced (line 274) | pub(crate) async fn block_until_synced(self, reporef: RepoRef) -> anyh...
method remove (line 285) | pub(crate) async fn remove(self, reporef: RepoRef) -> Option<()> {
method cancel (line 312) | pub(crate) async fn cancel(&self, reporef: RepoRef) {
method startup_scan (line 323) | pub(crate) async fn startup_scan(self) -> anyhow::Result<()> {
FILE: server/bleep/src/background/control.rs
constant GIT_REPORT_DELAY (line 15) | const GIT_REPORT_DELAY: Duration = Duration::from_secs(3);
type ControlEvent (line 17) | enum ControlEvent {
type SyncPipes (line 25) | pub struct SyncPipes {
method new (line 46) | pub(super) fn new(
method git_sync_progress (line 62) | pub(crate) fn git_sync_progress(&self) -> GitSync {
method index_percent (line 84) | pub(crate) fn index_percent(&self, current: u8) {
method status (line 93) | pub(crate) fn status(&self, new: SyncStatus) {
method is_interrupted (line 102) | pub(crate) fn is_interrupted(&self) -> Arc<AtomicBool> {
method is_cancelled (line 106) | pub(crate) fn is_cancelled(&self) -> bool {
method is_removed (line 111) | pub(crate) fn is_removed(&self) -> bool {
method cancel (line 116) | pub(crate) fn cancel(&self) {
method remove (line 121) | pub(crate) fn remove(&self) {
type GitSync (line 128) | pub(crate) struct GitSync {
method init (line 158) | fn init(
method set_name (line 171) | fn set_name(&mut self, name: String) {
method name (line 175) | fn name(&self) -> Option<String> {
method id (line 179) | fn id(&self) -> gix::progress::Id {
method message (line 183) | fn message(&self, level: gix::progress::MessageLevel, message: String) {
method set (line 189) | fn set(&self, step: gix::progress::prodash::progress::Step) {
method step (line 203) | fn step(&self) -> gix::progress::prodash::progress::Step {
method inc_by (line 207) | fn inc_by(&self, step: gix::progress::prodash::progress::Step) {
method counter (line 241) | fn counter(&self) -> gix::progress::StepShared {
type SubProgress (line 250) | type SubProgress = Self;
method add_child (line 252) | fn add_child(&mut self, name: impl Into<String>) -> Self::SubProgress {
method add_child_with_id (line 256) | fn add_child_with_id(
FILE: server/bleep/src/background/notifyqueue.rs
type NotifyQueue (line 11) | pub(crate) struct NotifyQueue {
method push_front (line 26) | pub(crate) async fn push_front(&self, item: Arc<SyncHandle>) {
method push (line 34) | pub(crate) async fn push(&self, item: Arc<SyncHandle>) {
method pop_if (line 42) | pub(super) async fn pop_if(&self, pred: impl Fn(&SyncHandle) -> bool) ...
method get_list (line 57) | pub(super) async fn get_list(&self) -> Vec<Arc<SyncHandle>> {
method contains (line 61) | pub(super) async fn contains(&self, reporef: &RepoRef) -> bool {
method remove (line 69) | pub(super) async fn remove(&self, reporef: RepoRef) {
method default (line 17) | fn default() -> Self {
FILE: server/bleep/src/background/sync.rs
type SyncHandle (line 20) | pub struct SyncHandle {
method new (line 129) | async fn new(config: SyncConfig) -> Arc<Self> {
method notify_done (line 222) | pub(super) fn notify_done(&self) -> flume::Receiver<SyncStatus> {
method run (line 227) | pub(super) async fn run(&self, _permit: OwnedSemaphorePermit) -> Resul...
method index (line 304) | async fn index(&self) -> Result<Either<SyncStatus, Arc<RepoMetadata>>> {
method delete_repo (line 365) | async fn delete_repo(
method git_sync (line 385) | async fn git_sync(&self) -> Result<SyncStatus> {
method delete_repo_indexes (line 483) | async fn delete_repo_indexes(
method set_status (line 512) | pub(crate) fn set_status(
method sync_lock (line 549) | async fn sync_lock(&self) -> std::result::Result<Repository, SyncError> {
type Result (line 32) | type Result<T> = std::result::Result<T, SyncError>;
type SyncError (line 34) | pub(super) enum SyncError {
method eq (line 70) | fn eq(&self, other: &Self) -> bool {
method drop (line 76) | fn drop(&mut self) {
type SyncConfig (line 101) | pub struct SyncConfig {
method new (line 109) | pub fn new(app: impl Borrow<Application>, reporef: RepoRef) -> SyncCon...
method shallow (line 118) | pub fn shallow(mut self, shallow: bool) -> Self {
method into_handle (line 123) | pub async fn into_handle(self) -> Arc<SyncHandle> {
FILE: server/bleep/src/bin/bleep.rs
function main (line 5) | async fn main() -> Result<()> {
FILE: server/bleep/src/cache.rs
type FreshValue (line 27) | pub struct FreshValue<T> {
function fresh_default (line 34) | fn fresh_default() -> Self {
method eq (line 46) | fn eq(&self, other: &Self) -> bool {
function stale (line 52) | fn stale(value: T) -> Self {
function from (line 61) | fn from(value: T) -> Self {
type FileCacheSnapshot (line 69) | pub struct FileCacheSnapshot<'a> {
type CacheKeys (line 92) | pub struct CacheKeys(String, String);
method new (line 95) | pub fn new(semantic: impl Into<String>, tantivy: impl Into<String>) ->...
method tantivy (line 99) | pub fn tantivy(&self) -> &str {
method semantic (line 103) | pub fn semantic(&self) -> &str {
function parent (line 109) | pub(crate) fn parent(&'a self) -> &'a FileCache {
function is_fresh (line 114) | pub(crate) fn is_fresh(&self, keys: &CacheKeys) -> bool {
type Target (line 133) | type Target = scc::HashMap<CacheKeys, FreshValue<()>>;
method deref (line 135) | fn deref(&self) -> &Self::Target {
type FileCache (line 147) | pub struct FileCache {
method new (line 167) | pub(crate) fn new(db: SqlDb, semantic: Semantic) -> Self {
method reset (line 175) | pub(crate) async fn reset(&'a self, repo_pool: &RepositoryPool) -> any...
method retrieve (line 191) | pub(crate) async fn retrieve(&'a self, reporef: &'a RepoRef) -> FileCa...
method synchronize (line 223) | pub(crate) async fn synchronize(
method delete (line 303) | pub(crate) async fn delete(&self, reporef: &RepoRef) -> anyhow::Result...
method process_embedding_queue (line 313) | pub fn process_embedding_queue(&self) -> anyhow::Result<()> {
method batched_embed_or_flush_queue (line 325) | async fn batched_embed_or_flush_queue(&self, flush: bool) -> anyhow::R...
method embed_queued_points (line 343) | async fn embed_queued_points(&self, flush: bool) -> Result<Vec<PointSt...
method process_semantic (line 403) | pub(crate) async fn process_semantic(
method delete_files (line 447) | async fn delete_files(
method delete_chunks (line 465) | async fn delete_chunks(
method chunks_for_file (line 482) | async fn chunks_for_file(&'a self, reporef: &'a RepoRef, key: &'a Cach...
type InsertStats (line 154) | pub struct InsertStats {
method empty (line 161) | fn empty() -> Self {
type ChunkCache (line 498) | pub struct ChunkCache<'a> {
function for_file (line 510) | async fn for_file(
function update_or_embed (line 546) | fn update_or_embed(&self, data: &'a str, payload: Payload) -> anyhow::Re...
function commit (line 596) | pub async fn commit(self) -> anyhow::Result<InsertStats> {
function commit_inserts (line 619) | async fn commit_inserts(
function commit_deletes (line 641) | async fn commit_deletes(
function commit_branch_updates (line 685) | async fn commit_branch_updates(
function derive_chunk_uuid (line 739) | fn derive_chunk_uuid(&self, data: &str, payload: &Payload) -> String {
FILE: server/bleep/src/collector/bytes_filter.rs
type BytesFilterCollector (line 7) | pub struct BytesFilterCollector<TCollector, TPredicate>
function new (line 22) | pub fn new(
type Fruit (line 42) | type Fruit = TCollector::Fruit;
type Child (line 44) | type Child = BytesFilterSegmentCollector<TCollector::Child, TPredicate>;
method for_segment (line 46) | fn for_segment(
method requires_scoring (line 74) | fn requires_scoring(&self) -> bool {
method merge_fruits (line 78) | fn merge_fruits(
type BytesFilterSegmentCollector (line 86) | pub struct BytesFilterSegmentCollector<TSegmentCollector, TPredicate>
type Fruit (line 101) | type Fruit = TSegmentCollector::Fruit;
method collect (line 103) | fn collect(&mut self, doc: u32, score: Score) {
method harvest (line 118) | fn harvest(self) -> <TSegmentCollector as SegmentCollector>::Fruit {
FILE: server/bleep/src/collector/frequency.rs
type FrequencyCollector (line 10) | pub struct FrequencyCollector(pub Field);
type Fruit (line 13) | type Fruit = HashMap<Vec<u8>, usize>;
type Child (line 15) | type Child = FrequencySegmentCollector;
method for_segment (line 17) | fn for_segment(
method requires_scoring (line 30) | fn requires_scoring(&self) -> bool {
method merge_fruits (line 35) | fn merge_fruits(&self, segments: Vec<Self::Fruit>) -> tantivy::Result<Se...
type FrequencySegmentCollector (line 46) | pub struct FrequencySegmentCollector {
type Fruit (line 52) | type Fruit = HashMap<Vec<u8>, usize>;
method collect (line 54) | fn collect(&mut self, doc: u32, _score: Score) {
method harvest (line 62) | fn harvest(self) -> <Self as SegmentCollector>::Fruit {
FILE: server/bleep/src/collector/group.rs
type Group (line 10) | pub struct Group {
type Groups (line 15) | pub struct Groups {
method non_zero_count (line 20) | fn non_zero_count(self) -> Option<Self> {
type GroupCollector (line 30) | pub struct GroupCollector {
method with_field (line 43) | pub fn with_field(field: Field) -> Self {
method with_group_size (line 51) | pub fn with_group_size(self, group_size: usize) -> Self {
method with_limit (line 55) | pub fn with_limit(self, limit: usize) -> Self {
type Fruit (line 61) | type Fruit = Option<Groups>;
type Child (line 62) | type Child = GroupSegmentCollector;
method for_segment (line 64) | fn for_segment(
method requires_scoring (line 81) | fn requires_scoring(&self) -> bool {
method merge_fruits (line 86) | fn merge_fruits(&self, segment_groups: Vec<Option<Groups>>) -> tantivy::...
type GroupSegmentCollector (line 109) | pub struct GroupSegmentCollector {
type Fruit (line 117) | type Fruit = Option<Groups>;
method collect (line 119) | fn collect(&mut self, doc: u32, _score: Score) {
method harvest (line 138) | fn harvest(self) -> <Self as SegmentCollector>::Fruit {
FILE: server/bleep/src/commits.rs
constant COMMIT_EXCLUDE_EXTENSIONS (line 21) | const COMMIT_EXCLUDE_EXTENSIONS: [&str; 7] = ["md", "txt", "json", "toml...
type DiffStat (line 24) | pub struct DiffStat {
type Question (line 36) | pub struct Question {
type NoneError (line 42) | struct NoneError;
method fmt (line 45) | fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method source (line 51) | fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
type CommitIterator (line 56) | struct CommitIterator<'a> {
type Item (line 62) | type Item = DiffStat;
method next (line 64) | fn next(&mut self) -> Option<Self::Item> {
function add_diff (line 173) | fn add_diff(
function expand_commits_to_questions (line 206) | pub async fn expand_commits_to_questions(
function latest_commits (line 273) | pub fn latest_commits(
function generate_question (line 310) | async fn generate_question(
function classify_commit (line 338) | async fn classify_commit(llm_gateway: &llm::client::Client, commit: &Dif...
function get_question (line 368) | async fn get_question(llm_gateway: &llm::client::Client, commit: &DiffSt...
function get_tag (line 404) | async fn get_tag(llm_gateway: &llm::client::Client, question: &str) -> R...
function generate_tutorial_questions (line 438) | pub async fn generate_tutorial_questions(
FILE: server/bleep/src/config.rs
type Configuration (line 14) | pub struct Configuration {
method read (line 140) | pub fn read(file: impl AsRef<Path>) -> Result<Self> {
method from_cli (line 145) | pub fn from_cli() -> Result<Self> {
method index_path (line 149) | pub fn index_path(&self, name: impl AsRef<Path>) -> impl AsRef<Path> {
method cli_overriding_config_file (line 153) | pub fn cli_overriding_config_file() -> Result<Self> {
method merge (line 172) | pub fn merge(a: Self, b: Self) -> Self {
method log_dir (line 237) | pub fn log_dir(&self) -> PathBuf {
function serialize_secret_opt_str (line 242) | pub fn serialize_secret_opt_str<S>(
function serialize_secret_str (line 255) | pub fn serialize_secret_str<S>(secstr: &SecretString, ser: S) -> Result<...
function default_index_dir (line 265) | fn default_index_dir() -> PathBuf {
function default_model_dir (line 272) | fn default_model_dir() -> PathBuf {
function default_collection_name (line 276) | fn default_collection_name() -> String {
function default_parallelism (line 280) | pub fn default_parallelism() -> usize {
function minimum_parallelism (line 284) | pub const fn minimum_parallelism() -> usize {
function default_buffer_size (line 288) | pub const fn default_buffer_size() -> usize {
function default_repo_buffer_size (line 292) | const fn default_repo_buffer_size() -> usize {
function default_port (line 296) | const fn default_port() -> u16 {
function default_host (line 300) | fn default_host() -> String {
function default_qdrant_url (line 304) | fn default_qdrant_url() -> String {
function default_max_chunk_tokens (line 308) | fn default_max_chunk_tokens() -> usize {
function interactive_batch_size (line 312) | fn interactive_batch_size() -> NonZeroUsize {
FILE: server/bleep/src/db.rs
type SqlDb (line 13) | pub type SqlDb = Arc<SqlitePool>;
function initialize (line 16) | pub async fn initialize(config: &Configuration) -> Result<SqlitePool> {
function connect (line 39) | async fn connect(url: &str) -> Result<SqlitePool> {
function reset (line 59) | fn reset(data_dir: &str) -> Result<()> {
function logical_migrations (line 65) | async fn logical_migrations(db: &SqlitePool) -> Result<()> {
function project_migration (line 70) | async fn project_migration(db: &SqlitePool) -> Result<()> {
function fixup_exchange (line 167) | fn fixup_exchange(exchanges: &mut serde_json::Value, repo_ref: &str) -> ...
function studio_context_repos (line 231) | fn studio_context_repos(context: &serde_json::Value) -> Option<Vec<&str>> {
function studio_doc_context_doc_ids (line 239) | fn studio_doc_context_doc_ids(doc_context: &serde_json::Value) -> Option...
FILE: server/bleep/src/db/query_log.rs
type QueryLog (line 3) | pub struct QueryLog<'a> {
function new (line 8) | pub fn new(db: &'a super::SqlitePool) -> Self {
function insert (line 12) | pub async fn insert(&self, raw: &str) -> anyhow::Result<()> {
function since (line 20) | pub async fn since(&self, cutoff: DateTime<Utc>) -> anyhow::Result<Vec<S...
function prune (line 32) | pub async fn prune(&self, cutoff: DateTime<Utc>) -> anyhow::Result<()> {
FILE: server/bleep/src/env.rs
type Feature (line 4) | pub(crate) enum Feature {
type EnvironmentInner (line 32) | enum EnvironmentInner {
type Environment (line 66) | pub struct Environment(EnvironmentInner);
method server (line 69) | pub fn server() -> Self {
method private_server (line 73) | pub fn private_server() -> Self {
method insecure_local (line 77) | pub fn insecure_local() -> Self {
method allow (line 81) | pub(crate) fn allow(&self, f: Feature) -> bool {
method is_cloud_instance (line 85) | pub fn is_cloud_instance(&self) -> bool {
FILE: server/bleep/src/indexes.rs
type GlobalWriteHandleRef (line 32) | pub type GlobalWriteHandleRef<'a> = [IndexWriteHandle<'a>];
type GlobalWriteHandle (line 34) | pub struct GlobalWriteHandle<'a> {
type Target (line 40) | type Target = GlobalWriteHandleRef<'a>;
method deref (line 42) | fn deref(&self) -> &Self::Target {
function rollback (line 48) | pub(crate) fn rollback(self) -> Result<()> {
function commit (line 56) | pub(crate) fn commit(self) -> Result<()> {
function index (line 64) | pub(crate) async fn index(
type Indexes (line 79) | pub struct Indexes {
method new (line 88) | pub async fn new(
method reset_databases (line 117) | pub fn reset_databases(config: &Configuration) -> Result<()> {
method writers (line 131) | pub async fn writers(&self) -> Result<GlobalWriteHandle<'_>> {
type Indexable (line 145) | pub trait Indexable: Send + Sync {
method index_repository (line 147) | async fn index_repository(
method delete_by_repo (line 155) | fn delete_by_repo(&self, writer: &IndexWriter, repo: &Repository);
method schema (line 158) | fn schema(&self) -> Schema;
type DocumentRead (line 162) | pub trait DocumentRead: Send + Sync {
method query_matches (line 167) | fn query_matches(&self, query: &Query<'_>) -> bool;
method compile (line 170) | fn compile<'a, I>(
method read_document (line 180) | fn read_document(&self, schema: &Self::Schema, doc: Document) -> Self:...
type IndexWriteHandle (line 183) | pub struct IndexWriteHandle<'a> {
function delete (line 190) | pub fn delete(&self, repo: &Repository) {
function index (line 194) | pub async fn index(
function commit (line 205) | pub fn commit(&mut self) -> Result<()> {
function rollback (line 212) | pub fn rollback(&mut self) -> Result<()> {
type Indexer (line 221) | pub struct Indexer<T> {
function write_handle (line 230) | fn write_handle(&self) -> Result<IndexWriteHandle<'_>> {
function init_index (line 240) | fn init_index(schema: Schema, path: &Path, threads: usize) -> Result<tan...
function create (line 255) | pub fn create(source: T, path: &Path, buffer_size: usize, threads: usize...
function query (line 269) | pub async fn query<'a, R, I, C>(
type SearchResults (line 303) | pub struct SearchResults<'a, T> {
FILE: server/bleep/src/indexes/analytics.rs
type WorkerStats (line 4) | pub struct WorkerStats {
method add_assign (line 14) | fn add_assign(&mut self, rhs: Self) {
type StatsGatherer (line 22) | pub struct StatsGatherer {
method for_repo (line 36) | pub fn for_repo() -> Self {
method sender (line 47) | pub fn sender(&self) -> mpsc::UnboundedSender<WorkerStats> {
method finish (line 51) | pub async fn finish(&mut self) {
FILE: server/bleep/src/indexes/doc.rs
type Doc (line 24) | pub struct Doc {
method create (line 115) | pub fn create(
method set_title (line 153) | async fn set_title<'a, E>(&self, title: &str, id: i64, executor: &'a m...
method set_favicon (line 174) | async fn set_favicon<'a, E>(
method set_description (line 200) | async fn set_description<'a, E>(
method set_metadata (line 226) | async fn set_metadata<'a, E>(
method set_index_status (line 265) | async fn set_index_status<'a, E>(&self, status: &str, id: i64, executo...
method enqueue (line 285) | pub async fn enqueue(self, url: url::Url) -> Result<i64, Error> {
method begin_sync_job (line 321) | async fn begin_sync_job(
method status (line 391) | pub async fn status(self, id: i64) -> impl Stream<Item = Result<Progre...
method cancel (line 412) | pub async fn cancel(self, id: i64) -> Result<i64, Error> {
method resync (line 445) | pub async fn resync(self, id: i64) -> Result<i64, Error> {
method delete (line 499) | pub async fn delete(&self, id: i64) -> Result<i64, Error> {
method list (line 516) | pub async fn list(&self) -> Result<Vec<SqlRecord>, Error> {
method list_one (line 562) | pub async fn list_one(&self, id: i64) -> Result<SqlRecord, Error> {
method search (line 600) | pub async fn search(&self, q: String, limit: usize) -> Result<Vec<SqlR...
method search_sections (line 631) | pub async fn search_sections(
method list_sections (line 806) | pub async fn list_sections(&self, limit: usize, id: i64) -> Result<Vec...
method list_pages (line 825) | pub async fn list_pages(&self, limit: usize, id: i64) -> Result<Vec<Pa...
method fetch (line 849) | pub async fn fetch<S: AsRef<str>>(
method contains_url (line 888) | pub fn contains_url(&self, url: &url::Url) -> bool {
method insert_into_tantivy (line 905) | fn insert_into_tantivy(self, id: i64, doc_source: url::Url) -> impl St...
method verify (line 951) | pub async fn verify(&self, url: url::Url) -> Result<reqwest::StatusCod...
type SyncHandle (line 36) | struct SyncHandle {
type SqlRecord (line 52) | pub struct SqlRecord {
type Progress (line 63) | pub enum Progress {
type Update (line 72) | pub struct Update {
type Error (line 81) | pub enum Error {
function sections (line 964) | fn sections(
type Section (line 1022) | pub struct Section {
method from_tantivy_document (line 1036) | pub fn from_tantivy_document(
type Page (line 1077) | pub struct Page {
method from_tantivy_document (line 1088) | pub fn from_tantivy_document(
function normalize_absolute_url (line 1121) | fn normalize_absolute_url(base_url: &url::Url, absolute_url: &str) -> ur...
function build_trigram_query (line 1127) | fn build_trigram_query(query: &str, field: Field) -> Box<dyn Query> {
FILE: server/bleep/src/indexes/file.rs
type Workload (line 43) | struct Workload<'a> {
function cache_keys (line 56) | fn cache_keys(&self, dir_entry: &RepoDirEntry) -> CacheKeys {
function transmit_stats (line 89) | fn transmit_stats(&self, stats: WorkerStats) {
method index_repository (line 98) | async fn index_repository(
method delete_by_repo (line 221) | fn delete_by_repo(&self, writer: &IndexWriter, repo: &Repository) {
method schema (line 228) | fn schema(&self) -> Schema {
function skim_fuzzy_path_match (line 234) | pub async fn skim_fuzzy_path_match(
function by_path (line 353) | pub async fn by_path(
function top_hit (line 385) | async fn top_hit(
function by_repo (line 425) | pub async fn by_repo<S: AsRef<str>>(
method worker (line 488) | fn worker(
method build_document (line 556) | fn build_document(
method build_document (line 612) | fn build_document(
FILE: server/bleep/src/indexes/reader.rs
type ContentDocument (line 21) | pub struct ContentDocument {
method hash (line 34) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
method hoverable_ranges (line 53) | pub fn hoverable_ranges(&self) -> Option<Vec<TextRange>> {
method eq (line 43) | fn eq(&self, other: &Self) -> bool {
type FileDocument (line 61) | pub struct FileDocument {
type RepoDocument (line 71) | pub struct RepoDocument {
type ContentReader (line 77) | pub struct ContentReader;
type Schema (line 81) | type Schema = File;
type Document (line 82) | type Document = ContentDocument;
method query_matches (line 84) | fn query_matches(&self, query: &Query<'_>) -> bool {
method compile (line 95) | fn compile<'a, I>(
method read_document (line 119) | fn read_document(&self, schema: &File, doc: tantivy::Document) -> Self::...
type FileReader (line 159) | pub struct FileReader;
type Document (line 163) | type Document = FileDocument;
type Schema (line 164) | type Schema = File;
method query_matches (line 166) | fn query_matches(&self, query: &Query<'_>) -> bool {
method compile (line 187) | fn compile<'a, I>(
method read_document (line 204) | fn read_document(&self, schema: &Self::Schema, doc: tantivy::Document) -...
type RepoReader (line 225) | pub struct RepoReader;
type Document (line 229) | type Document = RepoDocument;
type Schema (line 230) | type Schema = Repo;
method query_matches (line 232) | fn query_matches(&self, query: &Query<'_>) -> bool {
method compile (line 245) | fn compile<'a, I>(
method read_document (line 259) | fn read_document(&self, schema: &Repo, doc: tantivy::Document) -> Self::...
type OpenReader (line 272) | pub struct OpenReader;
type OpenDocument (line 275) | pub struct OpenDocument {
type Document (line 287) | type Document = OpenDocument;
type Schema (line 288) | type Schema = File;
method query_matches (line 290) | fn query_matches(&self, query: &Query<'_>) -> bool {
method compile (line 309) | fn compile<'a, I>(
method read_document (line 336) | fn read_document(&self, schema: &File, doc: tantivy::Document) -> Self::...
function base_name (line 371) | pub fn base_name(path: &str) -> &str {
function read_bool_field (line 375) | fn read_bool_field(doc: &tantivy::Document, field: Field) -> bool {
function read_text_field (line 379) | fn read_text_field(doc: &tantivy::Document, field: Field) -> String {
function read_lang_field (line 387) | fn read_lang_field(doc: &tantivy::Document, lang: Field) -> Option<Strin...
function test_base_name (line 409) | fn test_base_name() {
FILE: server/bleep/src/indexes/repo.rs
method default (line 14) | fn default() -> Self {
method index_repository (line 21) | async fn index_repository(
method delete_by_repo (line 48) | fn delete_by_repo(&self, writer: &IndexWriter, repo: &Repository) {
method schema (line 55) | fn schema(&self) -> Schema {
FILE: server/bleep/src/indexes/schema.rs
type File (line 18) | pub struct File {
method new (line 71) | pub fn new() -> Self {
method schema (line 136) | pub fn schema(&self) -> Schema {
method default (line 142) | fn default() -> Self {
type Repo (line 149) | pub struct Repo {
method new (line 171) | pub fn new() -> Self {
type Section (line 197) | pub struct Section {
method new (line 258) | pub fn new() -> Self {
method default (line 252) | fn default() -> Self {
FILE: server/bleep/src/intelligence.rs
type TreeSitterFile (line 16) | pub struct TreeSitterFile<'a> {
type TreeSitterFileError (line 28) | pub enum TreeSitterFileError {
function try_build (line 38) | pub fn try_build(src: &'a [u8], lang_id: &str) -> Result<Self, TreeSitte...
function hoverable_ranges (line 68) | pub fn hoverable_ranges(
function scope_graph (line 86) | pub fn scope_graph(self) -> Result<ScopeGraph, TreeSitterFileError> {
FILE: server/bleep/src/intelligence/code_navigation.rs
type FileSymbols (line 19) | pub struct FileSymbols {
type Occurrence (line 30) | pub struct Occurrence {
method is_definition (line 37) | pub fn is_definition(&self) -> bool {
type OccurrenceKind (line 44) | pub enum OccurrenceKind {
type CodeNavigationError (line 50) | pub enum CodeNavigationError {}
type CodeNavigationContext (line 52) | pub struct CodeNavigationContext<'a, 'b> {
function files_importing (line 64) | pub fn files_importing(
function files_imported (line 118) | pub fn files_imported(
function singleton (line 185) | fn singleton(source_document: &'b ContentDocument, token: Token<'a>) -> ...
function source_document (line 194) | fn source_document(&self) -> &ContentDocument {
function token_info (line 198) | pub fn token_info(&self) -> Vec<FileSymbols> {
function is_definition (line 245) | fn is_definition(&self) -> bool {
function is_reference (line 256) | fn is_reference(&self) -> bool {
function is_import (line 267) | fn is_import(&self) -> bool {
function is_top_level (line 278) | fn is_top_level(&self) -> bool {
function non_source_documents (line 289) | fn non_source_documents(&self) -> impl Iterator<Item = &ContentDocument> {
function active_token_range (line 295) | pub fn active_token_range(&self) -> std::ops::Range<usize> {
function active_token_text (line 299) | pub fn active_token_text(&self) -> &str {
function local_definitions (line 307) | fn local_definitions(&self) -> Option<FileSymbols> {
function repo_wide_definitions (line 332) | fn repo_wide_definitions(&self) -> Vec<FileSymbols> {
function local_references (line 367) | fn local_references(&self) -> Option<FileSymbols> {
function repo_wide_references (line 398) | fn repo_wide_references(&self) -> Vec<FileSymbols> {
function imports (line 434) | fn imports(&self) -> Option<FileSymbols> {
type Token (line 460) | pub struct Token<'a> {
function to_occurrence (line 467) | fn to_occurrence(doc: &ContentDocument, range: TextRange, snipper: Optio...
function imported_ranges (line 478) | pub fn imported_ranges(
FILE: server/bleep/src/intelligence/language.rs
type Language (line 42) | pub enum Language<Config: 'static> {
type TSLanguageConfig (line 52) | pub struct TSLanguageConfig {
type MemoizedQuery (line 75) | pub struct MemoizedQuery {
method new (line 81) | pub const fn new(scope_query: &'static str) -> Self {
method query (line 91) | pub fn query(
type TSLanguage (line 100) | pub type TSLanguage = Language<TSLanguageConfig>;
method from_id (line 108) | pub fn from_id(lang_id: &str) -> Self {
function verify_all_symbol_kinds (line 134) | fn verify_all_symbol_kinds() {
function has_valid_symbol_kinds (line 152) | fn has_valid_symbol_kinds(query: &Query, kinds: Vec<&str>) -> bool {
FILE: server/bleep/src/intelligence/language/c/mod.rs
function trivial (line 40) | fn trivial() {
function declarations (line 103) | fn declarations() {
function types (line 167) | fn types() {
function function_parameters (line 325) | fn function_parameters() {
function const_dimension_array_declaration_regression (line 367) | fn const_dimension_array_declaration_regression() {
function unresolved_function_parameters (line 415) | fn unresolved_function_parameters() {
function declarator_rhs_is_reference (line 458) | fn declarator_rhs_is_reference() {
function function_prototype_vs_function_definition (line 511) | fn function_prototype_vs_function_definition() {
function type_refs_in_field_declarations (line 578) | fn type_refs_in_field_declarations() {
function bug_report_ternary_expression (line 622) | fn bug_report_ternary_expression() {
FILE: server/bleep/src/intelligence/language/c_sharp/mod.rs
function trivial (line 38) | fn trivial() {
function generics_and_type_constraints (line 102) | fn generics_and_type_constraints() {
FILE: server/bleep/src/intelligence/language/cpp/mod.rs
function trivial (line 53) | fn trivial() {
function for_range_loops (line 103) | fn for_range_loops() {
function if_while_switch (line 182) | fn if_while_switch() {
function concepts (line 242) | fn concepts() {
function bug_report_throw_statement (line 300) | fn bug_report_throw_statement() {
function bug_report_ternary_expression (line 360) | fn bug_report_ternary_expression() {
FILE: server/bleep/src/intelligence/language/go/mod.rs
function declare_const_no_type (line 32) | fn declare_const_no_type() {
function declare_const_with_type (line 43) | fn declare_const_with_type() {
function declare_const_grouped (line 53) | fn declare_const_grouped() {
function declare_const_implicit_value (line 65) | fn declare_const_implicit_value() {
function declare_var_no_type (line 77) | fn declare_var_no_type() {
function declare_var_with_types (line 90) | fn declare_var_with_types() {
function declare_var_grouped (line 102) | fn declare_var_grouped() {
function declare_short_var (line 116) | fn declare_short_var() {
function declare_func (line 130) | fn declare_func() {
function declare_type (line 147) | fn declare_type() {
function declare_type_grouped (line 164) | fn declare_type_grouped() {
function declare_loop_label (line 178) | fn declare_loop_label() {
function declare_func_literal (line 193) | fn declare_func_literal() {
function refer_binary_expr (line 206) | fn refer_binary_expr() {
function refer_func_call (line 221) | fn refer_func_call() {
function refer_array_index (line 236) | fn refer_array_index() {
function refer_slice_expr (line 250) | fn refer_slice_expr() {
function refer_parenthesized_expr (line 263) | fn refer_parenthesized_expr() {
function refer_selector_expr (line 276) | fn refer_selector_expr() {
function refer_type_assert_expr (line 295) | fn refer_type_assert_expr() {
function refer_unary_expr (line 308) | fn refer_unary_expr() {
function refer_statements (line 321) | fn refer_statements() {
function no_ref (line 348) | fn no_ref() {
function symbol_consts (line 368) | fn symbol_consts() {
function scoping_rules (line 414) | fn scoping_rules() {
function function_params (line 462) | fn function_params() {
function namespacing_of_types_and_variables (line 512) | fn namespacing_of_types_and_variables() {
function namespacing_of_modules_and_variables (line 577) | fn namespacing_of_modules_and_variables() {
function namespacing_of_labels (line 615) | fn namespacing_of_labels() {
function bug_report_type_def_slice_type (line 672) | fn bug_report_type_def_slice_type() {
function bug_report_rhs_declaration (line 725) | fn bug_report_rhs_declaration() {
FILE: server/bleep/src/intelligence/language/java/mod.rs
function trivial (line 46) | fn trivial() {
function classes_interfaces_generics (line 107) | fn classes_interfaces_generics() {
function this_keyword (line 202) | fn this_keyword() {
FILE: server/bleep/src/intelligence/language/javascript/mod.rs
function declare_lexical (line 38) | fn declare_lexical() {
function declare_functions (line 56) | fn declare_functions() {
function declare_destructuring (line 74) | fn declare_destructuring() {
function declare_class (line 97) | fn declare_class() {
function declare_imports (line 112) | fn declare_imports() {
function declare_misc (line 125) | fn declare_misc() {
function refer_primitive_expressions (line 144) | fn refer_primitive_expressions() {
function refer_statements (line 161) | fn refer_statements() {
function refer_operators (line 176) | fn refer_operators() {
function refer_exports (line 211) | fn refer_exports() {
function refer_misc (line 230) | fn refer_misc() {
function refer_embedded_jsx (line 250) | fn refer_embedded_jsx() {
function refer_jsx_opening_element (line 262) | fn refer_jsx_opening_element() {
function function_params (line 292) | fn function_params() {
function new_expression_regression (line 333) | fn new_expression_regression() {
function catch_clause_regression (line 369) | fn catch_clause_regression() {
FILE: server/bleep/src/intelligence/language/php/mod.rs
function declarations (line 40) | fn declarations() {
function functions (line 69) | fn functions() {
function lambdas (line 128) | fn lambdas() {
function classes (line 170) | fn classes() {
function control_flow (line 270) | fn control_flow() {
FILE: server/bleep/src/intelligence/language/python/mod.rs
function basic (line 29) | fn basic() {
function complex (line 127) | fn complex() {
function classes (line 213) | fn classes() {
function absurd (line 290) | fn absurd() {
function decorators (line 352) | fn decorators() {
function types (line 396) | fn types() {
FILE: server/bleep/src/intelligence/language/r/mod.rs
function declarations (line 25) | fn declarations() {
function control_if (line 60) | fn control_if() {
function control_loop (line 98) | fn control_loop() {
function control_switch (line 162) | fn control_switch() {
function indexing (line 207) | fn indexing() {
function value_of_function_definition (line 256) | fn value_of_function_definition() {
FILE: server/bleep/src/intelligence/language/ruby/mod.rs
function basic_decl (line 33) | fn basic_decl() {
function const_and_class_decl (line 74) | fn const_and_class_decl() {
function methods_and_lambdas (line 148) | fn methods_and_lambdas() {
function control_flow (line 224) | fn control_flow() {
function globals (line 339) | fn globals() {
FILE: server/bleep/src/intelligence/language/rust/mod.rs
function declare_const_and_static (line 43) | fn declare_const_and_static() {
function declare_let_statement (line 56) | fn declare_let_statement() {
function declare_function_params (line 74) | fn declare_function_params() {
function declare_closure_params (line 90) | fn declare_closure_params() {
function declare_labels (line 110) | fn declare_labels() {
function declare_types (line 125) | fn declare_types() {
function declare_namespaces (line 150) | fn declare_namespaces() {
function declare_let_expr (line 164) | fn declare_let_expr() {
function refer_unary_expr (line 178) | fn refer_unary_expr() {
function refer_binary_expr (line 193) | fn refer_binary_expr() {
function refer_control_flow (line 208) | fn refer_control_flow() {
function refer_assignment (line 244) | fn refer_assignment() {
function refer_struct_expr (line 259) | fn refer_struct_expr() {
function refer_dot (line 275) | fn refer_dot() {
function refer_arguments (line 290) | fn refer_arguments() {
function symbols (line 304) | fn symbols() {
function function_params (line 348) | fn function_params() {
function use_statements (line 389) | fn use_statements() {
function lifetimes (line 436) | fn lifetimes() {
function generics_and_traits (line 509) | fn generics_and_traits() {
function type_constructors (line 601) | fn type_constructors() {
function macros (line 689) | fn macros() {
function handle_self_type_and_var (line 754) | fn handle_self_type_and_var() {
function let_else_1_65_support (line 842) | fn let_else_1_65_support() {
function value_of_function_definition (line 927) | fn value_of_function_definition() {
function value_of_function_with_generics (line 943) | fn value_of_function_with_generics() {
function value_of_struct_definition (line 960) | fn value_of_struct_definition() {
function value_of_let_definition (line 975) | fn value_of_let_definition() {
function value_of_let_def_closures (line 989) | fn value_of_let_def_closures() {
FILE: server/bleep/src/intelligence/language/test_utils.rs
function counts (line 10) | pub fn counts(src: &str, lang_id: &str) -> (usize, usize, usize, usize) {
function assert_eq_defs (line 22) | pub fn assert_eq_defs(src: &[u8], lang_id: &str, defs: Vec<(&str, &str)>) {
function test_scopes (line 49) | pub fn test_scopes(lang_id: &str, src: &[u8], expected: Expect) {
function build_graph (line 59) | pub fn build_graph(lang_id: &str, src: &[u8]) -> crate::intelligence::Sc...
FILE: server/bleep/src/intelligence/language/typescript/mod.rs
function simple (line 50) | fn simple() {
function tsx (line 207) | fn tsx() {
function function_and_type_params (line 257) | fn function_and_type_params() {
function optional_param_regression (line 312) | fn optional_param_regression() {
FILE: server/bleep/src/intelligence/namespace.rs
type SymbolId (line 5) | pub struct SymbolId {
method name (line 11) | pub fn name(&self, namespaces: NameSpaces) -> &'static str {
type NameSpace (line 18) | pub type NameSpace = &'static [&'static str];
type NameSpaces (line 21) | pub type NameSpaces = &'static [NameSpace];
type NameSpaceMethods (line 24) | pub trait NameSpaceMethods {
method all_symbols (line 25) | fn all_symbols(self) -> Vec<&'static str>;
method symbol_id_of (line 27) | fn symbol_id_of(&self, symbol: &str) -> Option<SymbolId>;
method all_symbols (line 31) | fn all_symbols(self) -> Vec<&'static str> {
method symbol_id_of (line 35) | fn symbol_id_of(&self, symbol: &str) -> Option<SymbolId> {
FILE: server/bleep/src/intelligence/scope_resolution.rs
type NodeIndex (line 23) | pub type NodeIndex = petgraph::graph::NodeIndex<u32>;
type ResolutionMethod (line 30) | pub enum ResolutionMethod {
method build_scope (line 39) | pub fn build_scope(
type NodeKind (line 54) | pub enum NodeKind {
method scope (line 70) | pub fn scope(range: TextRange) -> Self {
method range (line 75) | pub fn range(&self) -> TextRange {
type EdgeKind (line 87) | pub enum EdgeKind {
type ScopeGraph (line 106) | pub struct ScopeGraph {
method new (line 120) | pub fn new(range: TextRange, lang_id: usize) -> Self {
method get_node (line 130) | pub fn get_node(&self, node_idx: NodeIndex) -> Option<&NodeKind> {
method insert_local_scope (line 135) | pub fn insert_local_scope(&mut self, new: LocalScope) {
method insert_local_def (line 145) | pub fn insert_local_def(&mut self, new: LocalDef) {
method insert_hoisted_def (line 155) | pub fn insert_hoisted_def(&mut self, new: LocalDef) {
method insert_global_def (line 170) | pub fn insert_global_def(&mut self, new: LocalDef) {
method insert_local_import (line 178) | pub fn insert_local_import(&mut self, new: LocalImport) {
method insert_ref (line 188) | pub fn insert_ref(&mut self, new: Reference, src: &[u8]) {
method scope_stack (line 249) | fn scope_stack(&self, start: NodeIndex) -> ScopeStack<'_> {
method scope_by_range (line 257) | fn scope_by_range(&self, range: TextRange, start: NodeIndex) -> Option...
method parent_scope (line 277) | fn parent_scope(&self, start: NodeIndex) -> Option<NodeIndex> {
method hoverable_ranges (line 290) | pub fn hoverable_ranges(&self) -> Box<dyn Iterator<Item = TextRange> +...
method definitions (line 304) | pub fn definitions(
method imports (line 317) | pub fn imports(&self, reference_node: NodeIndex) -> Box<dyn Iterator<I...
method references (line 327) | pub fn references(
method node_by_range (line 341) | pub fn node_by_range(&self, start_byte: usize, end_byte: usize) -> Opt...
method value_of_definition (line 361) | pub fn value_of_definition(&self, def_idx: NodeIndex) -> Option<NodeIn...
method node_by_position (line 381) | pub fn node_by_position(&self, line: usize, column: usize) -> Option<N...
method symbols (line 394) | pub fn symbols(&self) -> Vec<Symbol> {
method symbol_name_of (line 413) | pub fn symbol_name_of(&self, idx: NodeIndex) -> Option<&'static str> {
method is_top_level (line 423) | pub fn is_top_level(&self, idx: NodeIndex) -> bool {
method debug (line 428) | pub fn debug(&self, src: &[u8], language: &'static TSLanguageConfig) -...
method find_node_by_name (line 435) | pub fn find_node_by_name(&self, src: &[u8], name: &[u8]) -> Option<Nod...
method is_definition (line 443) | pub fn is_definition(&self, node_idx: NodeIndex) -> bool {
method is_reference (line 447) | pub fn is_reference(&self, node_idx: NodeIndex) -> bool {
method is_scope (line 451) | pub fn is_scope(&self, node_idx: NodeIndex) -> bool {
method is_import (line 455) | pub fn is_import(&self, node_idx: NodeIndex) -> bool {
function scope_res_generic (line 460) | fn scope_res_generic(
constant DUMMY_LANG_ID (line 647) | const DUMMY_LANG_ID: usize = 0;
function r (line 652) | fn r(start: usize, end: usize) -> TextRange {
function scope (line 668) | fn scope(start: usize, end: usize) -> LocalScope {
function definition (line 675) | fn definition(start: usize, end: usize) -> LocalDef {
function reference (line 683) | fn reference(start: usize, end: usize) -> Reference {
function test_edges (line 691) | fn test_edges(graph: &Graph<NodeKind, EdgeKind>, expected: expect_test::...
function insert_scopes (line 709) | fn insert_scopes() {
function insert_defs (line 760) | fn insert_defs() {
function insert_hoisted_defs (line 796) | fn insert_hoisted_defs() {
function insert_hoisted_no_parent (line 836) | fn insert_hoisted_no_parent() {
function insert_ref (line 859) | fn insert_ref() {
function insert_ref_namespaced (line 885) | fn insert_ref_namespaced() {
function insert_ref_no_namespace (line 984) | fn insert_ref_no_namespace() {
function hoverable_ranges (line 1052) | fn hoverable_ranges() {
FILE: server/bleep/src/intelligence/scope_resolution/debug.rs
type ScopeDebug (line 12) | pub struct ScopeDebug {
method empty (line 77) | fn empty(range: TextRange, language: &'static TSLanguageConfig) -> Self {
method build (line 87) | fn build(&mut self, graph: &Graph<NodeKind, EdgeKind>, start: NodeInde...
method new (line 174) | pub fn new(
method fmt (line 187) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type DefDebug (line 20) | struct DefDebug {
method new (line 40) | fn new(
method fmt (line 204) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type RefDebug (line 28) | struct RefDebug {
method fmt (line 234) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type ImportDebug (line 32) | struct ImportDebug {
method new (line 62) | fn new(range: TextRange, name: String, refs: Vec<TextRange>, src: &[u8...
method fmt (line 220) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function context (line 239) | fn context(range: TextRange, src: &[u8]) -> String {
FILE: server/bleep/src/intelligence/scope_resolution/def.rs
type LocalDef (line 6) | pub struct LocalDef {
method new (line 13) | pub fn new(range: TextRange, symbol_id: Option<SymbolId>) -> Self {
method name (line 17) | pub fn name<'a>(&self, buffer: &'a [u8]) -> &'a [u8] {
FILE: server/bleep/src/intelligence/scope_resolution/import.rs
type LocalImport (line 6) | pub struct LocalImport {
method new (line 12) | pub fn new(range: TextRange) -> Self {
method name (line 16) | pub fn name<'a>(&self, buffer: &'a [u8]) -> &'a [u8] {
FILE: server/bleep/src/intelligence/scope_resolution/reference.rs
type Reference (line 6) | pub struct Reference {
method new (line 13) | pub fn new(range: TextRange, symbol_id: Option<SymbolId>) -> Self {
method name (line 17) | pub fn name<'a>(&self, buffer: &'a [u8]) -> &'a [u8] {
FILE: server/bleep/src/intelligence/scope_resolution/scope.rs
type LocalScope (line 8) | pub struct LocalScope {
method new (line 13) | pub fn new(range: TextRange) -> Self {
type ScopeStack (line 18) | pub struct ScopeStack<'a> {
type Item (line 24) | type Item = NodeIndex<u32>;
method next (line 25) | fn next(&mut self) -> Option<Self::Item> {
FILE: server/bleep/src/lib.rs
constant LOG_ENV_VAR (line 78) | const LOG_ENV_VAR: &str = "BLOOP_LOG";
type Application (line 84) | pub struct Application {
method initialize (line 115) | pub async fn initialize(env: Environment, mut config: Configuration) -...
method install_logging (line 180) | pub fn install_logging(config: &Configuration) {
method run (line 198) | pub async fn run(self) -> Result<()> {
method allow_path (line 230) | fn allow_path(&self, path: impl AsRef<Path>) -> bool {
method username (line 243) | pub async fn username(&self) -> Option<String> {
method user (line 247) | pub(crate) async fn user(&self) -> User {
method write_index (line 264) | fn write_index(&self) -> background::BoundSyncQueue {
function tracing_subscribe (line 269) | fn tracing_subscribe(config: &Configuration) -> bool {
FILE: server/bleep/src/llm/call.rs
constant MAX_TOKEN_DURATION (line 11) | const MAX_TOKEN_DURATION: Duration = Duration::from_secs(16);
type ChatCompletion (line 14) | struct ChatCompletion {
type ChatChoice (line 19) | struct ChatChoice {
type Delta (line 26) | pub enum Delta {
method fmt (line 32) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
type FunctionCallDelta (line 45) | pub struct FunctionCallDelta {
type ChatMessage (line 52) | struct ChatMessage {
type OpenAiMessage (line 57) | struct OpenAiMessage {
type OpenAiRequest (line 63) | struct OpenAiRequest {
function llm_call (line 80) | pub async fn llm_call(
FILE: server/bleep/src/llm/client.rs
type FunctionCall (line 15) | pub struct FunctionCall {
type Function (line 21) | pub struct Function {
type Parameters (line 28) | pub struct Parameters {
type Parameter (line 36) | pub struct Parameter {
type Message (line 46) | pub enum Message {
type Messages (line 67) | pub struct Messages {
type Functions (line 72) | pub struct Functions {
type LLMRequest (line 77) | pub struct LLMRequest {
type FunctionCallOptions (line 92) | pub enum FunctionCallOptions {
type Error (line 98) | pub enum Error {
function new_text (line 111) | pub fn new_text(role: &str, content: &str) -> Self {
function system (line 118) | pub fn system(content: &str) -> Self {
function user (line 122) | pub fn user(content: &str) -> Self {
function assistant (line 126) | pub fn assistant(content: &str) -> Self {
function function_call (line 130) | pub fn function_call(call: &api::FunctionCall) -> Self {
function function_return (line 138) | pub fn function_return(name: &str, content: &str) -> Self {
function from (line 148) | fn from(m: &api::Message) -> tiktoken_rs::ChatCompletionRequestMessage {
type ChatError (line 188) | enum ChatError {
method from (line 198) | fn from(error: anyhow::Error) -> Self {
type Client (line 204) | pub struct Client {
method new (line 215) | pub fn new(app: Application) -> Self {
method model (line 227) | pub fn model(mut self, model: &str) -> Self {
method frequency_penalty (line 238) | pub fn frequency_penalty(mut self, frequency: impl Into<Option<f32>>) ...
method presence_penalty (line 244) | pub fn presence_penalty(mut self, presence_penalty: impl Into<Option<f...
method temperature (line 249) | pub fn temperature(mut self, temperature: impl Into<Option<f32>>) -> S...
method max_tokens (line 255) | pub fn max_tokens(mut self, max_tokens: impl Into<Option<u32>>) -> Self {
method chat (line 260) | pub async fn chat(
method chat_stream (line 291) | pub async fn chat_stream(
method chat_stream_oneshot (line 333) | async fn chat_stream_oneshot(
FILE: server/bleep/src/periodic.rs
function single_threaded_executor (line 9) | fn single_threaded_executor<F: std::future::Future<Output = ()> + Send>(
function start_background_jobs (line 23) | pub(crate) fn start_background_jobs(app: Application) {
FILE: server/bleep/src/periodic/logrotate.rs
function log_and_branch_rotate (line 10) | pub(crate) async fn log_and_branch_rotate(app: crate::Application) {
function clear_disk_logs (line 36) | pub(crate) async fn clear_disk_logs(app: crate::Application) {
function update_branch_filters (line 71) | fn update_branch_filters(
function collect_branches_for_repos (line 93) | fn collect_branches_for_repos(queries: Vec<String>) -> scc::HashMap<Stri...
FILE: server/bleep/src/periodic/remotes.rs
constant POLL_INTERVAL_MINUTE (line 21) | const POLL_INTERVAL_MINUTE: &[Duration] = &[
function sleep_systime (line 38) | async fn sleep_systime(duration: Duration) {
function sync_github_status (line 58) | pub(crate) async fn sync_github_status(app: Application) {
function sync_github_status_once (line 70) | pub async fn sync_github_status_once(app: &Application) {
function update_repo_list (line 74) | pub(crate) async fn update_repo_list(app: &Application) {
type RefreshedAccessToken (line 93) | struct RefreshedAccessToken {
function check_repo_updates (line 97) | pub(crate) async fn check_repo_updates(app: Application) {
function periodic_repo_poll (line 130) | async fn periodic_repo_poll(app: Application, reporef: RepoRef) -> Optio...
type Poller (line 197) | struct Poller {
method start (line 205) | fn start(app: &Application, reporef: &RepoRef) -> Option<Self> {
method increase_interval (line 240) | fn increase_interval(&mut self) -> Duration {
method reset_interval (line 246) | fn reset_interval(&mut self) -> Duration {
method interval (line 251) | fn interval(&self) -> Duration {
method jittery_interval (line 255) | fn jittery_interval(&self) -> Duration {
method git_change (line 266) | async fn git_change(&mut self) {
function check_repo (line 278) | fn check_repo(app: &Application, reporef: &RepoRef) -> Option<(u64, i64,...
function debounced_events (line 288) | fn debounced_events(tx: flume::Sender<()>) -> Debouncer<RecommendedWatch...
FILE: server/bleep/src/query/compiler.rs
constant MAX_CASE_PERMUTATION_LEN (line 22) | const MAX_CASE_PERMUTATION_LEN: usize = 5;
type DynQuery (line 24) | type DynQuery = Box<dyn tantivy::query::Query>;
type Extraction (line 26) | enum Extraction<'a> {
type Extractor (line 35) | type Extractor = dyn for<'a> FnMut(&'a Query<'a>) -> Option<Extraction<'...
type Compiler (line 38) | pub struct Compiler {
method new (line 45) | pub fn new() -> Self {
method priority (line 50) | pub fn priority(mut self, fields: &[Field]) -> Self {
method literal (line 60) | pub fn literal<F>(mut self, tantivy_field: Field, mut extractor: F) ->...
method byte_string (line 75) | pub fn byte_string<F>(mut self, tantivy_field: Field, mut extractor: F...
method compile (line 88) | pub fn compile<'a, I>(mut self, queries: I, index: &Index) -> Result<D...
function plan_to_query (line 169) | fn plan_to_query(plan: planner::Fragment, field: Field, case_sensitive: ...
function str_to_query (line 209) | fn str_to_query(field: Field, s: &str) -> DynQuery {
function trigrams (line 217) | pub fn trigrams(s: &str) -> impl Iterator<Item = CompactString> {
function case_permutations (line 235) | pub fn case_permutations(s: &str) -> impl Iterator<Item = CompactString> {
function test_trigrams (line 321) | fn test_trigrams() {
function test_case_permutations (line 342) | fn test_case_permutations() {
function test_plan_to_query (line 366) | fn test_plan_to_query() {
FILE: server/bleep/src/query/execute.rs
function default_page_size (line 25) | const fn default_page_size() -> usize {
function default_context (line 29) | const fn default_context() -> usize {
function default_true (line 33) | const fn default_true() -> bool {
function div_ceil (line 38) | fn div_ceil(a: usize, b: usize) -> usize {
type ApiQuery (line 45) | pub struct ApiQuery {
method query (line 235) | pub async fn query(self: Arc<Self>, app: &Application) -> Result<Query...
method restrict_queries (line 258) | pub async fn restrict_queries<'a>(
method restrict_repo_queries (line 309) | pub async fn restrict_repo_queries<'a>(
method query_with (line 344) | pub async fn query_with(
method limit (line 392) | fn limit(&self) -> usize {
method offset (line 397) | fn offset(&self) -> usize {
type QueryResponse (line 85) | pub struct QueryResponse {
type PagingMetadata (line 101) | pub struct PagingMetadata {
method new (line 403) | pub fn new(page: usize, page_size: usize, total_count: Option<usize>) ...
type ResultStats (line 117) | pub struct ResultStats {
method with_lang_freqs (line 414) | fn with_lang_freqs(mut self, mut lang_freqs: HashMap<Vec<u8>, usize>) ...
method with_repo_freqs (line 427) | fn with_repo_freqs(mut self, mut repo_freqs: HashMap<Vec<u8>, usize>) ...
type QueryResult (line 125) | pub enum QueryResult {
type RepositoryResultData (line 150) | pub struct RepositoryResultData {
type FileResultData (line 156) | pub struct FileResultData {
method new (line 167) | pub fn new(
type FileData (line 189) | pub struct FileData {
type DirectoryData (line 203) | pub struct DirectoryData {
type DirEntry (line 211) | pub struct DirEntry {
type EntryData (line 217) | enum EntryData {
type ExecuteQuery (line 223) | pub trait ExecuteQuery {
method execute (line 226) | async fn execute(
type Index (line 442) | type Index = File;
method execute (line 444) | async fn execute(
type Index (line 551) | type Index = File;
method execute (line 553) | async fn execute(
type Index (line 642) | type Index = Repo;
method execute (line 644) | async fn execute(
type Index (line 721) | type Index = File;
method execute (line 723) | async fn execute(
function serialize_response (line 907) | fn serialize_response() {
FILE: server/bleep/src/query/languages.rs
function parse_alias (line 5) | pub fn parse_alias(lang: &str) -> Cow<'static, str> {
function proper_case (line 13) | pub fn proper_case(lower: Cow<str>) -> Cow<str> {
function list (line 21) | pub fn list() -> impl Iterator<Item = &'static str> {
function sample_language_aliases (line 34) | fn sample_language_aliases() {
function sample_proper_case (line 43) | fn sample_proper_case() {
FILE: server/bleep/src/query/parser.rs
type Query (line 7) | pub struct Query<'a> {
type Target (line 21) | pub enum Target<'a> {
type SemanticQuery (line 27) | pub struct SemanticQuery<'a> {
function repos (line 37) | pub fn repos(&'a self) -> impl Iterator<Item = Cow<'a, str>> {
function paths (line 41) | pub fn paths(&'a self) -> impl Iterator<Item = Cow<'a, str>> {
function langs (line 45) | pub fn langs(&'a self) -> impl Iterator<Item = Cow<'a, str>> {
function target (line 49) | pub fn target(&self) -> Option<Cow<'a, str>> {
function branch (line 53) | pub fn branch(&'a self) -> impl Iterator<Item = Cow<'a, str>> {
function first_branch (line 60) | pub fn first_branch(&self) -> Option<Cow<'_, str>> {
function first_repo (line 65) | pub fn first_repo(&self) -> Option<Cow<'_, str>> {
function from_str (line 69) | pub fn from_str(query: String, repo_ref: String) -> Self {
function into_owned (line 77) | pub fn into_owned(self) -> SemanticQuery<'static> {
function merge (line 92) | fn merge(self, rhs: Self) -> Self {
function cross (line 137) | fn cross<I>(self, mut iter: I) -> SmallVec<[Self; 1]>
function is_case_sensitive (line 155) | pub fn is_case_sensitive(&self) -> bool {
function set_global_regex (line 160) | fn set_global_regex(&mut self, value: Option<bool>) {
function repo_str (line 173) | pub fn repo_str(&self) -> Option<String> {
function branch_str (line 181) | pub fn branch_str(&self) -> Option<String> {
function literal_mut (line 191) | pub fn literal_mut(&'a mut self) -> &mut Literal<'a> {
function literal (line 199) | pub fn literal(&self) -> &Literal<'_> {
function symbol (line 207) | pub fn symbol(&self) -> Option<&Literal<'_>> {
function content (line 215) | pub fn content(&self) -> Option<&Literal<'_>> {
function make_regex (line 222) | fn make_regex(&mut self) {
type PestParser (line 232) | struct PestParser;
type ParseError (line 235) | pub enum ParseError {
type Literal (line 245) | pub enum Literal<'a> {
type LiteralInner (line 251) | pub struct LiteralInner<'a> {
function new (line 258) | fn new(start: usize, end: usize, content: impl Into<Cow<'a, str>>) -> Se...
function to_owned (line 266) | fn to_owned(&self) -> LiteralInner<'static> {
function from (line 276) | fn from(value: T) -> Self {
type Target (line 286) | type Target = str;
method deref (line 288) | fn deref(&self) -> &Self::Target {
method default (line 294) | fn default() -> Self {
function from (line 304) | fn from(value: Cow<'a, str>) -> Self {
function from (line 310) | fn from(value: &String) -> Self {
function from (line 316) | fn from(value: &str) -> Self {
method default (line 322) | fn default() -> Self {
function join_as_regex (line 329) | fn join_as_regex(self, rhs: Self) -> Literal<'static> {
function regex_str (line 339) | pub fn regex_str(&self) -> Cow<'a, str> {
function regex (line 346) | pub fn regex(&self) -> Result<Regex, regex::Error> {
function as_plain (line 350) | pub fn as_plain(&self) -> Option<Cow<'a, str>> {
function make_regex (line 358) | fn make_regex(&mut self) {
function unwrap (line 364) | pub fn unwrap(self) -> Cow<'a, str> {
function into_owned (line 371) | pub fn into_owned(self) -> Literal<'static> {
function start (line 378) | pub fn start(&self) -> usize {
function from (line 387) | fn from(pair: Pair<'a, Rule>) -> Self {
function as_ref (line 411) | fn as_ref(&self) -> &Cow<'a, str> {
type Target (line 420) | type Target = str;
method deref (line 422) | fn deref(&self) -> &Self::Target {
function unescape (line 444) | fn unescape(s: &str, term: char) -> String {
type Expr (line 470) | enum Expr<'a> {
function parse (line 488) | fn parse(pair: Pair<'a, Rule>, top_level: bool) -> Result<Self, Pair<'a,...
function parse (line 578) | pub fn parse(query: &str) -> Result<Vec<Query<'_>>, ParseError> {
function parse_nl (line 600) | pub fn parse_nl(query: &str) -> Result<SemanticQuery<'_>, ParseError> {
function flatten (line 666) | fn flatten(root: Expr<'_>) -> SmallVec<[Query<'_>; 1]> {
function basic_parse (line 733) | fn basic_parse() {
function intersection_parse (line 840) | fn intersection_parse() {
function complex_nested_combinators_expr (line 898) | fn complex_nested_combinators_expr() {
function complex_nested_combinators_parse (line 953) | fn complex_nested_combinators_parse() {
function complex_multiple_parse_types (line 1024) | fn complex_multiple_parse_types() {
function slash_in_path (line 1093) | fn slash_in_path() {
function literal_join_as_regex (line 1108) | fn literal_join_as_regex() {
function lang_path_filter (line 1121) | fn lang_path_filter() {
function enable_open (line 1137) | fn enable_open() {
function special_chars (line 1179) | fn special_chars() {
function test_global_regex (line 1206) | fn test_global_regex() {
function case_ignore_affinity (line 1322) | fn case_ignore_affinity() {
function or_prefix (line 1351) | fn or_prefix() {
function or_suffix (line 1388) | fn or_suffix() {
function test_complex_parse (line 1425) | fn test_complex_parse() {
function nl_parse (line 1439) | fn nl_parse() {
function nl_parse_dedup_similar_filters (line 1464) | fn nl_parse_dedup_similar_filters() {
function nl_parse_multiple_filters (line 1470) | fn nl_parse_multiple_filters() {
function nl_consume_flags (line 1519) | fn nl_consume_flags() {
function nl_parse_arbitrary_text (line 1568) | fn nl_parse_arbitrary_text() {
function escape_characters (line 1580) | fn escape_characters() {
FILE: server/bleep/src/query/planner.rs
constant MAX_CLASS_RANGE_LEN (line 8) | const MAX_CLASS_RANGE_LEN: u32 = 10;
type Error (line 11) | pub enum Error {
function plan (line 18) | pub fn plan(regex: &str) -> Result<Fragment, Error> {
function step (line 27) | fn step(hir: Hir) -> Result<Fragment, Error> {
type Fragment (line 93) | pub enum Fragment {
method empty (line 110) | fn empty() -> Self {
method and (line 114) | fn and(self, other: Self) -> Self {
method or (line 153) | fn or(self, other: Self) -> Self {
method as_literal (line 185) | fn as_literal(&self) -> Option<&String> {
method as_literal_mut (line 193) | fn as_literal_mut(&mut self) -> Option<&mut String> {
method fmt (line 203) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Op (line 226) | pub enum Op {
function string_literal (line 238) | fn string_literal() {
function simple_inline (line 243) | fn simple_inline() {
function double_alternation (line 248) | fn double_alternation() {
function nested_or (line 275) | fn nested_or() {
function basic_inline (line 298) | fn basic_inline() {
function small_literal_alt (line 314) | fn small_literal_alt() {
function simple_wildcard (line 329) | fn simple_wildcard() {
function repetition (line 345) | fn repetition() {
function simple_range (line 403) | fn simple_range() {
FILE: server/bleep/src/query/planner/optimize.rs
function run (line 4) | pub(super) fn run(fragment: Fragment) -> Fragment {
function flatten_or (line 19) | fn flatten_or(fragment: Fragment) -> Fragment {
function flatten_and (line 37) | fn flatten_and(fragment: Fragment) -> Fragment {
function inline (line 55) | fn inline(fragment: Fragment) -> Fragment {
function basic_nested_or (line 106) | fn basic_nested_or() {
function basic_inline (line 135) | fn basic_inline() {
function inline_nested (line 164) | fn inline_nested() {
function inline_break (line 255) | fn inline_break() {
FILE: server/bleep/src/query/ranking.rs
type DocumentTweaker (line 12) | pub struct DocumentTweaker(pub File);
type Child (line 42) | type Child = SegmentScorer;
method segment_tweaker (line 44) | fn segment_tweaker(
type SegmentScorer (line 13) | pub struct SegmentScorer {
method score (line 20) | fn score(&mut self, doc: DocId, mut score: Score) -> Score {
FILE: server/bleep/src/query/stopwords.rs
type StopWords (line 36) | type StopWords = HashSet<&'static str>;
function phrases (line 48) | fn phrases<'a>(phrases_iter: impl IntoIterator<Item = &'a str>) -> Vec<V...
function remove_stopwords (line 70) | pub fn remove_stopwords(text: &str) -> String {
FILE: server/bleep/src/remotes.rs
type GitCreds (line 20) | type GitCreds = Account;
type Result (line 22) | pub(crate) type Result<T> = std::result::Result<T, RemoteError>;
type RemoteError (line 24) | pub(crate) enum RemoteError {
method from (line 75) | fn from(value: &RemoteError) -> Self {
method from (line 83) | fn from(value: Result<SyncStatus>) -> Self {
function git_clone (line 109) | async fn git_clone(
function git_pull (line 141) | async fn git_pull(
function gather_repo_roots (line 178) | pub(crate) fn gather_repo_roots(
type BackendEntry (line 242) | struct BackendEntry {
method deserialize (line 256) | fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
method from (line 266) | fn from(inner: BackendCredential) -> Self {
method serialize (line 247) | fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::E...
type Backends (line 272) | pub struct Backends {
method from (line 280) | fn from(mut value: HashMap<Backend, BackendCredential>) -> Self {
method for_repo (line 294) | pub(crate) fn for_repo(&self, repo: &RepoRef) -> Option<BackendCredent...
method github (line 298) | pub(crate) fn github(&self) -> Option<github::State> {
method set_github (line 305) | pub(crate) fn set_github(&self, gh: impl Into<github::State>) {
type BackendCredential (line 317) | pub(crate) enum BackendCredential {
method clone_or_pull (line 323) | pub(crate) async fn clone_or_pull(
FILE: server/bleep/src/remotes/github.rs
type State (line 11) | pub(crate) struct State {
method with_auth (line 18) | pub(crate) fn with_auth(auth: Auth) -> Self {
method username (line 25) | pub(crate) async fn username(&self) -> Result<String> {
method client (line 29) | pub fn client(&self) -> octocrab::Result<Octocrab> {
method current_repo_list (line 34) | pub async fn current_repo_list(&self) -> Result<Vec<octocrab::models::...
method update_repositories (line 42) | pub fn update_repositories(self, repos: Vec<octocrab::models::Reposito...
method from (line 57) | fn from(value: Auth) -> Self {
type Auth (line 51) | pub(crate) struct Auth {
method new (line 63) | pub(crate) fn new(token: SecretString) -> Self {
method creds (line 68) | pub(crate) async fn creds(&self, repo: &Repository) -> Result<Option<G...
method username (line 102) | pub(crate) async fn username(&self) -> Result<String> {
method git_cred (line 108) | fn git_cred(&self) -> GitCreds {
method client (line 115) | fn client(&self) -> octocrab::Result<Octocrab> {
method list_repos (line 125) | async fn list_repos(&self) -> Result<Vec<octocrab::models::Repository>> {
FILE: server/bleep/src/repo.rs
type RepoLocked (line 21) | pub struct RepoLocked;
type Backend (line 26) | pub enum Backend {
type RepoRef (line 33) | pub struct RepoRef {
method new (line 39) | pub fn new(backend: Backend, name: &(impl AsRef<str> + ?Sized)) -> Res...
method from_components (line 70) | pub fn from_components(root: &Path, components: Vec<String>) -> Result...
method backend (line 82) | pub fn backend(&self) -> Backend {
method name (line 86) | pub fn name(&self) -> &str {
method is_local (line 90) | pub fn is_local(&self) -> bool {
method is_remote (line 94) | pub fn is_remote(&self) -> bool {
method indexed_name (line 98) | pub fn indexed_name(&self) -> String {
method local_path (line 111) | pub fn local_path(&self) -> Option<PathBuf> {
method as_ref (line 120) | fn as_ref(&self) -> &RepoRef {
method from (line 126) | fn from(path: &P) -> Self {
method from (line 136) | fn from(refstr: &str) -> Self {
method deserialize (line 174) | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
type Err (line 142) | type Err = RepoError;
method from_str (line 144) | fn from_str(refstr: &str) -> Result<Self, Self::Err> {
method fmt (line 156) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
method serialize (line 165) | fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
type Repository (line 185) | pub struct Repository {
method local_from (line 236) | pub(crate) fn local_from(reporef: &RepoRef) -> Self {
method remove_all (line 274) | pub async fn remove_all(&self) -> Result<(), std::io::Error> {
method get_repo_metadata (line 284) | pub async fn get_repo_metadata(&self) -> Arc<RepoMetadata> {
method mark_removed (line 301) | pub(crate) fn mark_removed(&mut self) {
method mark_queued (line 308) | pub(crate) fn mark_queued(&mut self) {
method lock (line 316) | pub(crate) fn lock(&mut self) -> Result<(), RepoLocked> {
method sync_done_with (line 325) | pub(crate) fn sync_done_with(
function get_unix_time (line 354) | fn get_unix_time(time: SystemTime) -> u64 {
type RepoMetadata (line 361) | pub struct RepoMetadata {
type SyncStatus (line 368) | pub enum SyncStatus {
method indexable (line 406) | pub(crate) fn indexable(&self) -> bool {
type GitRemote (line 414) | pub struct GitRemote {
type GitProtocol (line 425) | pub enum GitProtocol {
type RepoRemote (line 432) | pub enum RepoRemote {
method from (line 438) | fn from(reporef: T) -> Self {
method fmt (line 457) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Err (line 473) | type Err = ();
method from_str (line 475) | fn from_str(value: &str) -> Result<Self, Self::Err> {
type RepoError (line 504) | pub enum RepoError {
function parse_reporef (line 535) | fn parse_reporef() {
function serialize_reporef (line 554) | fn serialize_reporef() {
function parse_reporemote (line 566) | fn parse_reporemote() {
FILE: server/bleep/src/repo/iterator.rs
constant AVG_LINE_LEN (line 21) | pub const AVG_LINE_LEN: u64 = 30;
constant MAX_LINE_COUNT (line 22) | pub const MAX_LINE_COUNT: u64 = 20000;
constant MAX_FILE_LEN (line 23) | pub const MAX_FILE_LEN: u64 = AVG_LINE_LEN * MAX_LINE_COUNT;
constant EXT_BLACKLIST (line 26) | pub const EXT_BLACKLIST: &[&str] = &[
type FileSource (line 48) | pub trait FileSource {
method len (line 49) | fn len(&self) -> usize;
method for_each (line 50) | fn for_each(self, signal: &SyncPipes, iterator: impl Fn(RepoDirEntry) ...
type RepoDirEntry (line 53) | pub enum RepoDirEntry {
method path (line 59) | pub fn path(&self) -> &str {
method buffer (line 66) | pub fn buffer(&self) -> Option<String> {
method branches (line 73) | pub fn branches(&self) -> &[String] {
type RepoDir (line 81) | pub struct RepoDir {
method size (line 87) | pub fn size(&self) -> usize {
type RepoFile (line 93) | pub struct RepoFile {
method should_index (line 105) | pub fn should_index(&self) -> bool {
method buffer (line 109) | pub fn buffer(&self) -> std::io::Result<String> {
method size (line 113) | pub fn size(&self) -> usize {
type FileType (line 119) | pub enum FileType {
function should_index_path (line 125) | fn should_index_path<P: AsRef<Path> + ?Sized>(p: &P) -> bool {
function test_should_index (line 185) | fn test_should_index() {
FILE: server/bleep/src/repo/iterator/filters.rs
type FilterUpdate (line 11) | pub struct FilterUpdate {
type BranchFilterConfig (line 19) | pub enum BranchFilterConfig {
method patch_into (line 27) | pub(crate) fn patch_into(
type BranchFilter (line 63) | pub enum BranchFilter {
method from (line 49) | fn from(value: &BranchFilterConfig) -> Self {
method filter (line 70) | pub fn filter(&self, is_head: bool, branch: &str) -> bool {
method default (line 80) | fn default() -> Self {
type FileFilterConfig (line 87) | pub struct FileFilterConfig {
method patch_into (line 109) | pub(crate) fn patch_into(&self, old: &FileFilterConfig) -> FileFilterC...
type FileFilterRule (line 94) | pub enum FileFilterRule {
type FileFilter (line 144) | pub struct FileFilter {
method compile (line 152) | pub fn compile(config: &FileFilterConfig) -> anyhow::Result<Self> {
method is_allowed (line 181) | pub fn is_allowed<P: AsRef<Path> + ?Sized>(&self, path: &P) -> Option<...
method from (line 196) | fn from(value: &FileFilterConfig) -> Self {
FILE: server/bleep/src/repo/iterator/fs.rs
type FileWalker (line 9) | pub struct FileWalker {
method index_directory (line 17) | pub fn index_directory(dir: impl AsRef<Path>, branch: String) -> impl ...
method len (line 41) | fn len(&self) -> usize {
method for_each (line 45) | fn for_each(self, pipes: &SyncPipes, iterator: impl Fn(RepoDirEntry) + S...
FILE: server/bleep/src/repo/iterator/git.rs
function human_readable_branch_name (line 14) | fn human_readable_branch_name(r: &gix::Reference<'_>) -> String {
type GitWalker (line 19) | pub struct GitWalker {
method open_repository (line 25) | pub fn open_repository(
method len (line 153) | fn len(&self) -> usize {
method for_each (line 157) | fn for_each(self, pipes: &SyncPipes, iterator: impl Fn(RepoDirEntry) + S...
FILE: server/bleep/src/repo/iterator/language.rs
type LanguageInfo (line 9) | pub struct LanguageInfo {
method get (line 14) | pub fn get(&self, path: &Path, buf: &[u8]) -> Option<&'static str> {
method most_common_lang (line 25) | pub fn most_common_lang(&self) -> Option<&'static str> {
function detect_language (line 45) | fn detect_language(path: &Path, buf: &[u8]) -> Option<&'static str> {
FILE: server/bleep/src/scraper.rs
type Scraper (line 20) | pub struct Scraper {
method with_config (line 28) | pub fn with_config(config: Config) -> Self {
method base_url (line 37) | fn base_url(&self) -> &Url {
method queue_request (line 41) | async fn queue_request(&self, req: ScraperRequest) {
method queue_requests (line 45) | async fn queue_requests(&self, reqs: impl Iterator<Item = ScraperReque...
method active_tasks (line 49) | fn active_tasks(&self) -> usize {
method is_permitted (line 56) | fn is_permitted(&self, url: &Url) -> bool {
method finished_tasks (line 62) | fn finished_tasks(&mut self) -> Vec<task::JoinHandle<Result<ScraperRes...
method complete (line 68) | pub fn complete(&mut self) -> impl Stream<Item = Document> + '_ {
type ScraperRequest (line 149) | pub struct ScraperRequest {
type ScraperResult (line 154) | pub struct ScraperResult {
type Config (line 159) | pub struct Config {
method new (line 167) | pub fn new(base_url: Url) -> Self {
type Document (line 179) | pub struct Document {
method relative_url (line 187) | pub fn relative_url(&self, base: &Url) -> Option<String> {
method is_empty (line 197) | pub fn is_empty(&self) -> bool {
type Meta (line 203) | pub struct Meta {
method is_empty (line 210) | pub fn is_empty(&self) -> bool {
function visit (line 215) | async fn visit(ScraperRequest { url, depth }: ScraperRequest) -> Result<...
FILE: server/bleep/src/scraper/article.rs
constant PUNCTUATION (line 29) | const PUNCTUATION: &str = r#",."'!?&-/:;()#$%*+<=>@[\]^_`{|}~"#;
constant ARTICLE_BODY_ATTR (line 30) | const ARTICLE_BODY_ATTR: &[(&str, &str); 3] = &[
constant BAD_NODE_NAMES (line 35) | const BAD_NODE_NAMES: &[&str; 9] = &[
constant ATTR_TO_CHECK (line 47) | const ATTR_TO_CHECK: [&str; 3] = ["id", "class", "name"];
type DefaultExtractor (line 50) | struct DefaultExtractor {
type Extractor (line 60) | trait Extractor {
method url (line 55) | fn url(&self) -> &Url {
method title (line 61) | fn title<'a>(&self, doc: &'a Document) -> Option<Cow<'a, str>> {
method base_url (line 84) | fn base_url(&self, doc: &Document) -> Option<Url> {
method meta_language (line 91) | fn meta_language(&self, doc: &Document) -> Option<Language> {
method meta_content (line 114) | fn meta_content<'a, 'b>(
method meta_site_name (line 129) | fn meta_site_name<'a>(&self, doc: &'a Document) -> Option<Cow<'a, str>> {
method meta_description (line 134) | fn meta_description<'a>(&self, doc: &'a Document) -> Option<Cow<'a, st...
method icon (line 141) | fn icon<'a>(&self, doc: &'a Document) -> Cow<'a, str> {
method text (line 151) | fn text<'a>(&self, doc: &'a Document, lang: Language) -> Option<Cow<'a...
method text_with_cleaner (line 161) | fn text_with_cleaner<'a, T: DocumentCleaner>(
method article_node (line 171) | fn article_node<'a>(&self, doc: &'a Document, lang: Language) -> Optio...
method all_urls (line 182) | fn all_urls<'a>(&self, doc: &'a Document) -> Vec<Cow<'a, str>> {
method article_content (line 191) | fn article_content<'a>(&self, doc: &'a Document, lang: Option<Language...
method canonical_link (line 218) | fn canonical_link(&self, doc: &Document) -> Option<Url> {
method url (line 234) | fn url(&self) -> &Url;
type Article (line 238) | pub struct Article {
method builder (line 246) | pub fn builder<T: IntoUrl>(url: T) -> Result<ArticleBuilder> {
type ArticleContent (line 252) | pub struct ArticleContent<'a> {
function builder (line 261) | fn builder() -> ArticleContentBuilder<'a> {
function into_owned (line 265) | fn into_owned(self) -> ArticleContent<'static> {
type ArticleContentBuilder (line 276) | struct ArticleContentBuilder<'a> {
function title (line 285) | fn title(mut self, title: Cow<'a, str>) -> Self {
function icon (line 290) | fn icon(mut self, icon: Cow<'a, str>) -> Self {
function text (line 295) | fn text(mut self, text: Cow<'a, str>) -> Self {
function language (line 300) | fn language(mut self, language: Language) -> Self {
function description (line 305) | fn description(mut self, description: Cow<'a, str>) -> Self {
function build (line 310) | fn build(self) -> ArticleContent<'a> {
type Language (line 322) | pub enum Language {
method stopword_count (line 353) | fn stopword_count(&self, txt: &str) -> Option<usize> {
type ArticleBuilder (line 358) | pub struct ArticleBuilder {
method new (line 366) | fn new<T: IntoUrl>(url: T) -> Result<Self> {
method get (line 377) | pub async fn get(self) -> Result<Article> {
method get_with_extractor (line 385) | async fn get_with_extractor<TExtract: Extractor>(
type MetaNode (line 442) | struct MetaNode<'a> {
type Target (line 447) | type Target = Node<'a>;
method deref (line 449) | fn deref(&self) -> &Self::Target {
type DefaultDocumentCleaner (line 454) | struct DefaultDocumentCleaner {
type DocumentCleaner (line 464) | trait DocumentCleaner {
method url (line 459) | fn url(&self) -> &Url {
method clean_node_text (line 465) | fn clean_node_text(&self, node: Node) -> String {
method is_good_node (line 603) | fn is_good_node(&self, node: Node) -> bool {
method is_bad_node_name (line 607) | fn is_bad_node_name(&self, node: Node) -> bool {
method iter_clean_nodes (line 611) | fn iter_clean_nodes<'a>(&'a self, node: Node<'a>) -> CleanNodeIter<'a,...
method url (line 621) | fn url(&self) -> &Url;
type CleanNodeIter (line 623) | struct CleanNodeIter<'a, T: DocumentCleaner> {
type Item (line 629) | type Item = Node<'a>;
method next (line 631) | fn next(&mut self) -> Option<Self::Item> {
function has_bad_attr (line 646) | fn has_bad_attr(node: Node) -> bool {
function is_bad_node (line 657) | fn is_bad_node(node: Node) -> bool {
function para (line 665) | fn para() -> impl Predicate {
function header (line 679) | fn header() -> impl Predicate {
function pre (line 688) | fn pre() -> impl Predicate {
function code (line 692) | fn code() -> impl Predicate {
function link (line 696) | fn link() -> impl Predicate {
function list (line 700) | fn list() -> impl Predicate {
function extract_language_classes (line 704) | fn extract_language_classes(node: Node) -> impl Iterator<Item = String> ...
type Err (line 719) | type Err = Language;
method from_str (line 721) | fn from_str(s: &str) -> Result<Self, Self::Err> {
type ArticleTextNode (line 754) | struct ArticleTextNode<'a> {
function new (line 759) | fn new(inner: Node<'a>) -> Self {
function clean_text (line 763) | fn clean_text(&self, url: &Url) -> String {
type Target (line 769) | type Target = Node<'a>;
method deref (line 771) | fn deref(&self) -> &Self::Target {
type ArticleTextNodeExtractor (line 776) | struct ArticleTextNodeExtractor;
constant MINIMUM_STOPWORD_COUNT (line 779) | const MINIMUM_STOPWORD_COUNT: usize = 5;
constant MAX_STEPSAWAY_FROM_NODE (line 780) | const MAX_STEPSAWAY_FROM_NODE: usize = 3;
method article_body_predicate (line 782) | fn article_body_predicate() -> for<'r, 's> fn(&'r Node<'s>) -> bool {
method calculate_best_node (line 793) | fn calculate_best_node(doc: &Document, lang: Language) -> Option<Artic...
method nodes_to_check (line 899) | fn nodes_to_check(doc: &Document) -> impl Iterator<Item = Node> {
method is_boostable (line 903) | fn is_boostable(node: &Node, lang: Language) -> bool {
method is_high_link_density (line 923) | fn is_high_link_density(node: &Node) -> bool {
method words (line 951) | fn words(txt: &str) -> impl Iterator<Item = &str> {
function is_punctuation (line 957) | fn is_punctuation(c: char) -> bool {
type TextNodeFind (line 961) | struct TextNodeFind<'a> {
function is_text_node (line 967) | fn is_text_node(node: &Node<'a>) -> bool {
function is_bad (line 971) | fn is_bad(node: &Node<'a>) -> bool {
function new (line 978) | fn new(document: &'a Document) -> Self {
type Item (line 984) | type Item = Node<'a>;
method next (line 986) | fn next(&mut self) -> Option<Node<'a>> {
FILE: server/bleep/src/scraper/chunk.rs
type Section (line 5) | pub struct Section<'s> {
function ancestry_str (line 14) | pub fn ancestry_str(&self) -> String {
function ancestry_from_str (line 19) | pub fn ancestry_from_str(s: &str) -> Vec<&str> {
constant MAX_DEPTH (line 27) | const MAX_DEPTH: usize = 1;
function sectionize (line 28) | pub fn sectionize<'s, 'b>(
function cover (line 86) | fn cover(a: tree_sitter::Range, b: tree_sitter::Range) -> tree_sitter::R...
function by_section (line 100) | pub fn by_section(src: &str) -> Vec<Section<'_>> {
FILE: server/bleep/src/semantic.rs
type SemanticError (line 34) | pub enum SemanticError {
type SemanticSearchParams (line 54) | pub struct SemanticSearchParams {
type Semantic (line 62) | pub struct Semantic {
method initialize (line 201) | pub async fn initialize(
method collection_name (line 253) | pub fn collection_name(&self) -> &str {
method qdrant_client (line 257) | pub fn qdrant_client(&self) -> &QdrantClient {
method embedder (line 261) | pub fn embedder(&self) -> &dyn Embedder {
method reset_collection_blocking (line 265) | pub async fn reset_collection_blocking(&self) -> anyhow::Result<()> {
method health_check (line 315) | pub async fn health_check(&self) -> anyhow::Result<()> {
method search_lexical (line 321) | pub async fn search_lexical<'a>(
method search_with (line 354) | pub async fn search_with<'a>(
method batch_search_with (line 392) | pub async fn batch_search_with<'a>(
method rank_lexical (line 453) | fn rank_lexical(payloads: Vec<Payload>, query: &str) -> Vec<Payload> {
method merge_rrf (line 480) | fn merge_rrf(payloads_lexical: Vec<Payload>, payloads_semantic: Vec<Pa...
method search (line 516) | pub async fn search<'a>(
method batch_search (line 579) | pub async fn batch_search<'a>(
method chunks_for_buffer (line 632) | pub fn chunks_for_buffer<'a>(
method delete_points_for_hash (line 677) | pub async fn delete_points_for_hash(
method from_qdrant (line 77) | pub fn from_qdrant(orig: ScoredPoint) -> Payload {
method from_scroll (line 89) | pub fn from_scroll(orig: RetrievedPoint) -> Payload {
method into_qdrant (line 100) | pub(crate) fn into_qdrant(self) -> HashMap<String, Value> {
function parse_payload (line 117) | fn parse_payload(
function kind_to_value (line 167) | fn kind_to_value(kind: Option<qdrant_client::qdrant::value::Kind>) -> se...
function create_indexes (line 188) | async fn create_indexes(collection_name: &str, qdrant: &QdrantClient) ->...
function init_ort_dylib (line 706) | fn init_ort_dylib(dylib_dir: impl AsRef<Path>) {
function make_kv_keyword_filter (line 722) | pub(crate) fn make_kv_keyword_filter(key: &str, value: &str) -> FieldCon...
function make_kv_text_filter (line 735) | fn make_kv_text_filter(key: &str, value: &str) -> FieldCondition {
function build_conditions_lexical (line 748) | fn build_conditions_lexical(
function build_conditions (line 770) | fn build_conditions(
function dot (line 853) | fn dot(a: &[f32], b: &[f32]) -> f32 {
function norm (line 857) | fn norm(a: &[f32]) -> f32 {
function cosine_similarity (line 861) | fn cosine_similarity(a: &[f32], b: &[f32]) -> f32 {
function mean_pool (line 866) | fn mean_pool(embeddings: Vec<Vec<f32>>) -> Vec<f32> {
function deduplicate_with_mmr (line 891) | pub fn deduplicate_with_mmr(
function filter_overlapping_snippets (line 954) | fn filter_overlapping_snippets(mut snippets: Vec<Payload>) -> Vec<Payloa...
function deduplicate_snippets (line 983) | pub fn deduplicate_snippets(
FILE: server/bleep/src/semantic/chunk.rs
type ChunkError (line 14) | pub enum ChunkError {
type Chunk (line 22) | pub struct Chunk<'a> {
function new (line 28) | pub fn new(data: &'a str, start: Point, end: Point) -> Self {
function len (line 35) | pub fn len(&self) -> usize {
function is_empty (line 39) | pub fn is_empty(&self) -> bool {
function point (line 56) | pub fn point(src: &str, byte: usize, last_line: usize, last_byte: usize)...
type OverlapStrategy (line 77) | pub enum OverlapStrategy {
type Error (line 127) | type Error = &'static str;
method try_from (line 129) | fn try_from(input: &str) -> Result<Self, &'static str> {
method next_subdivision (line 143) | fn next_subdivision(&self, max_tokens: usize) -> usize {
method fmt (line 85) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method from (line 97) | fn from(val: OverlapStrategy) -> Self {
method value_variants (line 106) | fn value_variants<'a>() -> &'a [Self] {
method to_possible_value (line 110) | fn to_possible_value(&self) -> Option<PossibleValue> {
method from_str (line 120) | fn from_str(input: &str, _ignore_case: bool) -> Result<Self, String> {
method default (line 153) | fn default() -> Self {
function is_noisy (line 161) | fn is_noisy(chunk: &str) -> bool {
constant DEDUCT_SPECIAL_TOKENS (line 177) | pub const DEDUCT_SPECIAL_TOKENS: usize = 2;
function add_token_range (line 179) | fn add_token_range<'s>(
function by_tokens (line 215) | pub fn by_tokens<'s>(
function by_lines (line 334) | pub fn by_lines(src: &str, size: usize) -> Vec<Chunk<'_>> {
function minilm (line 372) | fn minilm() -> Tokenizer {
function empty (line 385) | pub fn empty() {
function by_tokens (line 400) | pub fn by_tokens() {
function chunks_within_token_limit (line 455) | pub fn chunks_within_token_limit() {
function chunks_over_long_lined_file (line 478) | pub fn chunks_over_long_lined_file() {
FILE: server/bleep/src/semantic/embedder.rs
type EmbedQueue (line 16) | pub struct EmbedQueue {
method pop (line 22) | pub fn pop(&self) -> Option<EmbedChunk> {
method push (line 35) | pub fn push(&self, chunk: EmbedChunk) {
method len (line 40) | pub fn len(&self) -> usize {
method is_empty (line 44) | pub fn is_empty(&self) -> bool {
type EmbedChunk (line 50) | pub struct EmbedChunk {
type Embedder (line 57) | pub trait Embedder: Send + Sync {
method embed (line 58) | async fn embed(&self, data: &str) -> anyhow::Result<Embedding>;
method tokenizer (line 59) | fn tokenizer(&self) -> &Tokenizer;
method batch_embed (line 60) | async fn batch_embed(&self, log: Vec<&str>) -> anyhow::Result<Vec<Embe...
method embed (line 115) | async fn embed(&self, sequence: &str) -> anyhow::Result<Embedding> {
method tokenizer (line 163) | fn tokenizer(&self) -> &Tokenizer {
method batch_embed (line 167) | async fn batch_embed(&self, log: Vec<&str>) -> anyhow::Result<Vec<Embe...
method embed (line 249) | async fn embed(&self, sequence: &str) -> anyhow::Result<Embedding> {
method tokenizer (line 276) | fn tokenizer(&self) -> &Tokenizer {
method batch_embed (line 280) | async fn batch_embed(&self, log: Vec<&str>) -> anyhow::Result<Vec<Embe...
type LocalEmbedder (line 80) | pub struct LocalEmbedder {
method new (line 86) | pub fn new(model_dir: &Path) -> anyhow::Result<Self> {
method new (line 197) | pub fn new(model_dir: &Path) -> anyhow::Result<Self> {
type LocalEmbedder (line 185) | pub struct LocalEmbedder {
method new (line 86) | pub fn new(model_dir: &Path) -> anyhow::Result<Self> {
method new (line 197) | pub fn new(model_dir: &Path) -> anyhow::Result<Self> {
FILE: server/bleep/src/semantic/execute.rs
function execute (line 16) | pub async fn execute(
FILE: server/bleep/src/semantic/schema.rs
constant EMBEDDING_DIM (line 16) | pub(super) const EMBEDDING_DIM: usize = 384;
type Embedding (line 17) | pub type Embedding = Vec<f32>;
type Payload (line 20) | pub struct Payload {
method eq (line 42) | fn eq(&self, other: &Self) -> bool {
function create_collection (line 60) | pub(super) async fn create_collection(
function create_lexical_index (line 81) | pub(super) async fn create_lexical_index(
FILE: server/bleep/src/snippet.rs
type SnippedFile (line 10) | pub struct SnippedFile {
method merge (line 98) | pub fn merge(mut self, rhs: Self) -> Self {
type Snippet (line 19) | pub struct Snippet {
method line_count (line 327) | fn line_count(&self) -> usize {
type Location (line 31) | pub struct Location {
method join (line 45) | fn join(&mut self, rhs: Self) -> Result<(), Self> {
method reify (line 71) | pub fn reify(self, s: &str, symbols: &[Symbol]) -> Snippet {
method line_count (line 92) | pub fn line_count(&self) -> usize {
type Snipper (line 108) | pub struct Snipper {
method context (line 127) | pub fn context(mut self, before: usize, after: usize) -> Self {
method find_symbols (line 133) | pub fn find_symbols(mut self, find_symbols: bool) -> Self {
method case_sensitive (line 138) | pub fn case_sensitive(mut self, case_sensitive: bool) -> Self {
method all_for_doc (line 143) | pub fn all_for_doc(
method expand_many (line 226) | fn expand_many<'a>(
method expand (line 258) | pub fn expand<'a>(
method default (line 116) | fn default() -> Self {
type HighlightedString (line 297) | pub struct HighlightedString {
method new (line 306) | pub fn new<T: Into<String>>(text: T) -> Self {
method apply_regex (line 314) | pub fn apply_regex(&mut self, regex: &Regex) {
function with_line_ends (line 334) | fn with_line_ends(s: &str) -> (&str, Vec<u32>) {
function simple_snip (line 344) | fn simple_snip() {
function empty_lines (line 362) | fn empty_lines() {
function crlf_line_ends (line 379) | fn crlf_line_ends() {
function mixed_line_ends (line 396) | fn mixed_line_ends() {
function context_before (line 413) | fn context_before() {
function context_before_underflow (line 431) | fn context_before_underflow() {
function context_after (line 448) | fn context_after() {
function context_after_overflow (line 466) | fn context_after_overflow() {
function merge_into_one (line 483) | fn merge_into_one() {
function merge_into_two (line 509) | fn merge_into_two() {
function multiline (line 552) | fn multiline() {
function non_ascii (line 578) | fn non_ascii() {
function avoids_empty_snippets (line 598) | fn avoids_empty_snippets() {
function test_highlighted_string (line 613) | fn test_highlighted_string() {
FILE: server/bleep/src/state.rs
type RepositoryPool (line 19) | pub(crate) type RepositoryPool = Arc<scc::HashMap<RepoRef, Repository>>;
type StateSource (line 23) | pub struct StateSource {
method set_default_dir (line 96) | pub(crate) fn set_default_dir(&mut self, dir: &Path) {
method exists (line 115) | pub(crate) fn exists(&self, path: &(impl AsRef<Path> + ?Sized)) -> bool {
method load_or_default (line 119) | pub(crate) fn load_or_default<T: Serialize + DeserializeOwned + Defaul...
method load_state_or (line 126) | pub(crate) fn load_state_or<T: Serialize + DeserializeOwned + Default ...
method repo_dir (line 136) | pub(crate) fn repo_dir(&self) -> Option<PathBuf> {
method directory (line 140) | pub fn directory(&self) -> PathBuf {
method repo_path_for_name (line 145) | pub(crate) fn repo_path_for_name(&self, name: &str) -> PathBuf {
method initialize_pool (line 149) | pub(crate) fn initialize_pool(&self) -> Result<RepositoryPool, RepoErr...
method save_pool (line 218) | pub fn save_pool(&self, pool: RepositoryPool) -> Result<(), RepoError> {
method index_version_mismatch (line 225) | pub fn index_version_mismatch(&self) -> bool {
method save_index_version (line 231) | pub fn save_index_version(&self) -> Result<(), RepoError> {
type PersistedState (line 48) | pub struct PersistedState<T> {
function load_or_default (line 54) | fn load_or_default(name: &'static str, source: &StateSource) -> Result<S...
function load_or (line 62) | fn load_or(name: &'static str, source: &StateSource, val: T) -> Self {
function store (line 73) | pub fn store(&self) -> Result<()> {
type Target (line 79) | type Target = T;
method deref (line 81) | fn deref(&self) -> &Self::Target {
method clone (line 87) | fn clone(&self) -> Self {
function pretty_write_file (line 236) | pub fn pretty_write_file<T: Serialize + ?Sized>(
function read_file (line 275) | pub fn read_file<T: Default + DeserializeOwned>(path: &Path) -> Result<T...
function read_file_or_default (line 280) | pub fn read_file_or_default<T: Default + DeserializeOwned>(path: &Path) ...
function get_relative_path (line 289) | pub fn get_relative_path<P>(path: &Path, base: P) -> PathBuf
function test_repos_in (line 304) | fn test_repos_in() {
FILE: server/bleep/src/symbol.rs
type Symbol (line 6) | pub struct Symbol {
type SymbolLocations (line 14) | pub enum SymbolLocations {
method list (line 24) | pub fn list(&self) -> Vec<Symbol> {
method scope_graph (line 31) | pub fn scope_graph(&self) -> Option<&ScopeGraph> {
FILE: server/bleep/src/text_range.rs
type Point (line 7) | pub struct Point {
method new (line 31) | pub fn new(byte: usize, line: usize, column: usize) -> Self {
method from_byte (line 35) | pub fn from_byte(byte: usize, line_end_indices: &[u32]) -> Self {
method partial_cmp (line 19) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
method cmp (line 25) | fn cmp(&self, other: &Self) -> Ordering {
type TextRange (line 52) | pub struct TextRange {
method new (line 73) | pub fn new(start: Point, end: Point) -> Self {
method contains (line 78) | pub fn contains(&self, other: &TextRange) -> bool {
method contains_strict (line 84) | pub fn contains_strict(&self, other: TextRange) -> bool {
method size (line 89) | pub fn size(&self) -> usize {
method from_byte_range (line 93) | pub fn from_byte_range(range: std::ops::Range<usize>, line_end_indices...
method from (line 101) | fn from(r: tree_sitter::Range) -> Self {
method partial_cmp (line 58) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
method cmp (line 64) | fn cmp(&self, other: &Self) -> Ordering {
function from (line 118) | fn from(r: TextRange) -> std::ops::Range<usize> {
FILE: server/bleep/src/user.rs
type PromptGuideState (line 5) | pub enum PromptGuideState {
type UserProfile (line 12) | pub struct UserProfile {
method default (line 20) | fn default() -> Self {
function default_is_tutorial_finished (line 29) | fn default_is_tutorial_finished() -> bool {
FILE: server/bleep/src/webserver.rs
type Router (line 34) | pub type Router<S = Application> = axum::Router<S>;
function start (line 45) | pub async fn start(app: Application) -> anyhow::Result<()> {
function json (line 211) | pub(crate) fn json<'a, T>(val: T) -> Json<Response<'a>>
type Result (line 218) | pub type Result<T, E = Error> = std::result::Result<T, E>;
type Error (line 221) | pub struct Error {
method fmt (line 227) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
method new (line 233) | fn new(kind: ErrorKind, message: impl Into<Cow<'static, str>>) -> Error {
method with_status (line 252) | fn with_status(mut self, status_code: StatusCode) -> Self {
method internal (line 257) | fn internal<S: fmt::Display>(message: S) -> Self {
method user (line 267) | fn user<S: fmt::Display>(message: S) -> Self {
method not_found (line 277) | fn not_found<S: fmt::Display>(message: S) -> Self {
method from (line 289) | fn from(value: anyhow::Error) -> Self {
method from (line 295) | fn from(value: sqlx::Error) -> Self {
method into_response (line 301) | fn into_response(self) -> axum::response::Response {
type EndpointError (line 308) | pub struct EndpointError<'a> {
type ErrorKind (line 321) | pub enum ErrorKind {
type ApiResponse (line 334) | pub(crate) trait ApiResponse: erased_serde::Serialize {}
type Response (line 341) | pub(crate) enum Response<'a> {
function from (line 347) | fn from(value: T) -> Self {
function from (line 353) | fn from(value: EndpointError<'a>) -> Self {
function health (line 358) | async fn health(State(app): State<Application>) {
function no_user_id (line 364) | fn no_user_id() -> Error {
FILE: server/bleep/src/webserver/answer.rs
constant TIMEOUT_SECS (line 29) | const TIMEOUT_SECS: u64 = 60;
type Vote (line 32) | pub struct Vote {
type VoteFeedback (line 41) | pub enum VoteFeedback {
type Answer (line 47) | pub struct Answer {
function default_answer_model (line 59) | fn default_answer_model() -> agent::model::LLMModel {
function default_agent_model (line 63) | fn default_agent_model() -> agent::model::LLMModel {
function answer (line 67) | pub(super) async fn answer(
type AgentExecutor (line 135) | struct AgentExecutor {
method execute (line 163) | async fn execute(&mut self) -> super::Result<SseDynStream<Result<sse::...
method try_execute (line 173) | async fn try_execute(&mut self) -> super::Result<SseDynStream<Result<s...
type AnswerEvent (line 147) | enum AnswerEvent {
type StreamEnd (line 153) | struct StreamEnd {
type SseDynStream (line 159) | type SseDynStream<T> = Sse<std::pin::Pin<Box<dyn tokio_stream::Stream<It...
type Explain (line 317) | pub struct Explain {
function explain (line 327) | pub async fn explain(
FILE: server/bleep/src/webserver/autocomplete.rs
function default_true (line 22) | fn default_true() -> bool {
type AutocompleteParams (line 27) | pub struct AutocompleteParams {
function handle (line 38) | pub(super) async fn handle(
function complete_flag (line 203) | fn complete_flag(q: &str) -> impl Iterator<Item = &str> + '_ {
type AutocompleteResponse (line 211) | pub(super) struct AutocompleteResponse {
constant QUERY_FLAGS (line 218) | const QUERY_FLAGS: &[&str; 8] = &[
FILE: server/bleep/src/webserver/commits.rs
type Params (line 8) | pub(super) struct Params {
type TutorialQuestionsResponse (line 13) | pub(super) struct TutorialQuestionsResponse {
function tutorial_questions (line 19) | pub(super) async fn tutorial_questions<'a>(
FILE: server/bleep/src/webserver/config.rs
type ConfigResponse (line 7) | pub(super) struct ConfigResponse {
function get (line 20) | pub(super) async fn get(
type ConfigUpdate (line 52) | pub(super) struct ConfigUpdate {
function put (line 56) | pub(super) async fn put(
FILE: server/bleep/src/webserver/conversation.rs
type Conversation (line 18) | pub struct Conversation {
method new (line 26) | pub fn new(project_id: i64) -> Self {
method store (line 34) | pub async fn store(&self, db: &SqlDb, user_id: &str) -> Result<i64> {
method load (line 101) | pub async fn load(
type ConversationId (line 131) | pub struct ConversationId {
type ListItem (line 138) | pub struct ListItem {
function list (line 145) | pub(in crate::webserver) async fn list(
function delete (line 171) | pub(in crate::webserver) async fn delete(
function get (line 204) | pub(in crate::webserver) async fn get(
FILE: server/bleep/src/webserver/docs.rs
type Enqueue (line 21) | pub struct Enqueue {
type List (line 26) | pub struct List {
type Search (line 31) | pub struct Search {
type Fetch (line 37) | pub struct Fetch {
type Verify (line 42) | pub struct Verify {
function list (line 47) | pub async fn list(State(app): State<Application>) -> Result<Json<Vec<doc...
function list_one (line 51) | pub async fn list_one(
function delete (line 58) | pub async fn delete(State(app): State<Application>, Path(id): Path<i64>)...
function enqueue (line 62) | pub async fn enqueue(
function status (line 69) | pub async fn status(
function cancel (line 83) | pub async fn cancel(State(app): State<Application>, Path(id): Path<i64>)...
function resync (line 87) | pub async fn resync(State(app): State<Application>, Path(id): Path<i64>)...
function search (line 91) | pub async fn search(
function search_with_id (line 101) | pub async fn search_with_id(
function list_with_id (line 117) | pub async fn list_with_id(
function fetch (line 125) | pub async fn fetch(
function verify (line 133) | pub async fn verify(
method from (line 141) | fn from(value: doc::Error) -> Self {
FILE: server/bleep/src/webserver/file.rs
type FileParams (line 19) | pub(super) struct FileParams {
type FileResponse (line 32) | pub(super) struct FileResponse {
function handle (line 39) | pub(super) async fn handle<'a>(
function split_by_lines (line 60) | fn split_by_lines<'a>(
type FolderParams (line 86) | pub(super) struct FolderParams {
function folder (line 92) | pub(super) async fn folder(
function no_params (line 151) | fn no_params() {
FILE: server/bleep/src/webserver/hoverable.rs
type HoverableRequest (line 11) | pub struct HoverableRequest {
type HoverableResponse (line 24) | pub struct HoverableResponse {
function handle (line 30) | pub(super) async fn handle(
function serialize_response (line 59) | fn serialize_response() {
FILE: server/bleep/src/webserver/index.rs
function handle (line 5) | pub(super) async fn handle(Extension(app): Extension<Application>) -> im...
FILE: server/bleep/src/webserver/intelligence.rs
type TokenInfoRequest (line 22) | pub struct TokenInfoRequest {
type TokenInfoResponse (line 39) | pub(super) struct TokenInfoResponse {
method new (line 44) | fn new(data: Vec<FileSymbols>) -> Self {
function handle (line 51) | pub(super) async fn handle(
type RelatedFilesRequest (line 96) | pub(super) struct RelatedFilesRequest {
type RelatedFilesResponse (line 109) | pub struct RelatedFilesResponse {
function related_files (line 119) | pub(super) async fn related_files(
type RelatedFileKind (line 180) | pub(super) enum RelatedFileKind {
type WithRangesRequest (line 186) | pub(super) struct WithRangesRequest {
type WithRangesResponse (line 204) | pub(super) struct WithRangesResponse {
method empty (line 209) | fn empty() -> Self {
function related_file_with_ranges (line 216) | pub(super) async fn related_file_with_ranges(
type TokenValueRequest (line 256) | pub(super) struct TokenValueRequest {
type TokenValueResponse (line 273) | pub struct TokenValueResponse {
function token_value (line 280) | pub(super) async fn token_value(
function get_token_info (line 318) | pub async fn get_token_info(
function search_nav (line 364) | async fn search_nav(
function serialize_response (line 531) | fn serialize_response() {
FILE: server/bleep/src/webserver/middleware.rs
type User (line 13) | pub enum User {
method username (line 24) | pub fn username(&self) -> Option<&str> {
method github_client (line 31) | pub(crate) fn github_client(&self) -> Option<octocrab::Octocrab> {
method llm_gateway (line 40) | pub(crate) async fn llm_gateway(
function local_user (line 52) | pub fn local_user(router: Router, app: Application) -> Router {
function local_user_mw (line 56) | async fn local_user_mw<B>(
FILE: server/bleep/src/webserver/project.rs
function default_name (line 12) | fn default_name() -> String {
type ListItem (line 17) | pub struct ListItem {
function list (line 24) | pub async fn list(
type Create (line 85) | pub struct Create {
function create (line 89) | pub async fn create(
type Get (line 109) | pub struct Get {
function get (line 116) | pub async fn get(
type Update (line 165) | pub struct Update {
function update (line 169) | pub async fn update(
function delete (line 189) | pub async fn delete(
FILE: server/bleep/src/webserver/project/doc.rs
type Doc (line 10) | pub struct Doc {
function list (line 20) | pub async fn list(
type Add (line 50) | pub struct Add {
function add (line 54) | pub async fn add(
function delete (line 85) | pub async fn delete(
FILE: server/bleep/src/webserver/project/repo.rs
type ListItem (line 13) | pub struct ListItem {
function list (line 19) | pub async fn list(
type Add (line 59) | pub struct Add {
function add (line 65) | pub async fn add(
type Delete (line 100) | pub struct Delete {
function delete (line 105) | pub async fn delete(
type Put (line 135) | pub struct Put {
function put (line 141) | pub async fn put(
FILE: server/bleep/src/webserver/query.rs
function handle (line 6) | pub(super) async fn handle(
FILE: server/bleep/src/webserver/repos.rs
type Branch (line 21) | pub(crate) struct Branch {
type Repo (line 27) | pub struct Repo {
method from (line 43) | fn from((key, repo): (&RepoRef, &Repository)) -> Self {
method from_github (line 157) | pub(crate) fn from_github(
method hash (line 179) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
method eq (line 185) | fn eq(&self, other: &Self) -> bool {
type ReposResponse (line 195) | pub(crate) enum ReposResponse {
function router (line 206) | pub(super) fn router() -> Router {
function index_status (line 222) | pub(super) async fn index_status(Extension(app): Extension<Application>)...
type IndexedParams (line 240) | pub(super) struct IndexedParams {
type RepoParams (line 245) | pub(crate) struct RepoParams {
function queue (line 253) | pub(super) async fn queue(State(app): State<Application>) -> impl IntoRe...
function indexed (line 259) | pub(super) async fn indexed(
function get_by_id (line 284) | pub(super) async fn get_by_id(
function delete_by_id (line 300) | pub(super) async fn delete_by_id(
function sync (line 316) | pub(super) async fn sync(
function delete_sync (line 330) | pub(super) async fn delete_sync(
function available (line 340) | pub(super) async fn available(State(app): State<Application>) -> impl In...
type SetIndexed (line 381) | pub(super) struct SetIndexed {
function set_indexed (line 388) | pub(super) async fn set_indexed(
type ScanRequest (line 411) | pub(super) struct ScanRequest {
function scan_local (line 418) | pub(super) async fn scan_local(
function list_unique_repos (line 441) | async fn list_unique_repos(repo_pool: RepositoryPool, other: HashSet<Rep...
function unique_repos_only (line 466) | async fn unique_repos_only() {
FILE: server/bleep/src/webserver/search.rs
function semantic_code (line 15) | pub(super) async fn semantic_code(
function fuzzy_path (line 32) | pub(super) async fn fuzzy_path(
FILE: server/bleep/src/webserver/studio.rs
constant LLM_GATEWAY_MODEL (line 34) | const LLM_GATEWAY_MODEL: &str = "gpt-4-turbo";
function studio_not_found (line 36) | fn studio_not_found() -> Error {
function default_studio_name (line 40) | fn default_studio_name() -> String {
function latest_snapshot_id (line 44) | async fn latest_snapshot_id<'a, E>(studio_id: i64, exec: E, user_id: &st...
type Create (line 66) | pub struct Create {
function create (line 70) | pub async fn create(
type Studio (line 104) | pub struct Studio {
type ContextFile (line 114) | struct ContextFile {
method merge (line 126) | fn merge(mut self, rhs: Self) -> Self {
type DocContextFile (line 133) | struct DocContextFile {
type Message (line 145) | enum Message {
function from (line 151) | fn from(value: &Message) -> Self {
type Get (line 160) | pub struct Get {
function get (line 164) | pub async fn get(
type Patch (line 208) | pub struct Patch {
function patch (line 217) | pub async fn patch(
function delete (line 328) | pub async fn delete(
type ListItem (line 352) | pub struct ListItem {
function list (line 363) | pub async fn list(
type TokenCounts (line 445) | pub struct TokenCounts {
function token_counts (line 453) | async fn token_counts(
type GetFileTokenCount (line 591) | pub struct GetFileTokenCount {
function get_file_token_count (line 598) | pub async fn get_file_token_count(
type GetDocFileTokenCount (line 628) | pub struct GetDocFileTokenCount {
function get_doc_file_token_count (line 634) | pub async fn get_doc_file_token_count(
function count_tokens_for_file (line 661) | fn count_tokens_for_file(path: &str, body: &str, ranges: &[Range<usize>]...
function generate (line 705) | pub async fn generate(
function generate_llm_context (line 797) | async fn generate_llm_context(
type Diff (line 887) | pub struct Diff {
method fmt (line 892) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Chunk (line 915) | pub struct Chunk {
type Hunk (line 927) | pub struct Hunk {
function diff (line 933) | pub async fn diff(
function parse_diff_path (line 1116) | fn parse_diff_path(p: &str) -> Result<(RepoRef, &str)> {
function rectify_hunks (line 1126) | async fn rectify_hunks(
function validate_delete_file (line 1197) | async fn validate_delete_file(
function validate_add_file (line 1217) | async fn validate_add_file(
function diff_apply (line 1247) | pub async fn diff_apply(
function populate_studio_name (line 1350) | async fn populate_studio_name(
type Import (line 1409) | pub struct Import {
function import (line 1416) | pub async fn import(
function extract_relevant_chunks (line 1517) | async fn extract_relevant_chunks(
function canonicalize_context (line 1577) | fn canonicalize_context(
function fold_ranges (line 1594) | fn fold_ranges(ranges: &mut Vec<Range<usize>>) {
function merge_ranges (line 1617) | fn merge_ranges(a: &mut Range<usize>, b: Range<usize>) -> Option<Range<u...
type Snapshot (line 1630) | pub struct Snapshot {
function list_snapshots (line 1639) | pub async fn list_snapshots(
function delete_snapshot (line 1686) | pub async fn delete_snapshot(
function test_merge_ranges_nearby (line 1722) | fn test_merge_ranges_nearby() {
function test_merge_ranges_overlap (line 1735) | fn test_merge_ranges_overlap() {
function test_merge_weird_ranges (line 1742) | fn test_merge_weird_ranges() {
function test_fold_ranges (line 1754) | fn test_fold_ranges() {
function test_canonicalize_context (line 1765) | fn test_canonicalize_context() {
FILE: server/bleep/src/webserver/studio/diff.rs
function extract (line 6) | pub fn extract(chat_response: &str) -> Result<impl Iterator<Item = DiffC...
function extract_diff (line 14) | fn extract_diff(chat_response: &str) -> Result<String> {
function relaxed_parse (line 28) | pub fn relaxed_parse(diff: &str) -> impl Iterator<Item = DiffChunk> + '_ {
function split_chunks (line 35) | fn split_chunks(diff: &str) -> impl Iterator<Item = DiffChunk> + '_ {
type DiffChunk (line 55) | pub struct DiffChunk {
method fixup_hunks (line 62) | pub fn fixup_hunks(&mut self) {
method fmt (line 74) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function split_hunks (line 93) | fn split_hunks(hunks: &str) -> impl Iterator<Item = DiffHunk> + '_ {
type DiffHunk (line 132) | pub struct DiffHunk {
method fixup (line 142) | fn fixup(&mut self) -> bool {
method fmt (line 204) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Line (line 220) | pub enum Line {
method fmt (line 227) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function test_extract_diff (line 243) | fn test_extract_diff() {
function test_extract_diff_complex (line 252) | fn test_extract_diff_complex() {
function test_relaxed_parse (line 268) | fn test_relaxed_parse() {
function test_split_hunks (line 324) | fn test_split_hunks() {
function test_split_chunks (line 371) | fn test_split_chunks() {
function test_bug_split (line 432) | fn test_bug_split() {
function test_split_chunks_no_count (line 566) | fn test_split_chunks_no_count() {}
function test_fixup_remove_redundancy (line 569) | fn test_fixup_remove_redundancy() {
function test_extract_redundant (line 607) | fn test_extract_redundant() {
function test_multiple_diff_blocks (line 626) | fn test_multiple_diff_blocks() {
FILE: server/bleep/src/webserver/template.rs
type Create (line 9) | pub struct Create {
function create (line 14) | pub async fn create(
type Template (line 38) | pub struct Template {
function list (line 46) | pub async fn list(
function get (line 68) | pub async fn get(
type Patch (line 94) | pub struct Patch {
function patch (line 99) | pub async fn patch(
function delete (line 163) | pub async fn delete(
FILE: tests/onboarding.ts
constant REPOS_TO_SYNC (line 3) | const REPOS_TO_SYNC = 1;
Condensed preview — 624 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,140K chars).
[
{
"path": ".dockerignore",
"chars": 39,
"preview": "/target\n/node_modules\n**/node_modules\n\n"
},
{
"path": ".envrc",
"chars": 12,
"preview": "use flake .\n"
},
{
"path": ".eslintrc.json",
"chars": 1452,
"preview": "{\n \"env\": {\n \"browser\": true,\n \"es2021\": true,\n \"mocha\": true,\n \"jest/globals\": true,\n "
},
{
"path": ".gitattributes",
"chars": 955,
"preview": "apps/desktop/src-tauri/model/vocab.txt filter=lfs diff=lfs merge=lfs -text\napps/desktop/src-tauri/model/model.onnx filte"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 738,
"preview": "---\nname: Bug report\nabout: Create a bug report for bloop.\nlabels: bug\n\n---\n<!--\nThank you for filing a bug report! 🐛 Pl"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 537,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\nlabels: feature\n---\n\n<!--\nThank you for filing a featu"
},
{
"path": ".github/ISSUE_TEMPLATE/request-for-comments.md",
"chars": 610,
"preview": "---\nname: Request for comments\nabout: An engineering/feature proposal with in-depth details\nlabels: rfc\n---\n\n**High leve"
},
{
"path": ".github/workflows/build-on-pr-command.yml",
"chars": 3650,
"preview": "name: Build Bloop container with latest PR commit tag on build command\n\non:\n issue_comment:\n types: [created]\n\njobs:"
},
{
"path": ".github/workflows/build-on-pr.yml",
"chars": 755,
"preview": "name: Build and push docker container\non: workflow_dispatch\n\njobs:\n build_and_push:\n uses: BloopAI/workflows/.github"
},
{
"path": ".github/workflows/build-on-release.yml",
"chars": 633,
"preview": "name: Build&Push bloop docker container image with release tag\non:\n release:\n types: [published, prereleased]\n\njobs:"
},
{
"path": ".github/workflows/client-test.yml",
"chars": 1004,
"preview": "name: Client Tests\n\non:\n pull_request:\n types: [opened, synchronize]\n branches: [main]\n paths:\n - \"client"
},
{
"path": ".github/workflows/dependencies.yml",
"chars": 1610,
"preview": "name: Dependency matrix\t\n\non:\t\n workflow_dispatch:\n pull_request:\t\n branches: [main]\t\n paths:\t\n - \"flake.ni"
},
{
"path": ".github/workflows/dummy.yml",
"chars": 482,
"preview": "name: dummy\n\non:\n pull_request:\n paths-ignore:\n - \".github/workflows/server**\"\n - \".github/workflows/clien"
},
{
"path": ".github/workflows/server-test.yml",
"chars": 1372,
"preview": "name: Server Unit Tests\n\non:\n pull_request:\n branches: [main]\n paths:\n - \"flake.*\"\n - \"server/**\"\n "
},
{
"path": ".github/workflows/tauri-release.yml",
"chars": 8078,
"preview": "name: Tauri Release\n\non:\n workflow_dispatch:\n pull_request:\n paths:\n - \".github/workflows/tauri-release.yml\"\n "
},
{
"path": ".github/workflows/tauri-test.yml",
"chars": 1765,
"preview": "name: Tauri Tests\n\non:\n pull_request:\n types: [opened, synchronize]\n branches: [main]\n paths:\n - \"apps/de"
},
{
"path": ".gitignore",
"chars": 829,
"preview": "# Env\n.direnv\n.idea\n.DS_Store\n.vscode\n\n# Generated by Cargo\n# will have compiled files and executables\ndebug/\ntarget/\n\n#"
},
{
"path": ".gitpod.Dockerfile",
"chars": 1686,
"preview": "FROM axonasif/workspace-base\n\nARG NIX_VERSION=\"2.11.0\"\nARG NIX_CONFIG=\"experimental-features = nix-command flakes\"\n\nENV "
},
{
"path": ".gitpod.yml",
"chars": 2917,
"preview": "# This configuration file was automatically generated by Gitpod.\n# Please adjust to your needs (see https://www.gitpod.i"
},
{
"path": ".taurignore",
"chars": 132,
"preview": "server/bleep/bleep.db*\napps/desktop/src-tauri/dylibs/*.so\napps/desktop/src-tauri/dylibs/*.dylib\napps/desktop/src-tauri/d"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3861,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
},
{
"path": "CONTRIBUTING.md",
"chars": 2611,
"preview": "Guide to new contributors\n=========================\n\nThanks for your interest in contributing to `bloop`!\n\nBefore jumpin"
},
{
"path": "Cargo.toml",
"chars": 362,
"preview": "[workspace]\nresolver = \"2\"\nmembers = [\n \"server/bleep\",\n \"apps/desktop/src-tauri\"\n]\n\n[profile.dev]\nopt-level = 3\n\n"
},
{
"path": "Dockerfile",
"chars": 1738,
"preview": "FROM node AS frontend\n\nWORKDIR /build\nCOPY package.json package-lock.json ./\nRUN npm ci\nCOPY apps/ apps\nCOPY client/ cli"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 4766,
"preview": "<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://assets.bloop.ai/bloop_github_logo_dark.png\">\n "
},
{
"path": "apps/desktop/.gitignore",
"chars": 379,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist/*\n!"
},
{
"path": "apps/desktop/README.md",
"chars": 1088,
"preview": "# bloop App\n\nThe bloop app is built using [Tauri](https://github.com/tauri-apps/tauri), a Rust framework for building cr"
},
{
"path": "apps/desktop/index.html",
"chars": 1619,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href=\"/favic"
},
{
"path": "apps/desktop/package.json",
"chars": 256,
"preview": "{\n \"name\": \"@bloop/desktop\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"scripts\": {\n \"dev\": \"vite\",\n \"tsc\": \"tsc"
},
{
"path": "apps/desktop/postcss.config.cjs",
"chars": 82,
"preview": "module.exports = {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n}\n"
},
{
"path": "apps/desktop/src/App.tsx",
"chars": 4820,
"preview": "import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { invoke } from '@ta"
},
{
"path": "apps/desktop/src/TextSearch.tsx",
"chars": 4268,
"preview": "import React, { useCallback, useEffect, useState } from 'react';\nimport {\n ACTIVE_HIGHLIGHT_CLASSNAME,\n HIGHLIGHT_CLAS"
},
{
"path": "apps/desktop/src/global.d.ts",
"chars": 11,
"preview": "export {};\n"
},
{
"path": "apps/desktop/src/main.tsx",
"chars": 229,
"preview": "import React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport App from './App';\n\nReactDOM.createRoot(docume"
},
{
"path": "apps/desktop/src/vite-env.d.ts",
"chars": 38,
"preview": "/// <reference types=\"vite/client\" />\n"
},
{
"path": "apps/desktop/src-tauri/.gitignore",
"chars": 73,
"preview": "# Generated by Cargo\n# will have compiled files and executables\n/target/\n"
},
{
"path": "apps/desktop/src-tauri/Cargo.toml",
"chars": 1506,
"preview": "[package]\nname = \"bloop\"\nversion = \"0.6.4\"\ndescription = \"Search code. Fast.\"\nauthors = [\"Bloop AI Developers\"]\nlicense "
},
{
"path": "apps/desktop/src-tauri/bin/qdrant-aarch64-apple-darwin",
"chars": 133,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:790591ece18fdc99761f59c31282237b07389ce3dd2eecd50cceb95fddbe96f5\ns"
},
{
"path": "apps/desktop/src-tauri/bin/qdrant-x86_64-apple-darwin",
"chars": 133,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:de8dad5075c1bcbe403e0df610a2b2933ca49457300cda0af1a104a080e5ce76\ns"
},
{
"path": "apps/desktop/src-tauri/bin/qdrant-x86_64-unknown-linux-gnu",
"chars": 133,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:4abf2e680bf51edde94dee2ba51b7941c9a72f3748303716a94c9b01aaf21d83\ns"
},
{
"path": "apps/desktop/src-tauri/build.rs",
"chars": 2271,
"preview": "use std::{\n env, fs,\n path::{Path, PathBuf},\n thread,\n time::Duration,\n};\n\nfn main() {\n // we do not requ"
},
{
"path": "apps/desktop/src-tauri/config/config.json",
"chars": 3,
"preview": "{}\n"
},
{
"path": "apps/desktop/src-tauri/dylibs/.keep",
"chars": 0,
"preview": ""
},
{
"path": "apps/desktop/src-tauri/frameworks/.keep",
"chars": 0,
"preview": ""
},
{
"path": "apps/desktop/src-tauri/installer.nsi",
"chars": 22883,
"preview": "Unicode true\n; Set the compression algorithm. Default is LZMA.\n!if \"{{compression}}\" == \"\"\n SetCompressor /SOLID lzma\n!"
},
{
"path": "apps/desktop/src-tauri/model/ggml/tokenizer.json",
"chars": 131,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:65c14be98b474267fa3b8129ac643ca9356234b54bb19d8d1b95ca67b55f469f\ns"
},
{
"path": "apps/desktop/src-tauri/model/model.onnx",
"chars": 133,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:712cda19c5e4803e4d2f1d5ae972083537ffc2531759b67641622251c8ec3caf\ns"
},
{
"path": "apps/desktop/src-tauri/model/special_tokens_map.json",
"chars": 128,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:b6d346be366a7d1d48332dbc9fdf3bf8960b5d879522b7799ddba59e76237ee3\ns"
},
{
"path": "apps/desktop/src-tauri/model/tokenizer.json",
"chars": 131,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:d241a60d5e8f04cc1b2b3e9ef7a4921b27bf526d9f6050ab90f9267a1f9e5c66\ns"
},
{
"path": "apps/desktop/src-tauri/model/tokenizer_config.json",
"chars": 128,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:5a0279327ed471a6e4cfb88b6f62f73d8e8ddf3fdc1e9cbb98f692b1b9ae0d91\ns"
},
{
"path": "apps/desktop/src-tauri/model/vocab.txt",
"chars": 131,
"preview": "version https://git-lfs.github.com/spec/v1\noid sha256:07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3\ns"
},
{
"path": "apps/desktop/src-tauri/src/QDRANT_CONFIG_TEMPLATE.yml",
"chars": 5161,
"preview": "telemetry_disabled: true\nstorage:\n # Where to store all the data\n storage_path: {storage}\n\n # Where to store snapshot"
},
{
"path": "apps/desktop/src-tauri/src/backend.rs",
"chars": 3379,
"preview": "use bleep::{Application, Configuration, Environment};\nuse tracing::error;\n\nuse super::{Manager, Payload, Runtime};\nuse s"
},
{
"path": "apps/desktop/src-tauri/src/config.rs",
"chars": 1931,
"preview": "use bleep::Configuration;\nuse once_cell::sync::OnceCell;\nuse tauri::Runtime;\n\nstatic CONFIG: OnceCell<Configuration> = O"
},
{
"path": "apps/desktop/src-tauri/src/main.rs",
"chars": 3412,
"preview": "#![cfg_attr(\n all(not(debug_assertions), target_os = \"windows\"),\n windows_subsystem = \"windows\"\n)]\n\nmod backend;\nm"
},
{
"path": "apps/desktop/src-tauri/src/qdrant.rs",
"chars": 5027,
"preview": "use std::{\n fs::{create_dir_all, write, File},\n path::{Path, PathBuf},\n process::{Child, Command},\n};\n\nuse taur"
},
{
"path": "apps/desktop/src-tauri/tauri.conf.json",
"chars": 2246,
"preview": "{\n \"$schema\": \"../../../node_modules/@tauri-apps/cli/schema.json\",\n \"build\": {\n \"beforeBuildCommand\": \"npm run buil"
},
{
"path": "apps/desktop/tailwind.config.cjs",
"chars": 220,
"preview": "/** @type {import('tailwindcss').Config} */\nconst basicConfig = require(\"../../client/tailwind.config.cjs\");\n\nmodule.exp"
},
{
"path": "apps/desktop/tsconfig.json",
"chars": 69,
"preview": "{\n \"extends\": \"../../client/tsconfig.json\",\n \"include\": [\"src\"],\n}\n"
},
{
"path": "apps/desktop/tsconfig.node.json",
"chars": 184,
"preview": "{\n \"compilerOptions\": {\n \"composite\": true,\n \"module\": \"ESNext\",\n \"moduleResolution\": \"Node\",\n \"allowSynthe"
},
{
"path": "apps/desktop/vite.config.ts",
"chars": 645,
"preview": "import { defineConfig } from 'vite';\nimport react from '@vitejs/plugin-react';\nimport EnvironmentPlugin from 'vite-plugi"
},
{
"path": "client/.gitignore",
"chars": 287,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndis"
},
{
"path": "client/.storybook/main.cjs",
"chars": 352,
"preview": "module.exports = {\n \"stories\": [\n \"../src/**/*.stories.mdx\",\n \"../src/**/*.stories.@(js|jsx|ts|tsx)\"\n ],\n \"addo"
},
{
"path": "client/.storybook/preview-head.html",
"chars": 44,
"preview": "<script>\n window.global = window;\n</script>"
},
{
"path": "client/.storybook/preview.cjs",
"chars": 202,
"preview": "import '../src/index.css';\n\nexport const parameters = {\n actions: { argTypesRegex: \"^on[A-Z].*\" },\n controls: {\n ma"
},
{
"path": "client/README.md",
"chars": 434,
"preview": "# Client\n\n## Searching in the browser\n\nYou can use bloop in the browser, without running the Tauri app. First follow [th"
},
{
"path": "client/index.html",
"chars": 360,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href=\"/favic"
},
{
"path": "client/jest.config.js",
"chars": 426,
"preview": "/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */\nmodule.exports = {\n preset: 'ts-jest',\n testEnvironme"
},
{
"path": "client/package.json",
"chars": 439,
"preview": "{\n \"name\": \"@bloop/client\",\n \"private\": true,\n \"version\": \"0.6.4\",\n \"scripts\": {\n \"dev\": \"vite\",\n \"build\": \"ts"
},
{
"path": "client/postcss.config.cjs",
"chars": 82,
"preview": "module.exports = {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n}\n"
},
{
"path": "client/src/App.tsx",
"chars": 2114,
"preview": "import React, { memo } from 'react';\nimport { DndProvider } from 'react-dnd';\nimport { HTML5Backend } from 'react-dnd-ht"
},
{
"path": "client/src/CloudApp.tsx",
"chars": 1833,
"preview": "import React, { useEffect, useMemo, useState } from 'react';\nimport { BrowserRouter } from 'react-router-dom';\nimport pa"
},
{
"path": "client/src/CommandBar/Body/Item.tsx",
"chars": 4559,
"preview": "import React, {\n memo,\n ReactElement,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react';\nimport {\n C"
},
{
"path": "client/src/CommandBar/Body/Section.tsx",
"chars": 1166,
"preview": "import { Dispatch, memo, SetStateAction } from 'react';\nimport {\n CommandBarItemCustomType,\n CommandBarItemGeneralType"
},
{
"path": "client/src/CommandBar/Body/SectionDivider.tsx",
"chars": 278,
"preview": "import { memo } from 'react';\n\ntype Props = {\n text: string;\n};\n\nconst SectionDivider = ({ text }: Props) => {\n return"
},
{
"path": "client/src/CommandBar/Body/index.tsx",
"chars": 1730,
"preview": "import { memo, useEffect, useMemo } from 'react';\nimport { CommandBarSectionType } from '../../types/general';\nimport us"
},
{
"path": "client/src/CommandBar/Footer/HintButton.tsx",
"chars": 858,
"preview": "import { ForwardedRef, forwardRef, memo } from 'react';\nimport useShortcuts from '../../hooks/useShortcuts';\n\ntype Props"
},
{
"path": "client/src/CommandBar/Footer/index.tsx",
"chars": 1896,
"preview": "import { memo, useCallback, useContext, useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { "
},
{
"path": "client/src/CommandBar/Header/ChipItem.tsx",
"chars": 305,
"preview": "import { memo } from 'react';\n\ntype Props = { text: string };\n\nconst CommandBarChipItem = ({ text }: Props) => {\n retur"
},
{
"path": "client/src/CommandBar/Header/index.tsx",
"chars": 3781,
"preview": "import {\n ChangeEvent,\n memo,\n ReactElement,\n useCallback,\n useContext,\n useState,\n} from 'react';\nimport { useTra"
},
{
"path": "client/src/CommandBar/Tutorial/TutorialBody.tsx",
"chars": 2325,
"preview": "import React, { memo, useCallback, useContext } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimp"
},
{
"path": "client/src/CommandBar/Tutorial/TutorialTooltip.tsx",
"chars": 745,
"preview": "import React, { memo, PropsWithChildren, useEffect, useState } from 'react';\nimport Tippy from '@tippyjs/react/headless'"
},
{
"path": "client/src/CommandBar/index.tsx",
"chars": 3756,
"preview": "import { memo, useCallback, useContext, useMemo } from 'react';\nimport Modal from '../components/Modal';\nimport useKeybo"
},
{
"path": "client/src/CommandBar/steps/AddNewRepo.tsx",
"chars": 4984,
"preview": "import React, { memo, useCallback, useContext, useMemo } from 'react';\nimport { Trans, useTranslation } from 'react-i18n"
},
{
"path": "client/src/CommandBar/steps/AddToStudio.tsx",
"chars": 5345,
"preview": "import {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport "
},
{
"path": "client/src/CommandBar/steps/CreateProject.tsx",
"chars": 2222,
"preview": "import {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport "
},
{
"path": "client/src/CommandBar/steps/Documentation/ActionsDropdown.tsx",
"chars": 1760,
"preview": "import { memo, useContext, useEffect, useMemo } from 'react';\nimport SectionItem from '../../../components/Dropdown/Sect"
},
{
"path": "client/src/CommandBar/steps/Documentation/index.tsx",
"chars": 5844,
"preview": "import {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport "
},
{
"path": "client/src/CommandBar/steps/Initial.tsx",
"chars": 13074,
"preview": "import React, {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { Tran"
},
{
"path": "client/src/CommandBar/steps/LocalRepos.tsx",
"chars": 4468,
"preview": "import {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport "
},
{
"path": "client/src/CommandBar/steps/ManageRepos/ActionsDropdown.tsx",
"chars": 3534,
"preview": "import { Dispatch, memo, SetStateAction, useContext, useMemo } from 'react';\nimport { useTranslation } from 'react-i18ne"
},
{
"path": "client/src/CommandBar/steps/ManageRepos/index.tsx",
"chars": 8172,
"preview": "import React, {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n"
},
{
"path": "client/src/CommandBar/steps/PrivateRepos/ActionsDropdown.tsx",
"chars": 1334,
"preview": "import { memo, useContext, useMemo } from 'react';\nimport SectionItem from '../../../components/Dropdown/Section/Section"
},
{
"path": "client/src/CommandBar/steps/PrivateRepos/index.tsx",
"chars": 4866,
"preview": "import React, {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n"
},
{
"path": "client/src/CommandBar/steps/PublicRepos.tsx",
"chars": 2798,
"preview": "import {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport "
},
{
"path": "client/src/CommandBar/steps/SeachDocs.tsx",
"chars": 5471,
"preview": "import {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useDeferredValue,\n useEffect,\n useMemo,\n useState,\n} f"
},
{
"path": "client/src/CommandBar/steps/SeachFiles.tsx",
"chars": 6682,
"preview": "import React, {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useDeferredValue,\n useEffect,\n useMemo,\n useSta"
},
{
"path": "client/src/CommandBar/steps/ToggleTheme.tsx",
"chars": 1965,
"preview": "import { memo, useCallback, useContext, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {"
},
{
"path": "client/src/CommandBar/steps/items/DocItem.tsx",
"chars": 8240,
"preview": "import {\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Tra"
},
{
"path": "client/src/CommandBar/steps/items/RepoItem.tsx",
"chars": 8722,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n} from 'react';\nimport { useTranslation } f"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/ActionsDropdown.tsx",
"chars": 1956,
"preview": "import { memo, useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSection from '"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/ChatPersistentState.tsx",
"chars": 20248,
"preview": "import {\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useTranslation"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Conversation.tsx",
"chars": 2782,
"preview": "import React, {\n memo,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { ChatMessage"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/DeprecatedClientModal.tsx",
"chars": 2463,
"preview": "import { useContext } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimport { CloseSignIcon } from"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/index.tsx",
"chars": 8037,
"preview": "import { memo, useCallback, useEffect, useMemo, useState } from 'react';\nimport { EditorState, TextSelection, Transactio"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/mentionPlugin.ts",
"chars": 11768,
"preview": "import { Plugin, PluginKey } from 'prosemirror-state';\nimport { Decoration, DecorationSet, EditorView } from 'prosemirro"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/nodes.ts",
"chars": 3599,
"preview": "// @ts-ignore\nimport * as icons from 'file-icons-js';\nimport { type AttributeSpec, type NodeSpec } from 'prosemirror-mod"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/placeholderPlugin.ts",
"chars": 462,
"preview": "import { Plugin } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\n\nexport const placeholderPlug"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Input/ProseMirror/utils.ts",
"chars": 1252,
"preview": "import OrderedMap from 'orderedmap';\nimport { type NodeSpec } from 'prosemirror-model';\nimport {\n InputEditorContent,\n "
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Input/ReactMentions/index.tsx",
"chars": 9427,
"preview": "import React, {\n memo,\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport {\n Mentio"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Input/index.tsx",
"chars": 12014,
"preview": "import {\n Dispatch,\n memo,\n SetStateAction,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'r"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Message/LoadingStep.tsx",
"chars": 1232,
"preview": "import { memo, useCallback, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport FileChip f"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Message/UserParsedQuery/LangChip.tsx",
"chars": 596,
"preview": "import { getFileExtensionForLang } from '../../../../../utils';\nimport FileIcon from '../../../../../components/FileIcon"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Message/UserParsedQuery/PathChip.tsx",
"chars": 877,
"preview": "import { useMemo } from 'react';\nimport { FolderIcon } from '../../../../../icons';\nimport FileIcon from '../../../../.."
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Message/UserParsedQuery/RepoChip.tsx",
"chars": 578,
"preview": "import { RepositoryIcon } from '../../../../../icons';\nimport { splitPath } from '../../../../../utils';\n\ntype Props = {"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Message/UserParsedQuery/index.tsx",
"chars": 958,
"preview": "import { memo } from 'react';\nimport {\n ParsedQueryType,\n ParsedQueryTypeEnum,\n} from '../../../../../types/general';\n"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/Message/index.tsx",
"chars": 8627,
"preview": "import { memo, useCallback, useContext, useEffect, useState } from 'react';\nimport { Trans, useTranslation } from 'react"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/ScrollableContent.tsx",
"chars": 3130,
"preview": "import { Fragment, memo, useContext, useEffect } from 'react';\nimport { Trans } from 'react-i18next';\nimport { ChatMessa"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/StarterMessage.tsx",
"chars": 3255,
"preview": "import { memo, useCallback, useContext, useEffect, useState } from 'react';\nimport { Trans, useTranslation } from 'react"
},
{
"path": "client/src/Project/CurrentTabContent/ChatTab/index.tsx",
"chars": 4081,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n} from 'react';\nimport { useTranslation } f"
},
{
"path": "client/src/Project/CurrentTabContent/DocTab/ActionsDropdown.tsx",
"chars": 1801,
"preview": "import { memo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSection from '../../../comp"
},
{
"path": "client/src/Project/CurrentTabContent/DocTab/DocSection.tsx",
"chars": 2198,
"preview": "import React, { Dispatch, memo, SetStateAction, useCallback } from 'react';\nimport { Trans } from 'react-i18next';\nimpor"
},
{
"path": "client/src/Project/CurrentTabContent/DocTab/RenderedSection.tsx",
"chars": 1452,
"preview": "import React, { memo, useCallback, useContext, useMemo } from 'react';\nimport { Remarkable } from 'remarkable';\nimport {"
},
{
"path": "client/src/Project/CurrentTabContent/DocTab/index.tsx",
"chars": 16202,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { Trans,"
},
{
"path": "client/src/Project/CurrentTabContent/DropTarget.tsx",
"chars": 1428,
"preview": "import { memo } from 'react';\nimport { useDrop } from 'react-dnd';\nimport { Trans, useTranslation } from 'react-i18next'"
},
{
"path": "client/src/Project/CurrentTabContent/EmptyTab.tsx",
"chars": 1483,
"preview": "import { memo } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimport useShortcuts from '../../hoo"
},
{
"path": "client/src/Project/CurrentTabContent/FileTab/ActionsDropdown.tsx",
"chars": 2133,
"preview": "import { memo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSection from '../../../comp"
},
{
"path": "client/src/Project/CurrentTabContent/FileTab/index.tsx",
"chars": 22002,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n useTransition,\n} from 'react'"
},
{
"path": "client/src/Project/CurrentTabContent/Header/AddTabButton.tsx",
"chars": 2524,
"preview": "import React, { memo, useCallback, useContext, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\ni"
},
{
"path": "client/src/Project/CurrentTabContent/Header/AddTabDropdown.tsx",
"chars": 2099,
"preview": "import React, { memo, useCallback, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport Sec"
},
{
"path": "client/src/Project/CurrentTabContent/Header/TabButton.tsx",
"chars": 7770,
"preview": "import React, {\n memo,\n MouseEvent,\n useCallback,\n useContext,\n useRef,\n} from 'react';\nimport { useTranslation } f"
},
{
"path": "client/src/Project/CurrentTabContent/Header/index.tsx",
"chars": 3936,
"preview": "import React, { memo, useCallback, useContext, useMemo } from 'react';\nimport HeaderRightPart from '../../../components/"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/ActionsDropdown.tsx",
"chars": 2282,
"preview": "import { memo, useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSection from '"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/Conversation/ContextError.tsx",
"chars": 700,
"preview": "import { memo } from 'react';\nimport { Trans } from 'react-i18next';\nimport { WarningSignIcon } from '../../../../icons'"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/Conversation/GeneratedDiff.tsx",
"chars": 2987,
"preview": "import { Dispatch, memo, SetStateAction, useCallback, useContext } from 'react';\nimport { Trans, useTranslation } from '"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/Conversation/Input/TemplatesDropdown.tsx",
"chars": 3304,
"preview": "import {\n ChangeEvent,\n MouseEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useState,\n useRef,\n} from 're"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/Conversation/Input/index.tsx",
"chars": 8669,
"preview": "import React, {\n ChangeEvent,\n memo,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useStat"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/Conversation/NoFilesMessage.tsx",
"chars": 1793,
"preview": "import { memo, useCallback, useContext, useMemo } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\ni"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/Conversation/StarterMessage.tsx",
"chars": 1191,
"preview": "import { memo } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimport { CodeStudioIcon } from '../"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/Conversation/index.tsx",
"chars": 11069,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimpor"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/DeprecatedClientModal.tsx",
"chars": 2463,
"preview": "import { useContext } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimport { CloseSignIcon } from"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/StudioPersistentState.tsx",
"chars": 16408,
"preview": "import {\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useTranslation"
},
{
"path": "client/src/Project/CurrentTabContent/StudioTab/index.tsx",
"chars": 8977,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n} from 'react';\nimport { Trans, useTranslat"
},
{
"path": "client/src/Project/CurrentTabContent/index.tsx",
"chars": 3890,
"preview": "import React, { memo, useCallback, useContext } from 'react';\nimport { useDrop } from 'react-dnd';\nimport { Trans } from"
},
{
"path": "client/src/Project/EmptyProject.tsx",
"chars": 2382,
"preview": "import React, { memo, useCallback, useContext } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimp"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Conversations/ConversationsDropdown.tsx",
"chars": 1327,
"preview": "import { memo, useCallback, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSe"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Conversations/CoversationEntry.tsx",
"chars": 1406,
"preview": "import React, { memo, useCallback, useContext } from 'react';\nimport { ConversationShortType } from '../../../../types/a"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Conversations/index.tsx",
"chars": 2646,
"preview": "import React, { Dispatch, memo, SetStateAction, useContext } from 'react';\nimport { Trans, useTranslation } from 'react-"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Doc/DocDropdown.tsx",
"chars": 1562,
"preview": "import { memo, useCallback, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSe"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Doc/DocEntry.tsx",
"chars": 1637,
"preview": "import React, { memo, useCallback, useContext } from 'react';\nimport { DocPageType } from '../../../../types/api';\nimpor"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Doc/index.tsx",
"chars": 3967,
"preview": "import React, {\n Dispatch,\n memo,\n SetStateAction,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n}"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Repo/RepoDropdown.tsx",
"chars": 8669,
"preview": "import {\n memo,\n useCallback,\n useContext,\n useState,\n MouseEvent,\n ChangeEvent,\n useMemo,\n useEffect,\n} from 'r"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Repo/RepoEntry.tsx",
"chars": 5980,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { ChevronRightIcon,"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Repo/index.tsx",
"chars": 5641,
"preview": "import React, {\n Dispatch,\n memo,\n SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Studios/AddContextFile.tsx",
"chars": 1967,
"preview": "import React, { memo, useCallback, useContext } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimp"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Studios/StudioEntry.tsx",
"chars": 6959,
"preview": "import React, {\n Dispatch,\n memo,\n SetStateAction,\n useCallback,\n useEffect,\n} from 'react';\nimport { Trans, useTra"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Studios/StudioFile.tsx",
"chars": 3359,
"preview": "import React, { memo, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport Tooltip from '../.."
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Studios/StudioHistory.tsx",
"chars": 3492,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { Trans, useTransla"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Studios/StudioSubItem.tsx",
"chars": 2783,
"preview": "import React, { memo, PropsWithChildren, useCallback, useContext } from 'react';\nimport { TabsContext } from '../../../."
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Studios/StudiosDropdown.tsx",
"chars": 1269,
"preview": "import { memo, useCallback, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSe"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/Studios/index.tsx",
"chars": 4838,
"preview": "import React, {\n Dispatch,\n memo,\n SetStateAction,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { Tran"
},
{
"path": "client/src/Project/LeftSidebar/NavPanel/index.tsx",
"chars": 5156,
"preview": "import { memo, useContext, useEffect, useMemo, useState } from 'react';\nimport { ProjectContext } from '../../../context"
},
{
"path": "client/src/Project/LeftSidebar/RegexSearchPanel/AutocompleteMenu.tsx",
"chars": 2311,
"preview": "import React, { memo, useMemo } from 'react';\nimport { Trans } from 'react-i18next';\nimport { ResultItemType, Suggestion"
},
{
"path": "client/src/Project/LeftSidebar/RegexSearchPanel/AutocompleteMenuItem.tsx",
"chars": 3126,
"preview": "import React, { memo, useEffect, useMemo, useRef } from 'react';\nimport { Trans } from 'react-i18next';\nimport { ResultI"
},
{
"path": "client/src/Project/LeftSidebar/RegexSearchPanel/Results/CodeLine.tsx",
"chars": 4589,
"preview": "import React, { memo, useCallback, useContext, useMemo } from 'react';\nimport { TabTypesEnum } from '../../../../types/g"
},
{
"path": "client/src/Project/LeftSidebar/RegexSearchPanel/Results/CodeResult.tsx",
"chars": 2293,
"preview": "import React, { memo, useCallback, useState } from 'react';\nimport { SnippetItem } from '../../../../types/api';\nimport "
},
{
"path": "client/src/Project/LeftSidebar/RegexSearchPanel/Results/FileResult.tsx",
"chars": 3617,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport FileIcon from '../."
},
{
"path": "client/src/Project/LeftSidebar/RegexSearchPanel/Results/RepoResult.tsx",
"chars": 3065,
"preview": "import React, { memo, useCallback, useEffect, useState } from 'react';\nimport GitHubIcon from '../../../../icons/GitHubI"
},
{
"path": "client/src/Project/LeftSidebar/RegexSearchPanel/index.tsx",
"chars": 9051,
"preview": "import React, {\n ChangeEvent,\n FormEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} fr"
},
{
"path": "client/src/Project/LeftSidebar/index.tsx",
"chars": 4008,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n MouseEvent,\n useMemo,\n} from 'react';\nimport useResizeableWidth "
},
{
"path": "client/src/Project/RightTab.tsx",
"chars": 1110,
"preview": "import React, { memo } from 'react';\nimport useResizeableWidth from '../hooks/useResizeableWidth';\nimport { RIGHT_SIDEBA"
},
{
"path": "client/src/Project/TutorialCards.tsx",
"chars": 6199,
"preview": "import React, {\n memo,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { Trans,"
},
{
"path": "client/src/Project/index.tsx",
"chars": 5264,
"preview": "import React, { memo, useCallback, useContext, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\ni"
},
{
"path": "client/src/ProjectSettings/General.tsx",
"chars": 3052,
"preview": "import React, {\n ChangeEvent,\n memo,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { Tr"
},
{
"path": "client/src/ProjectSettings/Templates/ActionsDropdown.tsx",
"chars": 1120,
"preview": "import { memo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSection from '../../compone"
},
{
"path": "client/src/ProjectSettings/Templates/TemplateItem.tsx",
"chars": 2104,
"preview": "import React, { memo, useCallback, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Stud"
},
{
"path": "client/src/ProjectSettings/Templates/index.tsx",
"chars": 4837,
"preview": "import React, {\n ChangeEvent,\n memo,\n useCallback,\n useEffect,\n useState,\n} from 'react';\nimport { Trans, useTransl"
},
{
"path": "client/src/ProjectSettings/index.tsx",
"chars": 2426,
"preview": "import React, { memo, useCallback, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { U"
},
{
"path": "client/src/Settings/General/index.tsx",
"chars": 2557,
"preview": "import React, {\n ChangeEvent,\n memo,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { Trans, useTranslat"
},
{
"path": "client/src/Settings/Preferences/ChatInputTypeDropdown.tsx",
"chars": 1255,
"preview": "import { memo, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport DropdownSection from '."
},
{
"path": "client/src/Settings/Preferences/LanguageDropdown.tsx",
"chars": 1198,
"preview": "import { memo, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport SectionItem from '../.."
},
{
"path": "client/src/Settings/Preferences/ThemeDropdown.tsx",
"chars": 1668,
"preview": "import { memo, useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport SectionItem from '../.."
},
{
"path": "client/src/Settings/Preferences/index.tsx",
"chars": 3983,
"preview": "import React, { memo, useContext } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimport Dropdown "
},
{
"path": "client/src/Settings/index.tsx",
"chars": 2122,
"preview": "import React, { memo, useCallback, useContext, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\ni"
},
{
"path": "client/src/components/Badge/index.tsx",
"chars": 1563,
"preview": "import { memo } from 'react';\n\ntype Props = {\n type?:\n | 'outlined'\n | 'filled'\n | 'green'\n | 'green-subtle"
},
{
"path": "client/src/components/Breadcrumbs/BreadcrumbSection.tsx",
"chars": 2223,
"preview": "import { memo, MouseEvent, ReactElement, useCallback } from 'react';\nimport { Range } from '../../types/results';\n\ntype "
},
{
"path": "client/src/components/Breadcrumbs/BreadcrumbsCollapsed.tsx",
"chars": 2893,
"preview": "import React, { memo, useCallback, useEffect, useRef, useState } from 'react';\nimport Tippy from '@tippyjs/react/headles"
},
{
"path": "client/src/components/Breadcrumbs/PathContainer.tsx",
"chars": 1931,
"preview": "import React, { memo, useMemo } from 'react';\nimport {\n breadcrumbsItemPath,\n isWindowsPath,\n splitPath,\n splitPathF"
},
{
"path": "client/src/components/Breadcrumbs/index.tsx",
"chars": 5099,
"preview": "import React, {\n Fragment,\n MouseEvent,\n ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n ClipboardE"
},
{
"path": "client/src/components/Button/KeyHintButton.tsx",
"chars": 1301,
"preview": "import { ButtonHTMLAttributes, DetailedHTMLProps, memo } from 'react';\nimport useShortcuts from '../../hooks/useShortcut"
},
{
"path": "client/src/components/Button/index.tsx",
"chars": 4721,
"preview": "import {\n ButtonHTMLAttributes,\n DetailedHTMLProps,\n ReactNode,\n PropsWithChildren,\n forwardRef,\n useMemo,\n} from "
},
{
"path": "client/src/components/Checkbox/Checkbox.stories.tsx",
"chars": 1054,
"preview": "import { useState } from 'react';\nimport Checkbox from './index';\n\nexport default {\n title: 'components/Checkbox',\n co"
},
{
"path": "client/src/components/Checkbox/index.tsx",
"chars": 2684,
"preview": "import { ReactNode } from 'react';\nimport { CheckIcon } from '../../icons';\n\ntype Props = {\n disabled?: boolean;\n inte"
},
{
"path": "client/src/components/Chips/FileChip.tsx",
"chars": 4090,
"preview": "import React, {\n Dispatch,\n MutableRefObject,\n SetStateAction,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n use"
},
{
"path": "client/src/components/Code/CodeBlockSearch/index.tsx",
"chars": 5220,
"preview": "import React, { memo, useCallback, useMemo, useState, MouseEvent } from 'react';\nimport { Trans, useTranslation } from '"
},
{
"path": "client/src/components/Code/CodeDiff/index.tsx",
"chars": 5724,
"preview": "import React, { ChangeEvent, useCallback, useEffect, useState } from 'react';\nimport { Trans, useTranslation } from 'rea"
},
{
"path": "client/src/components/Code/CodeFragment/index.tsx",
"chars": 5429,
"preview": "import React, { memo, useMemo } from 'react';\nimport CodeLine from '../CodeLine';\nimport CodeToken from '../CodeToken';\n"
},
{
"path": "client/src/components/Code/CodeFull/SelectionPopup.tsx",
"chars": 4361,
"preview": "import { memo, useCallback, useContext, MouseEvent } from 'react';\nimport { AnimatePresence, motion } from 'framer-motio"
},
{
"path": "client/src/components/Code/CodeFull/Token.tsx",
"chars": 1578,
"preview": "import { memo, useCallback, useEffect, useState } from 'react';\nimport CodeToken from '../CodeToken';\nimport { Token as "
}
]
// ... and 424 more files (download for full content)
About this extraction
This page contains the full source code of the BloopAI/bloop GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 624 files (2.8 MB), approximately 772.0k tokens, and a symbol index with 2114 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.