repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/object_store/versions/v1.rs
influxdb3_catalog/src/object_store/versions/v1.rs
use std::ops::Deref; use std::sync::Arc; use anyhow::Context; use bytes::Bytes; use object_store::ObjectStore; use object_store::PutOptions; use object_store::path::Path as ObjPath; use observability_deps::tracing::{debug, error, info, warn}; use uuid::Uuid; use crate::catalog::versions::v1::{InnerCatalog, Snapshot};...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/log/versions/v4.rs
influxdb3_catalog/src/log/versions/v4.rs
#![allow(unreachable_pub, dead_code, clippy::wrong_self_convention)] // Enterprise module removed during port use std::{ cmp::{Ord, PartialOrd}, num::NonZeroUsize, ops::Deref, str::FromStr, sync::Arc, time::Duration, }; use anyhow::Context; use cron::Schedule; // Enterprise import removed - C...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/log/versions/v2.rs
influxdb3_catalog/src/log/versions/v2.rs
mod conversion; use std::{ cmp::{Ord, PartialOrd}, num::NonZeroUsize, ops::Deref, str::FromStr, sync::Arc, time::Duration, }; use anyhow::Context; use cron::Schedule; use hashbrown::HashMap; use humantime::{format_duration, parse_duration}; use influxdb_line_protocol::FieldValue; use influxdb3...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/log/versions/mod.rs
influxdb3_catalog/src/log/versions/mod.rs
pub(crate) mod v1; pub(crate) mod v2; pub mod v3; pub mod v4;
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/log/versions/v3.rs
influxdb3_catalog/src/log/versions/v3.rs
mod conversion; /// The v3 changes are _only_ done for token permission mapping `v2`s `db:*:write[,read]` is mapped /// to `v3`s `db:*:write,create[,read]` permission. There are no structural changes in the catalog /// log files. use std::{ cmp::{Ord, PartialOrd}, num::NonZeroUsize, ops::Deref, str::Fro...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/log/versions/v1.rs
influxdb3_catalog/src/log/versions/v1.rs
//! Version 1 (v1) Catalog definitions //! //! v1 catalog serialization relied on [`bitcode`][bitcode] for serialization/deserialization of //! catalog snapshot files. //! //! The type definitions in this module should not be modified. They exist for deserializing //! files that were written with the v1 format. `bitcod...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/log/versions/v1/conversion.rs
influxdb3_catalog/src/log/versions/v1/conversion.rs
use uuid::Uuid; use crate::log::versions::v2; impl From<super::OrderedCatalogBatch> for v2::OrderedCatalogBatch { fn from(value: super::OrderedCatalogBatch) -> Self { Self { catalog_batch: value.catalog_batch.into(), sequence_number: value.sequence_number, } } } impl F...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/log/versions/v2/conversion.rs
influxdb3_catalog/src/log/versions/v2/conversion.rs
use crate::log::versions::{v2, v3}; impl From<v2::OrderedCatalogBatch> for v3::OrderedCatalogBatch { fn from(value: v2::OrderedCatalogBatch) -> Self { Self { catalog_batch: value.catalog_batch.into(), sequence_number: value.sequence_number, } } } impl From<v2::CatalogBa...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/log/versions/v3/conversion.rs
influxdb3_catalog/src/log/versions/v3/conversion.rs
//! Module to provide lossless conversions from v3 to v4 use crate::log::versions::v3; use crate::log::versions::v4; use std::time::Duration; impl From<v3::RetentionPeriod> for v4::RetentionPeriod { fn from(value: v3::RetentionPeriod) -> Self { use v3::RetentionPeriod::*; match value { ...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/channel/versions/v2.rs
influxdb3_catalog/src/channel/versions/v2.rs
use std::{ ops::{Deref, DerefMut}, sync::{ Arc, atomic::{AtomicBool, Ordering}, }, }; use anyhow::Context; use futures::future::try_join_all; use observability_deps::tracing::warn; use tokio::sync::{mpsc, oneshot}; use crate::channel::{CATALOG_SUBSCRIPTION_BUFFER_SIZE, SubscriptionError}; ...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_catalog/src/channel/versions/mod.rs
influxdb3_catalog/src/channel/versions/mod.rs
pub(crate) mod v2;
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_py_api/src/system_py.rs
influxdb3_py_api/src/system_py.rs
// This is allowed because of the code generated by PyO3 for the PyResult type used // in functions in this module. #![allow(clippy::useless_conversion)] use crate::ExecutePluginError; use crate::logging::{LogLevel, ProcessingEngineLog}; use crate::system_py::CacheId::{Global, GlobalTest, Trigger, TriggerTest}; use an...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
true
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_py_api/src/lib.rs
influxdb3_py_api/src/lib.rs
#[derive(Debug, thiserror::Error)] pub enum ExecutePluginError { #[error( "the process_writes function is not present in the plugin. Should be defined as: process_writes(influxdb3_local, table_batches, args=None)" )] MissingProcessWritesFunction, #[error( "the process_request function i...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_py_api/src/logging.rs
influxdb3_py_api/src/logging.rs
use arrow_array::builder::{StringBuilder, TimestampNanosecondBuilder}; use arrow_array::{ArrayRef, RecordBatch}; use arrow_schema::{ArrowError, DataType, Field, Schema, TimeUnit}; use influxdb3_sys_events::{Event, RingBuffer, ToRecordBatch}; use iox_time::Time; use std::fmt::Display; use std::sync::Arc; #[derive(Debug...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/persister.rs
influxdb3_write/src/persister.rs
//! This is the implementation of the `Persister` used to write data from the buffer to object //! storage. use std::io::Write; use std::sync::Arc; use crate::PersistedSnapshotVersion; use crate::paths::ParquetFilePath; use crate::paths::SnapshotInfoFilePath; use arrow::datatypes::SchemaRef; use arrow::record_batch::R...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/lib.rs
influxdb3_write/src/lib.rs
//! This package contains definitions for writing data into InfluxDB3. The logical data model is the standard //! InfluxDB model of Database > Table > Row. As the data arrives into the server it is written into the wal //! and buffered in memory in a queryable format. Periodically the WAL is snapshot, which converts th...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/deleter.rs
influxdb3_write/src/deleter.rs
use crate::async_collections; use influxdb3_catalog::CatalogError; use influxdb3_catalog::catalog::Catalog; use influxdb3_catalog::channel::CatalogUpdateReceiver; use influxdb3_catalog::log::{ CatalogBatch, DatabaseCatalogOp, SoftDeleteDatabaseLog, SoftDeleteTableLog, }; use influxdb3_catalog::resource::CatalogReso...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/paths.rs
influxdb3_write/src/paths.rs
use chrono::prelude::*; use influxdb3_id::{DbId, TableId, TableIndexId}; use influxdb3_wal::{SnapshotSequenceNumber, WalFileSequenceNumber}; use object_store::path::Path as ObjPath; use regex::Regex; use std::ops::Deref; use std::str::FromStr; use std::sync::LazyLock; use thiserror::Error; /// Errors that can occur wh...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/table_index_cache.rs
influxdb3_write/src/table_index_cache.rs
//! LRU Cache for TableIndex objects. //! //! This module provides a caching layer for TableIndex objects to reduce //! object store access and improve query performance. use std::{ collections::BTreeSet, sync::{ Arc, LazyLock, atomic::{AtomicU64, Ordering}, }, time::{Duration, Instant}...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
true
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/chunk.rs
influxdb3_write/src/chunk.rs
use arrow::array::RecordBatch; use data_types::{ChunkId, ChunkOrder, PartitionHashId}; use datafusion::common::Statistics; use iox_query::chunk_statistics::ChunkStatistics; use iox_query::{QueryChunk, QueryChunkData}; use parquet_file::storage::DataSourceExecInput; use schema::Schema; use schema::sort::SortKey; use std...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/table_index.rs
influxdb3_write/src/table_index.rs
use std::{collections::BTreeSet, sync::Arc}; use futures::{StreamExt, stream::FuturesOrdered}; use hashbrown::{HashMap, HashSet}; use object_store::ObjectStore; use object_store_utils::RetryableObjectStore; use observability_deps::tracing::debug; use serde::{Deserialize, Serialize}; use thiserror::Error; use tokio::sy...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
true
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/retention_period_handler.rs
influxdb3_write/src/retention_period_handler.rs
//! Background task for enforcing retention policies by deleting expired data. use crate::table_index_cache::TableIndexCache; use influxdb3_catalog::catalog::Catalog; use influxdb3_id::{DbId, TableId}; use influxdb3_shutdown::ShutdownToken; use iox_time::TimeProvider; use observability_deps::tracing::{debug, error, in...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/async_collections.rs
influxdb3_write/src/async_collections.rs
use iox_time::{Time, TimeProvider}; use parking_lot::Mutex; use std::cmp::{Ordering, Reverse}; use std::collections::BinaryHeap; use std::sync::Arc; use tokio::sync::Notify; use tokio::time::sleep; /// A priority queue that allows items to be pushed with a specific time and popped when their time /// is reached. /// /...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/write_buffer/persisted_files.rs
influxdb3_write/src/write_buffer/persisted_files.rs
//! This tracks what files have been persisted by the write buffer, limited to the last 72 hours. //! When queries come in they will combine whatever chunks exist from `QueryableBuffer` with //! the persisted files to get the full set of data to query. use std::sync::Arc; use crate::deleter::ObjectDeleter; use crate:...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/write_buffer/mod.rs
influxdb3_write/src/write_buffer/mod.rs
//! Implementation of an in-memory buffer for writes that persists data into a wal if it is configured. mod metrics; pub mod persisted_files; pub mod queryable_buffer; mod table_buffer; use influxdb3_shutdown::ShutdownToken; use tokio::sync::{oneshot, watch::Receiver}; use trace::span::{MetaValue, SpanRecorder}; pub m...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
true
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/write_buffer/validator.rs
influxdb3_write/src/write_buffer/validator.rs
use std::sync::Arc; use crate::{Precision, WriteLineError, write_buffer::Result}; use data_types::{NamespaceName, Timestamp}; use hashbrown::HashSet; use indexmap::IndexMap; use influxdb3_catalog::catalog::{ Catalog, CatalogSequenceNumber, DatabaseCatalogTransaction, Prompt, }; use influxdb_line_protocol::{FieldV...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/write_buffer/metrics.rs
influxdb3_write/src/write_buffer/metrics.rs
use std::borrow::Cow; use metric::{Metric, Registry, U64Counter}; #[derive(Debug)] pub(super) struct WriteMetrics { write_lines_total: Metric<U64Counter>, write_lines_rejected_total: Metric<U64Counter>, write_bytes_total: Metric<U64Counter>, } pub(super) const WRITE_LINES_METRIC_NAME: &str = "influxdb3_w...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/write_buffer/table_buffer.rs
influxdb3_write/src/write_buffer/table_buffer.rs
//! The in memory buffer of a table that can be quickly added to and queried use arrow::array::{ Array, ArrayRef, BooleanBuilder, Float64Builder, Int64Builder, StringBuilder, StringDictionaryBuilder, TimestampNanosecondBuilder, UInt64Builder, }; use arrow::datatypes::Int32Type; use arrow::record_batch::RecordB...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_write/src/write_buffer/queryable_buffer.rs
influxdb3_write/src/write_buffer/queryable_buffer.rs
use crate::chunk::BufferChunk; use crate::paths::ParquetFilePath; use crate::persister::Persister; use crate::write_buffer::persisted_files::PersistedFiles; use crate::write_buffer::table_buffer::TableBuffer; use crate::{ChunkFilter, ParquetFile, ParquetFileId, PersistedSnapshot, PersistedSnapshotVersion}; use anyhow::...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
true
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_processing_engine/src/lib.rs
influxdb3_processing_engine/src/lib.rs
use crate::environment::PythonEnvironmentManager; use crate::manager::ProcessingEngineError; use crate::plugins::PluginContext; use crate::plugins::{PluginError, ProcessingEngineEnvironmentManager}; use anyhow::{Context, anyhow}; use bytes::Bytes; use hashbrown::HashMap; use influxdb3_catalog::CatalogError; use influx...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
true
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_processing_engine/src/environment.rs
influxdb3_processing_engine/src/environment.rs
use crate::environment::PluginEnvironmentError::PluginEnvironmentDisabled; use crate::virtualenv::{VenvError, find_python, initialize_venv}; use std::fmt::Debug; use std::path::{Path, PathBuf}; use std::process::Command; use thiserror::Error; #[derive(Error, Debug)] pub enum PluginEnvironmentError { #[error("Pack...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_processing_engine/src/manager.rs
influxdb3_processing_engine/src/manager.rs
use crate::environment::PluginEnvironmentError; use influxdb3_catalog::CatalogError; use std::fmt::Debug; use thiserror::Error; #[derive(Debug, Error)] pub enum ProcessingEngineError { #[error("database not found: {0}")] DatabaseNotFound(String), #[error("catalog update error: {0}")] CatalogUpdateErro...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_processing_engine/src/plugins.rs
influxdb3_processing_engine/src/plugins.rs
use crate::PluginCode; use crate::ProcessingEngineManagerImpl; use crate::environment::PythonEnvironmentManager; use crate::{RequestEvent, ScheduleEvent, WalEvent}; use data_types::NamespaceName; use hashbrown::HashMap; use influxdb3_catalog::catalog::Catalog; use influxdb3_catalog::log::TriggerDefinition; use influxdb...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
true
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_processing_engine/src/virtualenv.rs
influxdb3_processing_engine/src/virtualenv.rs
use observability_deps::tracing::debug; use pyo3::Python; use std::env; use std::ffi::CString; use std::path::{Path, PathBuf}; use std::process::Command; use std::sync::Once; use thiserror::Error; static PYTHON_INIT: Once = Once::new(); #[derive(Error, Debug)] pub enum VenvError { #[error("Failed to initialize vi...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_sys_events/src/lib.rs
influxdb3_sys_events/src/lib.rs
use std::fmt::Debug; use std::{ any::{Any, TypeId}, mem::replace, sync::Arc, }; use arrow::{datatypes::Schema, error::ArrowError}; use arrow_array::RecordBatch; use dashmap::DashMap; use iox_time::TimeProvider; const MAX_CAPACITY: usize = 10_000; /// This trait is not dyn compatible pub trait ToRecordBat...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
influxdata/influxdb
https://github.com/influxdata/influxdb/blob/b04c9862a84dd6de486a0a438f87dc275f68f898/influxdb3_sys_events/benches/store_benchmark.rs
influxdb3_sys_events/benches/store_benchmark.rs
use std::{sync::Arc, thread}; use arrow::{ array::{StringViewBuilder, StructBuilder, UInt64Builder}, datatypes::{DataType, Field, Fields, Schema}, error::ArrowError, }; use arrow_array::{ArrayRef, RecordBatch}; use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main}; use influxdb3_sys_even...
rust
Apache-2.0
b04c9862a84dd6de486a0a438f87dc275f68f898
2026-01-04T15:33:27.831918Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/apps/desktop/src-tauri/build.rs
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 profi...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/apps/desktop/src-tauri/src/config.rs
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 bl...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/apps/desktop/src-tauri/src/backend.rs
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...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/apps/desktop/src-tauri/src/main.rs
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::D...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/apps/desktop/src-tauri/src/qdrant.rs
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: O...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/build.rs
server/bleep/build.rs
use std::{ collections::HashMap, env, ffi::OsStr, fs::File, io::{BufWriter, Write}, path::Path, }; #[derive(serde::Deserialize)] struct Language { r#type: String, aliases: Option<Vec<String>>, } fn main() { set_index_version(); process_languages(); determine_embedder_backend...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/db.rs
server/bleep/src/db.rs
use std::{path::Path, sync::Arc}; use anyhow::{Context, Result}; use futures::TryFutureExt; use sqlx::SqlitePool; use tracing::{debug, error}; use crate::Configuration; mod query_log; pub use query_log::QueryLog; pub type SqlDb = Arc<SqlitePool>; #[tracing::instrument(skip_all)] pub async fn initialize(config: &Co...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/config.rs
server/bleep/src/config.rs
use crate::state::StateSource; use anyhow::{Context, Result}; use clap::Parser; use secrecy::{ExposeSecret, SecretString}; use serde::{Deserialize, Serialize, Serializer}; use std::{ num::NonZeroUsize, path::{Path, PathBuf}, }; #[derive(Serialize, Deserialize, Parser, Debug, Clone)] #[clap(author, version, ab...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/user.rs
server/bleep/src/user.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Clone, Debug)] #[serde(rename_all = "snake_case")] pub enum PromptGuideState { Dismissed, Active, } #[derive(Serialize, Deserialize, Clone, Debug)] #[serde(rename_all = "snake_case")] pub struct UserProfile { pub username: Option<String...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/semantic.rs
server/bleep/src/semantic.rs
use std::{borrow::Cow, collections::HashMap, env, path::Path, sync::Arc}; use crate::{query::parser::SemanticQuery, Configuration}; use anyhow::bail; use qdrant_client::{ prelude::{QdrantClient, QdrantClientConfig}, qdrant::{ point_id::PointIdOptions, r#match::MatchValue, vectors::VectorsOptions, ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
true
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/lib.rs
server/bleep/src/lib.rs
#![deny( clippy::all, arithmetic_overflow, future_incompatible, nonstandard_style, rust_2018_idioms, unused_lifetimes, unused_qualifications )] #![warn(unused_crate_dependencies)] #![allow(elided_lifetimes_in_paths, clippy::diverging_sub_expression)] #[cfg(all(feature = "onnx", feature = "m...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/indexes.rs
server/bleep/src/indexes.rs
use std::{fs, ops::Deref, path::Path, sync::Arc}; use anyhow::{Context, Result}; use async_trait::async_trait; use smallvec::SmallVec; use tantivy::{ collector::{Collector, MultiFruit}, schema::Schema, tokenizer::NgramTokenizer, DocAddress, Document, IndexReader, IndexWriter, Score, }; mod analytics; ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/llm.rs
server/bleep/src/llm.rs
pub mod call; pub mod client;
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/commits.rs
server/bleep/src/commits.rs
use std::collections::HashSet; use anyhow::{bail, Context, Result}; use gix::{ bstr::ByteSlice, diff::blob::{sink::Counter, Algorithm, UnifiedDiffBuilder}, object::{blob::diff::Platform, tree::diff::Action}, objs::tree::EntryMode, Commit, Id, }; use serde::Serialize; use tracing::{debug, error, tra...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/repo.rs
server/bleep/src/repo.rs
use anyhow::Context; use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; use std::{ fmt::{self, Display}, path::{Path, PathBuf}, str::FromStr, sync::Arc, time::SystemTime, }; use tracing::debug; use crate::state::get_relative_path; pub(crate) mod iterator; use iterator::langu...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/snippet.rs
server/bleep/src/snippet.rs
use anyhow::Result; use regex::{Regex, RegexBuilder}; use serde::Serialize; use smallvec::{smallvec, SmallVec}; use crate::{indexes, symbol::Symbol}; use std::ops::Range; #[derive(Serialize, Debug, PartialEq, Eq)] pub struct SnippedFile { pub relative_path: String, pub repo_name: String, pub repo_ref: Str...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/text_range.rs
server/bleep/src/text_range.rs
use std::cmp::{Ord, Ordering}; use serde::{Deserialize, Serialize}; /// A singular position in a text document #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Point { /// The byte index pub byte: usize, /// 0-indexed line number pub line: usize, /// Position...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/state.rs
server/bleep/src/state.rs
use crate::{ remotes::gather_repo_roots, repo::{RepoError, RepoRef, Repository}, }; use anyhow::Result; use clap::Args; use rand::Rng; use relative_path::RelativePath; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use std::{ ops::Deref, path::{Path, PathBuf}, sync::Arc, }; use tracing::...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/scraper.rs
server/bleep/src/scraper.rs
use anyhow::Result; use async_stream::stream; use futures::stream::Stream; use select::predicate::Name; use tokio::{sync::RwLock, task}; use tracing::{trace, warn}; use url::Url; use std::{ collections::{HashMap, HashSet, VecDeque}, path::PathBuf, sync::Arc, }; mod article; pub mod chunk; use article::Ar...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/env.rs
server/bleep/src/env.rs
use Feature::*; #[repr(u64)] pub(crate) enum Feature { /// Allow scanning any path on the system. This is dangerous! AnyPathScan = 1 << 0, /// Only allow scanning inside the directories in /// `app.config.source_dir` SafePathScan = 1 << 1, /// Require authorization to access API endpoints ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/intelligence.rs
server/bleep/src/intelligence.rs
pub mod code_navigation; mod language; mod namespace; mod scope_resolution; pub use { language::{Language, MemoizedQuery, TSLanguage, TSLanguageConfig, ALL_LANGUAGES}, namespace::*, scope_resolution::{NodeKind, ScopeGraph}, }; use scope_resolution::ResolutionMethod; use tree_sitter::{Parser, Tree}; /// A...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/remotes.rs
server/bleep/src/remotes.rs
use std::{ collections::HashMap, path::{Path, PathBuf}, sync::Arc, }; use anyhow::Context; use gix::{remote::fetch::Shallow, sec::identity::Account}; use ignore::WalkBuilder; use serde::{Deserialize, Serialize}; use tracing::error; use crate::{ background::{SyncHandle, SyncPipes}, repo::{Backend, ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/agent.rs
server/bleep/src/agent.rs
use std::{ops::Deref, str::FromStr, sync::Arc, time::Duration}; use anyhow::{anyhow, Context, Result}; use futures::{Future, TryStreamExt}; use tokio::sync::mpsc::Sender; use tracing::{debug, error, info, instrument}; use crate::{ agent::exchange::RepoPath, indexes::reader::{ContentDocument, FileDocument}, ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/collector.rs
server/bleep/src/collector.rs
mod bytes_filter; mod frequency; mod group; pub use bytes_filter::BytesFilterCollector; pub use frequency::FrequencyCollector; pub use group::GroupCollector;
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/periodic.rs
server/bleep/src/periodic.rs
mod logrotate; mod remotes; use logrotate::*; pub(crate) use remotes::*; use crate::Application; fn single_threaded_executor<F: std::future::Future<Output = ()> + Send>( app: &Application, f: impl (FnOnce(Application) -> F) + Send + 'static, ) { let app = app.clone(); std::thread::spawn(move || { ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query.rs
server/bleep/src/query.rs
pub mod compiler; pub mod execute; pub mod languages; pub mod parser; pub mod planner; pub mod ranking; pub mod stopwords;
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/webserver.rs
server/bleep/src/webserver.rs
use crate::{env::Feature, Application}; use axum::{ extract::State, http::StatusCode, response::IntoResponse, routing::{delete, get, post}, Extension, Json, }; use std::{borrow::Cow, fmt, net::SocketAddr}; use tower::Service; use tower_http::services::{ServeDir, ServeFile}; use tower_http::{catch_p...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/cache.rs
server/bleep/src/cache.rs
use std::{ collections::HashSet, ops::Deref, sync::{Arc, RwLock}, time::Instant, }; use qdrant_client::qdrant::{PointId, PointStruct}; use rayon::prelude::ParallelIterator; use scc::hash_map::Entry; use sqlx::Sqlite; use tracing::{error, info, trace, warn}; use uuid::Uuid; use crate::{ repo::RepoR...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/symbol.rs
server/bleep/src/symbol.rs
use crate::{intelligence::ScopeGraph, text_range::TextRange}; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Symbol { pub kind: String, pub range: TextRange, } /// Collection of symbol locations for *single* file #[derive(Default, Debug, Clone, ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/background.rs
server/bleep/src/background.rs
use once_cell::sync::OnceCell; use rayon::ThreadPool; use thread_priority::ThreadBuilderExt; use tokio::sync::Semaphore; use tracing::{debug, error, info}; use crate::{ repo::{BranchFilterConfig, RepoRef, SyncStatus}, Application, Configuration, }; use std::{future::Future, pin::Pin, sync::Arc, thread}; mod ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/collector/group.rs
server/bleep/src/collector/group.rs
use tantivy::{ collector::{Collector, SegmentCollector}, schema::Field, DocAddress, Score, SegmentReader, }; use std::collections::HashMap; #[derive(Debug, Default)] pub struct Group { pub items: Vec<DocAddress>, } #[derive(Debug)] pub struct Groups { pub items: HashMap<blake3::Hash, Group>, } i...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/collector/bytes_filter.rs
server/bleep/src/collector/bytes_filter.rs
// a version of tantivy::collector::FilterCollector that works on byte fast fields use tantivy::collector::{Collector, SegmentCollector}; use tantivy::schema::Field; use tantivy::{Score, SegmentReader, TantivyError}; pub struct BytesFilterCollector<TCollector, TPredicate> where TPredicate: 'static + Clone, { ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/collector/frequency.rs
server/bleep/src/collector/frequency.rs
use std::collections::HashMap; use tantivy::{ collector::{Collector, SegmentCollector}, schema::Field, Score, SegmentReader, }; use tantivy_columnar::BytesColumn; pub struct FrequencyCollector(pub Field); impl Collector for FrequencyCollector { type Fruit = HashMap<Vec<u8>, usize>; type Child = ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/remotes/poll.rs
server/bleep/src/remotes/poll.rs
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/remotes/github.rs
server/bleep/src/remotes/github.rs
use octocrab::Octocrab; use secrecy::{ExposeSecret, SecretString}; use serde::{Deserialize, Serialize}; use std::sync::Arc; use crate::repo::{GitRemote, RepoRemote, Repository}; use super::*; #[derive(Serialize, Deserialize, Clone, Debug)] pub(crate) struct State { pub auth: Auth, #[serde(skip)] pub repo...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query/stopwords.rs
server/bleep/src/query/stopwords.rs
// Portions of this code (the `phrases` function) are modifications of // https://github.com/yaa110/rake-rs/blob/master/src/rake.rs // licensed under the MIT License: /* Copyright (c) 2018 Navid Fathollahzade Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated d...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query/parser.rs
server/bleep/src/query/parser.rs
use pest::{iterators::Pair, Parser}; use regex::Regex; use smallvec::{smallvec, SmallVec}; use std::{borrow::Cow, mem, ops::Deref}; #[derive(Default, Clone, Debug, PartialEq, Eq)] pub struct Query<'a> { pub open: Option<bool>, pub case_sensitive: Option<bool>, pub global_regex: Option<bool>, pub org: ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
true
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query/execute.rs
server/bleep/src/query/execute.rs
use std::{ collections::{HashMap, HashSet}, sync::Arc, }; use super::{parser, ranking::DocumentTweaker}; use crate::{ collector::{BytesFilterCollector, FrequencyCollector}, indexes::{ reader::{base_name, ContentReader, FileReader, OpenReader, RepoReader}, DocumentRead, File, Indexable, ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query/languages.rs
server/bleep/src/query/languages.rs
use std::{borrow::Cow, collections::HashSet}; include!(concat!(env!("OUT_DIR"), "/languages.rs")); pub fn parse_alias(lang: &str) -> Cow<'static, str> { if let Some(s) = EXT_MAP.get(lang) { (*s).into() } else { lang.to_ascii_lowercase().into() } } pub fn proper_case(lower: Cow<str>) -> Co...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query/planner.rs
server/bleep/src/query/planner.rs
use std::fmt::Display; use regex_syntax::hir::{Class, Hir, HirKind, Literal, RepetitionKind, RepetitionRange}; mod optimize; /// The maximum number of characters allowed in a character class before a break occurs. const MAX_CLASS_RANGE_LEN: u32 = 10; #[derive(Debug, thiserror::Error)] pub enum Error { #[error("...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query/ranking.rs
server/bleep/src/query/ranking.rs
use std::time::SystemTime; use tantivy::{ collector::{ScoreSegmentTweaker, ScoreTweaker}, fastfield::Column, DocId, Score, }; use tantivy_columnar::{column_values::ColumnValues, BytesColumn}; use crate::indexes::file::File; pub struct DocumentTweaker(pub File); pub struct SegmentScorer { line_length:...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query/compiler.rs
server/bleep/src/query/compiler.rs
use std::{ borrow::Cow, collections::{HashMap, HashSet}, mem, }; use anyhow::{Context, Result}; use compact_str::CompactString; use either::Either; use smallvec::SmallVec; use tantivy::{ query::{AllQuery, BooleanQuery, BoostQuery, TermQuery}, schema::{Field, IndexRecordOption}, Index, Term, }; ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/query/planner/optimize.rs
server/bleep/src/query/planner/optimize.rs
use super::{Fragment, Op}; /// Recursively optimize a fragment. pub(super) fn run(fragment: Fragment) -> Fragment { match fragment { f @ Fragment::Literal(_) | f @ Fragment::Break => f, Fragment::Dense(op, sub) => { let children = sub.into_iter().map(run).collect(); let frag...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/background/control.rs
server/bleep/src/background/control.rs
use std::{ sync::{ atomic::{AtomicBool, AtomicUsize, Ordering}, Arc, RwLock, }, time::{Duration, Instant}, }; use tracing::debug; use crate::repo::{FilterUpdate, RepoRef, SyncStatus}; use super::{Progress, ProgressEvent}; const GIT_REPORT_DELAY: Duration = Duration::from_secs(3); enum C...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/background/sync.rs
server/bleep/src/background/sync.rs
use either::Either; use tokio::sync::OwnedSemaphorePermit; use tracing::{debug, error, info, warn}; use crate::{ cache::FileCache, indexes, remotes::RemoteError, repo::{ iterator::FileFilterRule, Backend, FileFilterConfig, FilterUpdate, RepoError, RepoMetadata, RepoRef, Repository, Sync...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/background/notifyqueue.rs
server/bleep/src/background/notifyqueue.rs
use std::{collections::VecDeque, sync::Arc}; use tokio::sync::{RwLock, Semaphore}; use crate::repo::RepoRef; use super::sync::SyncHandle; /// Asynchronous queue with await semantics for popping the front /// element. pub(crate) struct NotifyQueue { queue: RwLock<VecDeque<Arc<SyncHandle>>>, available: Semaph...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/db/query_log.rs
server/bleep/src/db/query_log.rs
use chrono::{DateTime, Utc}; pub struct QueryLog<'a> { db: &'a super::SqlitePool, } impl<'a> QueryLog<'a> { pub fn new(db: &'a super::SqlitePool) -> Self { Self { db } } pub async fn insert(&self, raw: &str) -> anyhow::Result<()> { sqlx::query!("INSERT INTO query_log (raw_query) VALUE...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/bin/bleep.rs
server/bleep/src/bin/bleep.rs
use anyhow::Result; use bleep::{Application, Configuration, Environment}; #[tokio::main] async fn main() -> Result<()> { let config = Configuration::cli_overriding_config_file()?; _ = color_eyre::install(); Application::install_logging(&config); let app = Application::initialize(Environment::server()...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/llm/call.rs
server/bleep/src/llm/call.rs
use std::{fmt, sync::Arc, time::Duration}; use async_stream::try_stream; use futures_util::{pin_mut, Stream, StreamExt, TryStreamExt}; use reqwest_eventsource::EventSource; use tokio::sync::Mutex; use tracing::error; use super::client::api; const MAX_TOKEN_DURATION: Duration = Duration::from_secs(16); #[derive(Debu...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/llm/client.rs
server/bleep/src/llm/client.rs
use std::time::Duration; use anyhow::{anyhow, bail}; use futures::{Stream, StreamExt}; use secrecy::ExposeSecret; use tracing::{debug, error, warn}; use super::call::llm_call; use crate::{periodic::sync_github_status_once, Application}; pub mod api { use std::collections::HashMap; #[derive(Debug, Default, C...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/scraper/article.rs
server/bleep/src/scraper/article.rs
use anyhow::{Context, Result}; use once_cell::sync::Lazy; use regex::Regex; use reqwest::{ header::{HeaderMap, USER_AGENT}, redirect::Policy, IntoUrl, }; use select::{ document::Document, node::{Descendants, Node}, predicate::{Attr, Name, Predicate}, }; use url::Url; use crate::query::languages...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/scraper/chunk.rs
server/bleep/src/scraper/chunk.rs
use tree_sitter::{Node, Parser}; use crate::text_range::TextRange; pub struct Section<'s> { pub data: &'s str, pub ancestry: Vec<&'s str>, pub header: Option<&'s str>, pub section_range: TextRange, pub node_range: TextRange, } impl<'a> Section<'a> { pub fn ancestry_str(&self) -> String { ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/repo/iterator.rs
server/bleep/src/repo/iterator.rs
use std::{collections::HashMap, path::Path}; use once_cell::sync::Lazy; use regex::Regex; use smallvec::SmallVec; use tracing::warn; mod filters; mod fs; mod git; pub(super) mod language; pub use filters::*; pub use fs::FileWalker; pub use git::GitWalker; use crate::background::SyncPipes; // Empirically calculated...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/repo/iterator/filters.rs
server/bleep/src/repo/iterator/filters.rs
use std::{ collections::{BTreeSet, HashSet}, path::Path, }; use regex::RegexSet; use serde::{Deserialize, Serialize}; /// Update filter configs for a repository #[derive(serde::Deserialize, Clone, Debug, Default)] pub struct FilterUpdate { pub branch_filter: Option<BranchFilterConfig>, pub file_filter...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/repo/iterator/git.rs
server/bleep/src/repo/iterator/git.rs
use crate::{background, repo::RepoRef}; use super::{filters::BranchFilter, *}; use anyhow::Result; use gix::ThreadSafeRepository; use tracing::trace; use std::{ collections::{BTreeSet, HashMap}, path::Path, }; fn human_readable_branch_name(r: &gix::Reference<'_>) -> String { use gix::bstr::ByteSlice; ...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/repo/iterator/fs.rs
server/bleep/src/repo/iterator/fs.rs
use crate::background; use super::*; use tracing::{debug, warn}; use std::path::{Path, PathBuf}; pub struct FileWalker { file_list: Vec<PathBuf>, /// Branch to index files as part of. branch: String, } impl FileWalker { pub fn index_directory(dir: impl AsRef<Path>, branch: String) -> impl FileSour...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/repo/iterator/language.rs
server/bleep/src/repo/iterator/language.rs
use hyperpolyglot::detect_buffer; use scc::hash_map::Entry; use std::{ io::Cursor, path::{Path, PathBuf}, }; #[derive(Debug, Default)] pub struct LanguageInfo { path_map: scc::HashMap<PathBuf, Option<&'static str>>, } impl LanguageInfo { pub fn get(&self, path: &Path, buf: &[u8]) -> Option<&'static st...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/webserver/config.rs
server/bleep/src/webserver/config.rs
use axum::{extract::State, Json}; use super::{middleware::User, prelude::*}; use crate::{user::UserProfile, Application}; #[derive(Serialize, Debug)] pub(super) struct ConfigResponse { user_login: Option<String>, org_name: Option<String>, schema_version: String, github_user: Option<octocrab::models::A...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/webserver/answer.rs
server/bleep/src/webserver/answer.rs
use std::{panic::AssertUnwindSafe, time::Duration}; use anyhow::{anyhow, Context, Result}; use axum::{ extract::{Path, Query}, response::{ sse::{self, Sse}, IntoResponse, }, Extension, }; use futures::{future::Either, stream, StreamExt}; use tracing::{debug, error, info, warn}; use sup...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/webserver/index.rs
server/bleep/src/webserver/index.rs
use crate::Application; use axum::{response::IntoResponse, Extension}; pub(super) async fn handle(Extension(app): Extension<Application>) -> impl IntoResponse { tokio::task::spawn(async move { app.write_index().startup_scan().await }); }
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/webserver/commits.rs
server/bleep/src/webserver/commits.rs
use crate::{commits::Question, repo::RepoRef, Application}; use anyhow::Context; use axum::{extract::State, Json}; use super::prelude::*; #[derive(Debug, serde::Deserialize)] pub(super) struct Params { pub repo_ref: RepoRef, } #[derive(serde::Serialize)] pub(super) struct TutorialQuestionsResponse { question...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/webserver/conversation.rs
server/bleep/src/webserver/conversation.rs
use anyhow::Result; use axum::{ extract::{Path, State}, Extension, Json, }; use reqwest::StatusCode; use std::mem; use uuid::Uuid; use crate::{ agent::exchange::Exchange, db::SqlDb, webserver::{self, middleware::User, Error}, Application, }; #[derive(Clone, serde::Serialize)] pub struct Conver...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/webserver/autocomplete.rs
server/bleep/src/webserver/autocomplete.rs
use std::collections::HashMap; use super::prelude::*; use crate::{ indexes::reader::{ContentReader, FileReader, RepoReader}, query::{ execute::{ApiQuery, ExecuteQuery, QueryResult}, languages, parser, parser::{Literal, Target}, }, Application, }; use axum::{ extract::{Path,...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false
BloopAI/bloop
https://github.com/BloopAI/bloop/blob/431e9e82c5a293c40f22aadb3615c3aa387af82e/server/bleep/src/webserver/template.rs
server/bleep/src/webserver/template.rs
use super::{middleware::User, Error, ErrorKind}; use crate::{webserver, Application}; use anyhow::Context; use axum::extract::{Extension, Json, Path}; use chrono::NaiveDateTime; use serde::Deserialize; #[derive(Deserialize)] pub struct Create { name: String, content: String, } pub async fn create( app: Ex...
rust
Apache-2.0
431e9e82c5a293c40f22aadb3615c3aa387af82e
2026-01-04T15:45:08.331968Z
false