Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bloop"
version = "0.2.2"
version = "0.2.3"
description = "Search code. Fast."
authors = ["Bloop AI Developers"]
license = ""
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "bloop",
"version": "0.2.2"
"version": "0.2.3"
},
"tauri": {
"allowlist": {
Expand Down
2 changes: 1 addition & 1 deletion client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ pnpm install
npm run start-web
```

Open `localhost:5173` in a browser and, hey presto, you've got bloop in the browser.
Open `localhost:5173` in a browser and, hey presto, you've got bloop in the browser.
6 changes: 5 additions & 1 deletion client/src/components/CodeBlock/CodeFull/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ const CodeFull = ({

useEffect(() => {
const handler = (event: KeyboardEvent) => {
if ((event.ctrlKey || event.metaKey) && event.key === 'a') {
if (
(event.ctrlKey || event.metaKey) &&
event.key === 'a' &&
(event.target as HTMLElement)?.tagName !== 'INPUT'
) {
// Prevent the default action (i.e. selecting all text in the browser)
event.preventDefault();
setCurrentSelection([
Expand Down
4 changes: 3 additions & 1 deletion client/src/hooks/useAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import * as analytics from 'rudder-sdk-js';

const useAnalytics = () => {
const trackSearch = useCallback(
(queryTime: number) => {
(queryTime: number, query: string, searchId?: string) => {
analytics?.track('Search', {
queryTime,
query,
searchId,
});
},
[analytics],
Expand Down
4 changes: 2 additions & 2 deletions client/src/hooks/useSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const useSearch = <T,>(
if (i === 0) {
const queryTime = Date.now() - startTime;
setLastQueryTime(queryTime);
trackSearch(queryTime);
trackSearch(queryTime, query, newData.query_id);
if (newData.Err) {
setStatus((prev) => ({
...prev,
Expand Down Expand Up @@ -104,7 +104,7 @@ export const useSearch = <T,>(
.then((res: any) => {
const queryTime = Date.now() - startTime;
setLastQueryTime(queryTime);
trackSearch(queryTime);
trackSearch(queryTime, query);
setStatus({ loading: false, data: res });
})
.catch((error: Error) => {
Expand Down