Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though

This commit is contained in:
Ryan Ward
2026-05-07 11:29:34 -05:00
parent f4e2475c60
commit a41cbd8cc7
2433 changed files with 14208 additions and 9409 deletions
+1 -1
View File
@@ -51,6 +51,6 @@ serde.workspace = true
smol_str.workspace = true
tempfile = { workspace = true, optional = true }
tokenizers = { version = "0.21.4", optional = true }
warp_completer.workspace = true
galaxy_completer.workspace = true
[dev-dependencies]
+1 -1
View File
@@ -66,7 +66,7 @@ fn get_binary_confidence_color(is_correct: bool, is_low_confidence: bool) -> Str
"\x1b[31m".to_string() // Red for incorrect
}
}
use warp_completer::{ParsedTokensSnapshot, util::parse_current_commands_and_tokens};
use galaxy_completer::{ParsedTokensSnapshot, util::parse_current_commands_and_tokens};
#[cfg(feature = "fasttext")]
use input_classifier::FasttextClassifier;
+2 -2
View File
@@ -52,7 +52,7 @@ impl FasttextClassifier {
impl InputClassifier for FasttextClassifier {
async fn detect_input_type(
&self,
input: warp_completer::ParsedTokensSnapshot,
input: galaxy_completer::ParsedTokensSnapshot,
context: &Context,
) -> InputType {
let word_tokens = parse_query_into_tokens(input.buffer_text.as_str());
@@ -80,7 +80,7 @@ impl InputClassifier for FasttextClassifier {
async fn classify_input(
&self,
input: warp_completer::ParsedTokensSnapshot,
input: galaxy_completer::ParsedTokensSnapshot,
context: &Context,
) -> anyhow::Result<ClassificationResult> {
if let Ok(classification_result) =
@@ -3,7 +3,7 @@ use std::borrow::Cow;
use async_trait::async_trait;
use itertools::Itertools as _;
use natural_language_detection::natural_language_words_score;
use warp_completer::ParsedTokensSnapshot;
use galaxy_completer::ParsedTokensSnapshot;
use crate::{
ClassificationResult, Context, InputClassifier, InputType,
@@ -61,7 +61,7 @@ impl InputClassifier for HeuristicClassifier {
async fn classify_input(
&self,
input: warp_completer::ParsedTokensSnapshot,
input: galaxy_completer::ParsedTokensSnapshot,
context: &Context,
) -> anyhow::Result<super::ClassificationResult> {
let word_tokens = parse_query_into_tokens(input.buffer_text.as_str());
@@ -1,4 +1,4 @@
use warp_completer::util::parse_current_commands_and_tokens;
use galaxy_completer::util::parse_current_commands_and_tokens;
use crate::{Context, test_utils::CompletionContext};
+2 -2
View File
@@ -24,13 +24,13 @@ pub use onnx::{Model as OnnxModel, OnnxClassifier};
pub trait InputClassifier: 'static + Send + Sync {
async fn detect_input_type(
&self,
input: warp_completer::ParsedTokensSnapshot,
input: galaxy_completer::ParsedTokensSnapshot,
context: &Context,
) -> InputType;
async fn classify_input(
&self,
input: warp_completer::ParsedTokensSnapshot,
input: galaxy_completer::ParsedTokensSnapshot,
context: &Context,
) -> anyhow::Result<ClassificationResult>;
}
+1 -1
View File
@@ -5,7 +5,7 @@ use candle_core::{IndexOp as _, Tensor};
use candle_onnx::onnx::ModelProto;
use prost::Message as _;
use tokenizers::Tokenizer;
use warp_completer::ParsedTokensSnapshot;
use galaxy_completer::ParsedTokensSnapshot;
use super::ClassificationResult;
+2 -2
View File
@@ -8,7 +8,7 @@ use std::borrow::Cow;
use anyhow::Result;
use async_trait::async_trait;
use rust_embed::RustEmbed;
use warp_completer::ParsedTokensSnapshot;
use galaxy_completer::ParsedTokensSnapshot;
use crate::{
ClassificationResult, Context, InputClassifier, InputType,
@@ -119,7 +119,7 @@ impl InputClassifier for OnnxClassifier {
async fn classify_input(
&self,
input: warp_completer::ParsedTokensSnapshot,
input: galaxy_completer::ParsedTokensSnapshot,
_context: &Context,
) -> anyhow::Result<ClassificationResult> {
// If we ever panicked while running inference, we should fall back to the heuristic classifier.
+1 -1
View File
@@ -6,7 +6,7 @@ use ort::{
};
use parking_lot::Mutex;
use tokenizers::Tokenizer;
use warp_completer::ParsedTokensSnapshot;
use galaxy_completer::ParsedTokensSnapshot;
use super::ClassificationResult;
+2 -2
View File
@@ -1,7 +1,7 @@
use std::{collections::HashSet, sync::Arc};
use smol_str::SmolStr;
use warp_completer::{
use galaxy_completer::{
completer::{GeneratorContext, PathCompletionContext},
signatures::CommandRegistry,
};
@@ -20,7 +20,7 @@ impl CompletionContext {
}
}
impl warp_completer::completer::CompletionContext for CompletionContext {
impl galaxy_completer::completer::CompletionContext for CompletionContext {
fn top_level_commands(&self) -> Box<dyn Iterator<Item = &str> + '_> {
Box::new(self.command_registry.registered_commands())
}
+1 -1
View File
@@ -2,7 +2,7 @@ use std::collections::HashSet;
use lazy_static::lazy_static;
use natural_language_detection::check_if_token_has_shell_syntax;
use warp_completer::ParsedTokensSnapshot;
use galaxy_completer::ParsedTokensSnapshot;
/// The percentage of input tokens that can be described by our completion engine before
/// we consider the input as a shell command. This could be tuned.