Wrapping up bedrock implementation
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::{path::PathBuf, time::Duration};
|
||||
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use itertools::Itertools as _;
|
||||
use uuid::Uuid;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use warp_multi_agent_api as api;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -2,11 +2,11 @@ mod convert;
|
||||
|
||||
use std::{fmt::Display, ops::Range, path::PathBuf, time::Duration};
|
||||
|
||||
use galaxy_terminal::model::BlockId;
|
||||
use itertools::Itertools as _;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use strum_macros::EnumDiscriminants;
|
||||
use uuid::Uuid;
|
||||
use galaxy_terminal::model::BlockId;
|
||||
|
||||
use crate::{
|
||||
agent::{
|
||||
|
||||
@@ -2,11 +2,11 @@ mod convert;
|
||||
|
||||
use std::{fmt::Display, ops::Range, time::SystemTime};
|
||||
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_terminal::model::BlockId;
|
||||
use itertools::Itertools as _;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_core::command::ExitCode;
|
||||
use warp_multi_agent_api::apply_file_diffs_result::success::UpdatedFileContent;
|
||||
use galaxy_terminal::model::BlockId;
|
||||
|
||||
use crate::{
|
||||
agent::FileLocations,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
|
||||
use itertools::Itertools as _;
|
||||
use galaxy_terminal::shell::ShellLaunchData;
|
||||
use itertools::Itertools as _;
|
||||
|
||||
use crate::agent::action_result::FileContext;
|
||||
use crate::{index::locations::CodeContextLocation, paths::shell_native_absolute_path};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
pub use crate::aws_credentials::{AwsCredentials, AwsCredentialsState};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warp_multi_agent_api as api;
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui_extras::secure_storage::{self, AppContextExt};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warp_multi_agent_api as api;
|
||||
|
||||
const SECURE_STORAGE_KEY: &str = "AiApiKeys";
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ use anyhow::anyhow;
|
||||
use async_channel;
|
||||
use chrono::{DateTime, Utc};
|
||||
use futures::stream::AbortHandle;
|
||||
use galaxy_core::safe_error;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle};
|
||||
use ignore::gitignore::Gitignore;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::entry::IgnoredPathStrategy;
|
||||
use repo_metadata::Repository;
|
||||
use std::{path::Path, sync::Arc};
|
||||
use galaxy_core::safe_error;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle};
|
||||
|
||||
use super::{
|
||||
fragment_metadata::{FragmentMetadata, LeafToFragmentMetadata, LeafToFragmentMetadataUpdates},
|
||||
|
||||
@@ -17,13 +17,13 @@ use crate::index::full_source_code_embedding::{
|
||||
};
|
||||
use crate::index::locations::{CodeContextLocation, FileFragmentLocation};
|
||||
use futures::executor::block_on;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
use repo_metadata::DirectoryWatcher;
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
|
||||
use super::{
|
||||
CodebaseIndex, CodebaseIndexTimeStampMetadata, TreeSourceSyncState,
|
||||
|
||||
@@ -4,12 +4,12 @@ use crate::index::{
|
||||
use anyhow::anyhow;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use itertools::Itertools;
|
||||
use rayon::iter::{IntoParallelIterator, ParallelIterator};
|
||||
use repo_metadata::entry::is_file_parsable;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sha2::{Digest, Sha256};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
|
||||
@@ -19,8 +19,10 @@ fn test_node_hash_for_directory_is_sorted() {
|
||||
sandbox.with_files(vec![Stub::FileWithContent("bar", "bar")]);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
dirs.tests(),
|
||||
)
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
loaded: false,
|
||||
@@ -461,8 +463,10 @@ fn test_merkle_node_multiple_operations() {
|
||||
]);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
dirs.tests(),
|
||||
)
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
loaded: true,
|
||||
@@ -570,8 +574,10 @@ fn test_merkle_node_multiple_operations() {
|
||||
);
|
||||
|
||||
let mut directory_entry = DirectoryEntry {
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
dirs.tests(),
|
||||
)
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
loaded: true,
|
||||
@@ -772,8 +778,10 @@ fn test_merkle_node_multiple_operations() {
|
||||
|
||||
// Create a new MerkleTree with the expected final structure manually
|
||||
let mut expected_directory_entry = DirectoryEntry {
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(
|
||||
dirs.tests(),
|
||||
)
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
loaded: true,
|
||||
|
||||
@@ -31,7 +31,8 @@ pub async fn construct_test_merkle_tree(
|
||||
]);
|
||||
|
||||
let mut root_dir_entry = DirectoryEntry {
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests()).unwrap(),
|
||||
path: galaxy_util::standardized_path::StandardizedPath::try_from_local(dirs.tests())
|
||||
.unwrap(),
|
||||
children: vec![],
|
||||
ignored: false,
|
||||
loaded: true,
|
||||
|
||||
@@ -16,9 +16,9 @@ pub use codebase_index::{CodebaseIndex, RetrievalID, SyncProgress};
|
||||
pub use merkle_tree::{ContentHash, NodeHash};
|
||||
|
||||
use fragment_metadata::FragmentMetadata;
|
||||
use galaxy_graphql::queries::rerank_fragments::FragmentLocationInput;
|
||||
use string_offset::ByteOffset;
|
||||
use thiserror::Error;
|
||||
use galaxy_graphql::queries::rerank_fragments::FragmentLocationInput;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use chrono::Utc;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use galaxyui::ModelHandle;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::Repository;
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
@@ -7,8 +9,6 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
time::Duration,
|
||||
};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use galaxyui::ModelHandle;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "local_fs")] {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use galaxy_core::sync_queue::{IsTransientError, SyncQueue, SyncQueueTaskTrait};
|
||||
use itertools::Itertools;
|
||||
use std::future::Future;
|
||||
use std::ops::AddAssign;
|
||||
@@ -8,7 +9,6 @@ use std::{
|
||||
mem,
|
||||
sync::Arc,
|
||||
};
|
||||
use galaxy_core::sync_queue::{IsTransientError, SyncQueue, SyncQueueTaskTrait};
|
||||
|
||||
use super::{CodebaseContextConfig, NodeHash};
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
use galaxy_terminal::shell::ShellLaunchData;
|
||||
use galaxy_util::path::{
|
||||
convert_msys2_to_windows_native_path, convert_wsl_to_windows_host_path, msys2_exe_to_root,
|
||||
};
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
|
||||
fn use_unix_paths(shell: Option<&ShellLaunchData>) -> bool {
|
||||
OperatingSystem::get().is_linux()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use anyhow::Result;
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::repositories::RepoDetectionSource;
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "local_fs")] {
|
||||
|
||||
@@ -9,10 +9,10 @@ use std::sync::LazyLock;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use strum_macros::{Display, EnumString, VariantNames};
|
||||
use galaxy_core::ui::color::CLAUDE_ORANGE;
|
||||
use galaxy_core::ui::icons::Icon;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use strum_macros::{Display, EnumString, VariantNames};
|
||||
|
||||
/// Represents a skill provider/origin (Agents, Claude, Codex, or Warp).
|
||||
#[derive(
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use serde::Serialize;
|
||||
use serde_json::{json, Value};
|
||||
use strum_macros::{EnumDiscriminants, EnumIter};
|
||||
use galaxy_core::{
|
||||
features::FeatureFlag,
|
||||
register_telemetry_event,
|
||||
telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc},
|
||||
};
|
||||
use serde::Serialize;
|
||||
use serde_json::{json, Value};
|
||||
use strum_macros::{EnumDiscriminants, EnumIter};
|
||||
|
||||
#[cfg_attr(not(feature = "local_fs"), allow(dead_code))]
|
||||
#[derive(Clone, EnumDiscriminants)]
|
||||
|
||||
@@ -6,10 +6,10 @@ use anyhow::Result;
|
||||
use async_fs::{OpenOptions, create_dir_all};
|
||||
use bytes::Bytes;
|
||||
use futures::AsyncWriteExt;
|
||||
use reqwest::Url;
|
||||
use galaxyui_core::assets::asset_cache::{
|
||||
Asset, AssetCache, AssetSource, AssetState, AsyncAssetId, AsyncAssetType,
|
||||
};
|
||||
use reqwest::Url;
|
||||
|
||||
/// Namespace marker for URL-based async asset sources without persistence.
|
||||
pub struct UrlAssetWithoutPersistence;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
extern crate quote;
|
||||
extern crate proc_macro;
|
||||
|
||||
use galaxy_util::assets::{ASSETS_DIR, ASYNC_ASSETS_DIR, BUNDLED_ASSETS_DIR, REMOTE_ASSETS_DIR};
|
||||
use proc_macro::TokenStream;
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
use sha2::Digest;
|
||||
@@ -31,7 +32,6 @@ use std::{
|
||||
};
|
||||
use syn::{parse::Parse, Token};
|
||||
use syn::{parse_macro_input, LitStr};
|
||||
use galaxy_util::assets::{ASSETS_DIR, ASYNC_ASSETS_DIR, BUNDLED_ASSETS_DIR, REMOTE_ASSETS_DIR};
|
||||
|
||||
struct MacroArgs {
|
||||
/// The name of the asset. E.g. `jpg/jellyfish_bg.jpg`
|
||||
|
||||
@@ -11,8 +11,8 @@ mod screenshot;
|
||||
mod session;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use pathfinder_geometry::vector::Vector2I;
|
||||
use galaxyui::r#async::Timer;
|
||||
use pathfinder_geometry::vector::Vector2I;
|
||||
|
||||
use crate::{Action, ActionResult, Options};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ mod mouse;
|
||||
mod screenshot;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use pathfinder_geometry::vector::Vector2I;
|
||||
use galaxyui::r#async::Timer;
|
||||
use pathfinder_geometry::vector::Vector2I;
|
||||
use x11rb::connection::Connection;
|
||||
use x11rb::protocol::xproto::{self, ConnectionExt as _};
|
||||
use x11rb::protocol::xtest::ConnectionExt as _;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use instant::Instant;
|
||||
use std::time::Duration;
|
||||
|
||||
use galaxyui::r#async::Timer;
|
||||
use objc2_core_foundation::CGPoint;
|
||||
use objc2_core_graphics::{
|
||||
CGEvent, CGEventSource, CGEventSourceStateID, CGEventTapLocation, CGEventType, CGMouseButton,
|
||||
CGScrollEventUnit,
|
||||
};
|
||||
use pathfinder_geometry::vector::Vector2I;
|
||||
use galaxyui::r#async::Timer;
|
||||
|
||||
use crate::{MouseButton, ScrollDirection, ScrollDistance};
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::fs;
|
||||
|
||||
use criterion::{Criterion, criterion_group, criterion_main};
|
||||
use rand::{SeedableRng, rngs::StdRng};
|
||||
use galaxy_editor::content::{
|
||||
buffer::Buffer, selection_model::BufferSelectionModel, text::IndentBehavior,
|
||||
};
|
||||
use galaxyui::{App, ModelHandle};
|
||||
use rand::{SeedableRng, rngs::StdRng};
|
||||
|
||||
const EDIT_SAMPLE_SIZE: usize = 10;
|
||||
const MAX_EDIT_REPLACEMENT_LENGTH: usize = 20;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::cmp::Ordering;
|
||||
|
||||
use sum_tree::SumTree;
|
||||
use galaxyui::App;
|
||||
use sum_tree::SumTree;
|
||||
|
||||
use super::{AnchorSide, Anchors};
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use core::fmt;
|
||||
use galaxy_util::content_version::ContentVersion;
|
||||
use itertools::{Either, Itertools};
|
||||
use line_ending::LineEnding;
|
||||
use markdown_parser::{
|
||||
@@ -17,7 +18,6 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
use vec1::{Vec1, vec1};
|
||||
use galaxy_util::content_version::ContentVersion;
|
||||
|
||||
use super::{
|
||||
anchor::{Anchor, AnchorSide, Anchors},
|
||||
@@ -51,14 +51,14 @@ use crate::{
|
||||
render::model::{EmbeddedItem, RenderedSelection, RenderedSelectionBias, RenderedSelectionSet},
|
||||
};
|
||||
use enum_iterator::all;
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use galaxyui::{AppContext, Entity, ModelContext};
|
||||
use galaxyui::{EntityId, ModelHandle, elements::ListIndentLevel};
|
||||
use galaxyui::{
|
||||
fonts::Weight,
|
||||
text::{TextBuffer, char_slice, point::Point},
|
||||
};
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
|
||||
/// Format of the passed in text.
|
||||
#[derive(Clone, Debug, Copy)]
|
||||
|
||||
@@ -2,6 +2,7 @@ use std::ops::Range;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicU8, Ordering};
|
||||
|
||||
use galaxyui::{App, AppContext, ModelContext, ModelHandle, ReadModel};
|
||||
use line_ending::LineEnding;
|
||||
use markdown_parser::{
|
||||
FormattedIndentTextInline, FormattedText, FormattedTextFragment, FormattedTextLine, parse_html,
|
||||
@@ -12,7 +13,6 @@ use rand::SeedableRng;
|
||||
use rand::rngs::StdRng;
|
||||
use serde_yaml::{Mapping, Value};
|
||||
use vec1::{Vec1, vec1};
|
||||
use galaxyui::{App, AppContext, ModelContext, ModelHandle, ReadModel};
|
||||
|
||||
use crate::content::buffer::{
|
||||
AutoScrollBehavior, BufferEditAction, BufferSelectAction, EditOrigin, EmbeddedItemConversion,
|
||||
@@ -37,10 +37,10 @@ use crate::render::model::{
|
||||
EmbeddedItem, EmbeddedItemHTMLRepresentation, EmbeddedItemRichFormat, LaidOutEmbeddedItem,
|
||||
RenderedSelectionSet,
|
||||
};
|
||||
use string_offset::ByteOffset;
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::text::point::Point;
|
||||
use string_offset::ByteOffset;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use crate::content::buffer::{Buffer, StyledBufferRun};
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ use crate::content::{
|
||||
},
|
||||
};
|
||||
use enum_iterator::all;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
|
||||
use std::ops::Range;
|
||||
use string_offset::CharOffset;
|
||||
use sum_tree::SumTree;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CoreEditorAction {
|
||||
|
||||
@@ -7,13 +7,6 @@ use std::{
|
||||
};
|
||||
|
||||
use anyhow::{Result, anyhow};
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::{Hyperlink, TableAlignment};
|
||||
use num_traits::SaturatingSub;
|
||||
use rangemap::RangeSet;
|
||||
use rayon::iter::{IndexedParallelIterator, IntoParallelIterator, ParallelIterator};
|
||||
use urlocator::{UrlLocation, UrlLocator};
|
||||
use vec1::Vec1;
|
||||
use galaxy_core::{features::FeatureFlag, ui::theme::Fill as ThemeFill};
|
||||
use galaxyui::{
|
||||
AppContext,
|
||||
@@ -23,6 +16,13 @@ use galaxyui::{
|
||||
text_layout::{StyleAndFont, TextAlignment},
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::{Hyperlink, TableAlignment};
|
||||
use num_traits::SaturatingSub;
|
||||
use rangemap::RangeSet;
|
||||
use rayon::iter::{IndexedParallelIterator, IntoParallelIterator, ParallelIterator};
|
||||
use urlocator::{UrlLocation, UrlLocator};
|
||||
use vec1::Vec1;
|
||||
|
||||
use crate::{
|
||||
parallel_util::Last,
|
||||
@@ -38,8 +38,8 @@ use crate::{
|
||||
},
|
||||
},
|
||||
};
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use galaxyui::text::char_slice;
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
|
||||
use super::{
|
||||
buffer::{StyledBufferBlock, StyledBufferRun, StyledTextBlock},
|
||||
|
||||
@@ -13,8 +13,6 @@ use crate::{
|
||||
model::{BlockItem, test_utils::TEST_STYLES},
|
||||
},
|
||||
};
|
||||
use std::path::Path;
|
||||
use string_offset::CharOffset;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{
|
||||
App, SingletonEntity,
|
||||
@@ -23,6 +21,8 @@ use galaxyui::{
|
||||
image_cache::ImageType,
|
||||
text_layout::{LayoutCache, StyleAndFont, TextStyle},
|
||||
};
|
||||
use std::path::Path;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
#[test]
|
||||
fn test_highlight_urls() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::{iter, pin::pin, sync::Once};
|
||||
|
||||
use futures_lite::future;
|
||||
use galaxyui::App;
|
||||
use itertools::Itertools;
|
||||
use rangemap::RangeSet;
|
||||
use sum_tree::SumTree;
|
||||
use galaxyui::App;
|
||||
|
||||
use crate::content::{
|
||||
buffer::Buffer,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle};
|
||||
use rangemap::RangeSet;
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle};
|
||||
|
||||
use crate::content::edit::EditDelta;
|
||||
use crate::content::selection_model::BufferSelectionModel;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
use anyhow::{Context, Result};
|
||||
use galaxyui::text::point::Point;
|
||||
use galaxyui::{AppContext, ModelContext, ModelHandle};
|
||||
use html5ever::serialize;
|
||||
use html5ever::{
|
||||
QualName,
|
||||
@@ -15,11 +17,9 @@ use std::collections::VecDeque;
|
||||
use std::fmt::Write;
|
||||
use std::iter;
|
||||
use std::{io, ops::Range};
|
||||
use galaxyui::text::point::Point;
|
||||
use galaxyui::{AppContext, ModelContext, ModelHandle};
|
||||
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::elements::{ListIndentLevel, ListNumbering};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use crate::content::anchor::AnchorSide;
|
||||
use crate::content::selection_model::BufferSelectionModel;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxyui::{App, ReadModel};
|
||||
use markdown_parser::{compute_formatted_text_delta, parse_markdown};
|
||||
use serde_yaml::Value;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::Vec1;
|
||||
use galaxyui::{App, ReadModel};
|
||||
|
||||
use crate::content::{
|
||||
buffer::{
|
||||
|
||||
@@ -4,13 +4,13 @@ use std::{
|
||||
};
|
||||
|
||||
use bytes::Bytes;
|
||||
use mermaid_to_svg::MermaidTheme;
|
||||
use galaxyui::{
|
||||
AppContext, SingletonEntity,
|
||||
assets::asset_cache::{AssetCache, AssetSource, AssetState, AsyncAssetId, AsyncAssetType},
|
||||
image_cache::ImageType,
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use mermaid_to_svg::MermaidTheme;
|
||||
|
||||
use crate::render::{
|
||||
layout::TextLayout,
|
||||
|
||||
@@ -6,8 +6,8 @@ use crate::content::{
|
||||
selection_model::BufferSelectionModel,
|
||||
text::{BlockType, BufferBlockStyle, IndentBehavior, TextStyles},
|
||||
};
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::App;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
#[test]
|
||||
fn test_no_blocks() {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
//! [`TextBuffer`] API.
|
||||
|
||||
use anyhow::anyhow;
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use super::{
|
||||
buffer::{Buffer, ToBufferCharOffset, ToBufferPoint},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::parse_markdown;
|
||||
use string_offset::CharOffset;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
|
||||
use crate::content::{
|
||||
buffer::{Buffer, EditOrigin},
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::ops::Range;
|
||||
|
||||
use galaxyui::{AppContext, Entity, ModelHandle};
|
||||
use itertools::Itertools;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::{Vec1, vec1};
|
||||
use galaxyui::{AppContext, Entity, ModelHandle};
|
||||
|
||||
use crate::content::{
|
||||
anchor::{Anchor, AnchorSide, AnchorUpdate, Anchors},
|
||||
|
||||
@@ -4,6 +4,14 @@ use crate::render::model::{
|
||||
};
|
||||
use arrayvec::ArrayString;
|
||||
use enum_iterator::Sequence;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::text::BlockHeaderSize as HeaderSize;
|
||||
use galaxyui::text::point::Point;
|
||||
use galaxyui::{
|
||||
AppContext,
|
||||
fonts::{Properties, Style, Weight},
|
||||
};
|
||||
use lazy_static::lazy_static;
|
||||
pub use markdown_parser::markdown_parser::TABLE_BLOCK_MARKDOWN_LANG;
|
||||
use markdown_parser::{
|
||||
@@ -30,14 +38,6 @@ use std::{
|
||||
};
|
||||
use string_offset::{ByteOffset, CharOffset, impl_offset};
|
||||
use sum_tree::{Cursor, SeekBias, SumTree};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::text::BlockHeaderSize as HeaderSize;
|
||||
use galaxyui::text::point::Point;
|
||||
use galaxyui::{
|
||||
AppContext,
|
||||
fonts::{Properties, Style, Weight},
|
||||
};
|
||||
|
||||
use super::{buffer::Buffer, core::CursorType, markdown::MarkdownStyle};
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use markdown_parser::CodeBlockText;
|
||||
use galaxyui::fonts::Weight;
|
||||
use markdown_parser::CodeBlockText;
|
||||
|
||||
use markdown_parser::FormattedTable;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use markdown_parser::FormattedTable;
|
||||
|
||||
use super::{
|
||||
BufferBlockItem, BufferTextStyle, CodeBlockType, MarkdownStyle, TextStyles,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::{collections::VecDeque, time::Duration};
|
||||
|
||||
use instant::Instant;
|
||||
use galaxy_util::content_version::ContentVersion;
|
||||
use instant::Instant;
|
||||
|
||||
use crate::render::model::RenderedSelectionSet;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ use crate::content::{
|
||||
BlockHeaderSize, BufferBlockItem, BufferBlockStyle, BufferText, BufferTextStyle, MarkerDir,
|
||||
},
|
||||
};
|
||||
use sum_tree::SumTree;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use sum_tree::SumTree;
|
||||
|
||||
#[test]
|
||||
#[should_panic(
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
use std::{any::Any, cell::Ref, ops::Range};
|
||||
|
||||
use num_traits::SaturatingSub;
|
||||
use pathfinder_color::ColorU;
|
||||
use rangemap::{RangeMap, RangeSet};
|
||||
use galaxyui::{
|
||||
Action, AppContext, Element, TypedActionView, View, elements::Border,
|
||||
text_layout::PaintStyleOverride,
|
||||
};
|
||||
use num_traits::SaturatingSub;
|
||||
use pathfinder_color::ColorU;
|
||||
use rangemap::{RangeMap, RangeSet};
|
||||
|
||||
use crate::{content::version::BufferVersion, render::element::RichTextAction};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::ops::Range;
|
||||
|
||||
use itertools::{Either, Itertools};
|
||||
use line_ending::LineEnding;
|
||||
use vec1::{Vec1, vec1};
|
||||
use galaxyui::{
|
||||
AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, clipboard::ClipboardContent,
|
||||
};
|
||||
use itertools::{Either, Itertools};
|
||||
use line_ending::LineEnding;
|
||||
use vec1::{Vec1, vec1};
|
||||
|
||||
use crate::{
|
||||
content::{
|
||||
@@ -21,8 +21,8 @@ use crate::{
|
||||
render::model::RenderState,
|
||||
selection::{SelectionMode, SelectionModel, TextDirection, TextUnit},
|
||||
};
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
|
||||
/// A wrapper for a buffer that provides access to its internal update_content method.
|
||||
/// It's important this is only returned from `CoreEditorModel::update_content` method
|
||||
|
||||
@@ -154,7 +154,9 @@ impl RenderableBlock for RenderableBrokenEmbedding {
|
||||
);
|
||||
}
|
||||
|
||||
ctx.paint.scene.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
ctx.paint
|
||||
.scene
|
||||
.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
self.row
|
||||
.paint(ctx.content_to_screen(content_origin), ctx.paint, app);
|
||||
ctx.paint.scene.stop_layer();
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
use float_cmp::ApproxEq;
|
||||
use instant::Instant;
|
||||
use parking_lot::Mutex;
|
||||
use std::{
|
||||
fmt,
|
||||
sync::{
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
},
|
||||
time::Duration,
|
||||
};
|
||||
use temporary_block::RenderableTemporaryBlock;
|
||||
use vim::vim::VimMode;
|
||||
use galaxy_core::ui::theme::Fill as ThemeFill;
|
||||
use galaxyui::{
|
||||
AfterLayoutContext, AppContext, Element, Event, EventContext, LayoutContext, ModelHandle,
|
||||
@@ -28,6 +16,18 @@ use galaxyui::{
|
||||
platform::Cursor,
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use instant::Instant;
|
||||
use parking_lot::Mutex;
|
||||
use std::{
|
||||
fmt,
|
||||
sync::{
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
},
|
||||
time::Duration,
|
||||
};
|
||||
use temporary_block::RenderableTemporaryBlock;
|
||||
use vim::vim::VimMode;
|
||||
|
||||
use super::model::{
|
||||
BlockItem, ElementUpdate, HitTestOptions, Location, RenderState, RichTextStyles, UNIT_MARGIN,
|
||||
|
||||
@@ -48,7 +48,12 @@ impl RenderableBlock for RenderableRunnableCommand {
|
||||
&self.viewport_item
|
||||
}
|
||||
|
||||
fn layout(&mut self, _model: &RenderState, ctx: &mut galaxyui::LayoutContext, app: &AppContext) {
|
||||
fn layout(
|
||||
&mut self,
|
||||
_model: &RenderState,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &AppContext,
|
||||
) {
|
||||
self.footer.layout(
|
||||
SizeConstraint::strict(vec2f(
|
||||
self.viewport_item.content_size.x(),
|
||||
@@ -87,7 +92,9 @@ impl RenderableBlock for RenderableRunnableCommand {
|
||||
|
||||
// Place the button at a higher z-index for event handling. See the comment on
|
||||
// `RichTextElement::content_z_index` for context.
|
||||
ctx.paint.scene.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
ctx.paint
|
||||
.scene
|
||||
.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
|
||||
// Position the block footer right below the content area, flush with its right-hand edge.
|
||||
// This gives the footer some padding relative to the visible area with a background.
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use std::ops::Range;
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::{
|
||||
AppContext, ClipBounds, Event, EventContext,
|
||||
elements::{
|
||||
@@ -14,6 +12,8 @@ use galaxyui::{
|
||||
},
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use std::ops::Range;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use crate::render::model::table_offset_map::CellAtOffset;
|
||||
use crate::{
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use std::{cell::Cell, sync::Arc};
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::{
|
||||
elements::{Axis, scroll_delta_for_pointer_movement},
|
||||
fonts::FamilyId,
|
||||
@@ -8,6 +5,9 @@ use galaxyui::{
|
||||
text_layout::TextFrame,
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use std::{cell::Cell, sync::Arc};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use crate::{
|
||||
content::text::{FormattedTable, table_cell_offset_maps},
|
||||
|
||||
@@ -4,7 +4,6 @@ use crate::{
|
||||
extract_block,
|
||||
render::model::{BlockItem, RenderState, RichTextStyles, bounds, viewport::ViewportItem},
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::{
|
||||
AppContext, Element, SizeConstraint, WeakViewHandle,
|
||||
@@ -15,6 +14,7 @@ use galaxyui::{
|
||||
geometry::vector::vec2f,
|
||||
platform::Cursor,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
use super::{
|
||||
RenderableBlock, RichTextAction,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! Hit-testing implementation for the rendering model.
|
||||
|
||||
use galaxyui::units::{IntoPixels, Pixels};
|
||||
use num_traits::SaturatingSub;
|
||||
use sum_tree::SeekBias;
|
||||
use galaxyui::units::{IntoPixels, Pixels};
|
||||
|
||||
use string_offset::CharOffset;
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ use pathfinder_color::ColorU;
|
||||
use std::{cell::Cell, sync::Arc};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use sum_tree::SumTree;
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::text_layout::{CaretPosition, TextFrame};
|
||||
use galaxyui::units::IntoPixels;
|
||||
use sum_tree::SumTree;
|
||||
|
||||
fn test_table_layout() -> LaidOutTable {
|
||||
let source = "aaa\tbbb\nccc\tddd\n";
|
||||
|
||||
@@ -12,15 +12,6 @@ use parking_lot::Mutex;
|
||||
use rangemap::RangeSet;
|
||||
|
||||
use float_cmp::ApproxEq;
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::TableAlignment;
|
||||
use num_traits::SaturatingSub;
|
||||
use ordered_float::OrderedFloat;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_yaml::Mapping;
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use vec1::Vec1;
|
||||
use vim::vim::{MotionType, VimMode};
|
||||
use galaxy_core::{
|
||||
channel::ChannelState,
|
||||
ui::{Icon, theme::Fill as ThemeFill},
|
||||
@@ -44,6 +35,15 @@ use galaxyui::{
|
||||
},
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use markdown_parser::TableAlignment;
|
||||
use num_traits::SaturatingSub;
|
||||
use ordered_float::OrderedFloat;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_yaml::Mapping;
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use vec1::Vec1;
|
||||
use vim::vim::{MotionType, VimMode};
|
||||
|
||||
pub use self::location::{HitTestOptions, Location};
|
||||
pub use self::offset_map::{OffsetMap, SelectableTextRun};
|
||||
@@ -68,8 +68,8 @@ use crate::{
|
||||
editor::EmbeddedItemModel,
|
||||
render::model::debug::Describe,
|
||||
};
|
||||
use string_offset::{CharOffset, impl_offset};
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use string_offset::{CharOffset, impl_offset};
|
||||
|
||||
use super::{
|
||||
BLOCK_FOOTER_HEIGHT,
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
use rangemap::RangeSet;
|
||||
use std::{cell::Cell, sync::Arc};
|
||||
use sum_tree::SumTree;
|
||||
use vec1::{Vec1, vec1};
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
@@ -10,6 +6,10 @@ use galaxyui::{
|
||||
text_layout::TextFrame,
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use rangemap::RangeSet;
|
||||
use std::{cell::Cell, sync::Arc};
|
||||
use sum_tree::SumTree;
|
||||
use vec1::{Vec1, vec1};
|
||||
|
||||
use super::{
|
||||
BlockItem, BlockLocation, COMMAND_SPACING, CellLayout, DEFAULT_BLOCK_SPACINGS,
|
||||
@@ -32,9 +32,9 @@ use crate::{
|
||||
test_utils::{TEST_STYLES, laid_out_paragraph, mock_paragraph},
|
||||
},
|
||||
};
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use markdown_parser::{FormattedTextStyles, Hyperlink};
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
#[test]
|
||||
fn test_height() {
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use sum_tree::{Cursor, Dimension};
|
||||
use galaxyui::{
|
||||
geometry::vector::Vector2F,
|
||||
text_layout::Line,
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use sum_tree::{Cursor, Dimension};
|
||||
|
||||
use crate::render::layout::line_height;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
@@ -5,7 +5,6 @@ use std::{mem, sync::Arc};
|
||||
use vec1::{Vec1, vec1};
|
||||
|
||||
use crate::content::text::BufferBlockStyle;
|
||||
use ordered_float::OrderedFloat;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::{
|
||||
color::ColorU,
|
||||
@@ -15,6 +14,7 @@ use galaxyui::{
|
||||
text_layout::{CaretPosition, Glyph, Line, Run, TextFrame},
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use ordered_float::OrderedFloat;
|
||||
|
||||
use super::{
|
||||
BlockItem, BrokenLinkStyle, CheckBoxStyle, DEFAULT_BLOCK_SPACINGS, HorizontalRuleStyle,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use float_cmp::ApproxEq;
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
use galaxyui::{
|
||||
SizeConstraint,
|
||||
geometry::{
|
||||
@@ -8,6 +7,7 @@ use galaxyui::{
|
||||
},
|
||||
units::{IntoPixels, Pixels},
|
||||
};
|
||||
use sum_tree::{SeekBias, SumTree};
|
||||
|
||||
use crate::render::element::RenderContext;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::ops::Range;
|
||||
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle, r#async::SpawnedFutureHandle};
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxy_core::ui::theme::Fill;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle, r#async::SpawnedFutureHandle};
|
||||
|
||||
use crate::{
|
||||
content::{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use galaxyui::{AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, units::Pixels};
|
||||
use num_traits::SaturatingSub;
|
||||
use std::ops::Range;
|
||||
use vec1::Vec1;
|
||||
use galaxyui::{AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, units::Pixels};
|
||||
|
||||
use crate::{
|
||||
content::{
|
||||
@@ -15,8 +15,8 @@ use crate::{
|
||||
},
|
||||
render::model::{RenderState, SoftWrapPoint},
|
||||
};
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
|
||||
use string_offset::CharOffset;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "selection_tests.rs"]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{App, ModelAsRef, units::IntoPixels};
|
||||
use serde_yaml::Value;
|
||||
use sum_tree::SumTree;
|
||||
use vec1::vec1;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{App, ModelAsRef, units::IntoPixels};
|
||||
|
||||
use crate::{
|
||||
content::{
|
||||
@@ -21,9 +21,9 @@ use crate::{
|
||||
},
|
||||
selection::SelectionMode,
|
||||
};
|
||||
use string_offset::CharOffset;
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::text::word_boundaries::WordBoundariesPolicy;
|
||||
use string_offset::CharOffset;
|
||||
|
||||
use super::{SelectionModel, TextDirection, TextUnit};
|
||||
|
||||
|
||||
@@ -101,11 +101,16 @@ fn apply_path(
|
||||
let field_desc = match target.descriptor().get_field_by_name(field_name) {
|
||||
Some(f) => f,
|
||||
None => {
|
||||
log::warn!("[field_mask] Unknown field '{}' in message '{}' (path: {:?}). Available fields: {:?}",
|
||||
log::warn!(
|
||||
"[field_mask] Unknown field '{}' in message '{}' (path: {:?}). Available fields: {:?}",
|
||||
field_name,
|
||||
target.descriptor().full_name(),
|
||||
path_segments,
|
||||
target.descriptor().fields().map(|f| f.name().to_string()).collect::<Vec<_>>()
|
||||
target
|
||||
.descriptor()
|
||||
.fields()
|
||||
.map(|f| f.name().to_string())
|
||||
.collect::<Vec<_>>()
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ use std::sync::Arc;
|
||||
|
||||
use anyhow::Result;
|
||||
use async_trait::async_trait;
|
||||
use smol_str::SmolStr;
|
||||
use typed_path::{TypedPath, TypedPathBuf};
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_util::path::{EscapeChar, ShellFamily};
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
use smol_str::SmolStr;
|
||||
use typed_path::{TypedPath, TypedPathBuf};
|
||||
|
||||
use crate::{completer::TopLevelCommandCaseSensitivity, signatures::CommandRegistry};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use async_trait::async_trait;
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use galaxy_js::{JsFunctionId, SerializedJsValue, TypedJsFunctionRef};
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
pub enum JsExecutionError {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
use itertools::Itertools;
|
||||
use string_offset::ByteOffset;
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
|
||||
use crate::{
|
||||
completer::suggest::MatchRequirement,
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
//! command signature struct (`warp_command_signatures::Signature`).
|
||||
use std::{borrow::Cow, collections::HashMap};
|
||||
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_util::path::ShellFamily;
|
||||
use itertools::Itertools;
|
||||
use smol_str::SmolStr;
|
||||
use warp_command_signatures::{
|
||||
Argument, ArgumentType, DynamicCompletionData, Generator, GeneratorProcess, Signature,
|
||||
Template, TemplateFilter, TemplateType,
|
||||
};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_util::path::ShellFamily;
|
||||
|
||||
use crate::completer::{
|
||||
context::CompletionContext,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::fs::DirEntry;
|
||||
|
||||
use galaxy_util::path::HOME_DIR_ENV_VAR_PREFIX;
|
||||
use itertools::{iproduct, Itertools};
|
||||
use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use typed_path::{TypedPath, TypedPathBuf};
|
||||
use warp_command_signatures::{IconType, PathSuggestionType};
|
||||
use galaxy_util::path::HOME_DIR_ENV_VAR_PREFIX;
|
||||
|
||||
use crate::completer::suggest::Priority;
|
||||
use crate::completer::{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use itertools::Itertools;
|
||||
use galaxy_util::path::EscapeChar;
|
||||
use itertools::Itertools;
|
||||
|
||||
use super::LocationType;
|
||||
use crate::completer::testing::FakeCompletionContext;
|
||||
|
||||
@@ -47,7 +47,8 @@ pub fn test_expand_command_aliases() {
|
||||
#[cfg(not(feature = "v2"))]
|
||||
{
|
||||
// The test signature has an alias function, which expands subcommand "twelve" to "one".
|
||||
let result = galaxyui::r#async::block_on(expand_command_aliases("test twelve ", false, &ctx));
|
||||
let result =
|
||||
galaxyui::r#async::block_on(expand_command_aliases("test twelve ", false, &ctx));
|
||||
assert_eq!(result.expanded_command_line, "test one ");
|
||||
assert_eq!(result.tokens_from_command, vec!["test", "one"]);
|
||||
// Should be using the subcommand signature for completions
|
||||
@@ -61,8 +62,11 @@ pub fn test_expand_command_aliases() {
|
||||
);
|
||||
|
||||
// We have a top-level aliasForTest which expands to test, and then the test signature expands "twelve" to "one"
|
||||
let result =
|
||||
galaxyui::r#async::block_on(expand_command_aliases("aliasForTest twelve ", false, &ctx));
|
||||
let result = galaxyui::r#async::block_on(expand_command_aliases(
|
||||
"aliasForTest twelve ",
|
||||
false,
|
||||
&ctx,
|
||||
));
|
||||
assert_eq!(result.expanded_command_line, "test one ");
|
||||
assert_eq!(result.tokens_from_command, vec!["test", "one"]);
|
||||
// Should be using the subcommand signature for completions
|
||||
|
||||
@@ -6,8 +6,8 @@ mod priority;
|
||||
use alias::{expand_command_aliases, AliasExpansionResult};
|
||||
pub use priority::Priority;
|
||||
|
||||
use imp::*;
|
||||
use galaxy_core::ui::theme::AnsiColorIdentifier;
|
||||
use imp::*;
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -10,11 +10,11 @@ use std::{
|
||||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_util::path::{EscapeChar, ShellFamily, TEST_SESSION_HOME_DIR};
|
||||
use smol_str::SmolStr;
|
||||
use typed_path::{TypedPath, TypedPathBuf};
|
||||
use warp_command_signatures::IconType;
|
||||
use galaxy_core::command::ExitCode;
|
||||
use galaxy_util::path::{EscapeChar, ShellFamily, TEST_SESSION_HOME_DIR};
|
||||
|
||||
use crate::{
|
||||
completer::{
|
||||
|
||||
@@ -7,9 +7,9 @@ mod parser;
|
||||
mod token;
|
||||
|
||||
use crate::parsers::LiteCommand;
|
||||
use galaxy_util::path::EscapeChar;
|
||||
use lexer::Lexer;
|
||||
use parser::Parser;
|
||||
use galaxy_util::path::EscapeChar;
|
||||
|
||||
use string_offset::ByteOffset;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use itertools::Itertools;
|
||||
use galaxy_util::path::EscapeChar;
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::{
|
||||
parsers::{
|
||||
|
||||
@@ -192,11 +192,12 @@ fn test_alias_expansion_path_skips_flag_with_value_before_subcommand() {
|
||||
let registry = create_test_command_registry([kubectl]);
|
||||
let ctx = FakeCompletionContext::new(registry).with_case_sensitivity();
|
||||
|
||||
let result = galaxyui::r#async::block_on(ctx.command_registry().signature_with_alias_expansion(
|
||||
&["kubectl", "-n", "default", "get"],
|
||||
true,
|
||||
&ctx,
|
||||
));
|
||||
let result =
|
||||
galaxyui::r#async::block_on(ctx.command_registry().signature_with_alias_expansion(
|
||||
&["kubectl", "-n", "default", "get"],
|
||||
true,
|
||||
&ctx,
|
||||
));
|
||||
let SignatureResult::Success(found_signature) = result else {
|
||||
panic!("expected SignatureResult::Success");
|
||||
};
|
||||
@@ -214,18 +215,19 @@ fn test_alias_expansion_path_skips_multiple_flags_before_subcommand() {
|
||||
let registry = create_test_command_registry([kubectl]);
|
||||
let ctx = FakeCompletionContext::new(registry).with_case_sensitivity();
|
||||
|
||||
let result = galaxyui::r#async::block_on(ctx.command_registry().signature_with_alias_expansion(
|
||||
&[
|
||||
"kubectl",
|
||||
"--context",
|
||||
"staging-cluster",
|
||||
"-n",
|
||||
"project1",
|
||||
"get",
|
||||
],
|
||||
true,
|
||||
&ctx,
|
||||
));
|
||||
let result =
|
||||
galaxyui::r#async::block_on(ctx.command_registry().signature_with_alias_expansion(
|
||||
&[
|
||||
"kubectl",
|
||||
"--context",
|
||||
"staging-cluster",
|
||||
"-n",
|
||||
"project1",
|
||||
"get",
|
||||
],
|
||||
true,
|
||||
&ctx,
|
||||
));
|
||||
let SignatureResult::Success(found_signature) = result else {
|
||||
panic!("expected SignatureResult::Success");
|
||||
};
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
//! provide coverage for both flag states of "v2".
|
||||
use std::borrow::Cow;
|
||||
|
||||
use galaxy_util::path::ShellFamily;
|
||||
use itertools::Itertools;
|
||||
use warp_command_signatures::{
|
||||
Alias, AliasGeneratorName, Argument, ArgumentType, CommandBuilder, CommandSignatureGenerators,
|
||||
Generator, GeneratorName, GeneratorResults, Importance, IsArgumentOptional, Opt, Order,
|
||||
ParserDirectives, Priority, Signature, Suggestion as MetadataSuggestion, Template,
|
||||
};
|
||||
use galaxy_util::path::ShellFamily;
|
||||
|
||||
use super::{TEST_ALIAS_COMMAND, TEST_GENERATOR_1_COMMAND, TEST_GENERATOR_2_COMMAND};
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
//! `galaxy_completer::signatures::CommandSignature`s, as well as `IntoWarpJs` implementations for
|
||||
//! Rust structs that may be passed to JS functions defined on the Command Signature (e.g.
|
||||
//! `GeneratorCompletionContext`).
|
||||
use rquickjs::{FromJs, Function, Object, Value};
|
||||
use galaxy_js::{
|
||||
util::{get_one_or_more_optional, get_one_or_more_required, get_optional, get_required},
|
||||
FromWarpJs, IntoWarpJs, JsFunctionRegistry,
|
||||
};
|
||||
use rquickjs::{FromJs, Function, Object, Value};
|
||||
|
||||
use super::{
|
||||
Argument, ArgumentValue, Command, CommandSignature, GeneratorCompletionContext, GeneratorFn,
|
||||
|
||||
@@ -14,8 +14,8 @@ use std::cmp::Ordering;
|
||||
pub use lookup::*;
|
||||
pub use registry::*;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_js::TypedJsFunctionRef;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "test-util", derive(Default))]
|
||||
|
||||
@@ -428,8 +428,8 @@ fn app_id_from_bundle() -> Option<AppId> {
|
||||
base::{id, nil},
|
||||
foundation::NSBundle,
|
||||
};
|
||||
use objc::{msg_send, sel, sel_impl};
|
||||
use galaxyui::platform::mac::utils::nsstring_as_str;
|
||||
use objc::{msg_send, sel, sel_impl};
|
||||
|
||||
let bundle = id::mainBundle();
|
||||
if bundle != nil {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::sync::OnceLock;
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
use std::sync::OnceLock;
|
||||
|
||||
// Global execution mode, for logic that runs outside the UI framework.
|
||||
static GLOBAL_EXECUTION_MODE: OnceLock<ExecutionMode> = OnceLock::new();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use galaxyui::{Entity, SingletonEntity};
|
||||
use instant::Instant;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxyui::{Entity, SingletonEntity};
|
||||
|
||||
/// This represents one interval, i.e. one stage in a multiple-stage timer.
|
||||
struct TimingInterval {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::{collections::HashSet, ops::Range};
|
||||
|
||||
use galaxyui::elements::SmartSelectFn;
|
||||
use lazy_static::lazy_static;
|
||||
use regex::Regex;
|
||||
use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
|
||||
use string_offset::ByteOffset;
|
||||
use galaxyui::elements::SmartSelectFn;
|
||||
|
||||
use galaxyui::text::{
|
||||
word_boundaries::WordBoundariesPolicy,
|
||||
|
||||
@@ -3,13 +3,13 @@ use futures::channel::mpsc::{self, Receiver as MpscReceiver, Sender as MpscSende
|
||||
use futures::channel::oneshot::{self, Receiver, Sender};
|
||||
use futures::future::{AbortHandle, Abortable};
|
||||
use futures::StreamExt;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use instant::Instant;
|
||||
use std::collections::HashMap;
|
||||
use std::future::Future;
|
||||
use std::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::Duration;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxyui::{r#async::Timer, Entity, RetryOption, SingletonEntity};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::{fmt, marker::PhantomData};
|
||||
|
||||
use galaxyui::{AppContext, Entity, SingletonEntity};
|
||||
use serde_json::Value;
|
||||
use strum::IntoEnumIterator;
|
||||
use galaxyui::{AppContext, Entity, SingletonEntity};
|
||||
|
||||
// Re-export for macro use.
|
||||
#[doc(hidden)]
|
||||
@@ -153,8 +153,10 @@ macro_rules! send_telemetry_from_ctx {
|
||||
let event = $event;
|
||||
if event.enablement_state().is_enabled() {
|
||||
let auth_state =
|
||||
<$crate::telemetry::TelemetryContextModel as galaxyui::SingletonEntity>::handle($ctx)
|
||||
.as_ref($ctx);
|
||||
<$crate::telemetry::TelemetryContextModel as galaxyui::SingletonEntity>::handle(
|
||||
$ctx,
|
||||
)
|
||||
.as_ref($ctx);
|
||||
let user_id = auth_state.user_id($ctx);
|
||||
let anonymous_id = auth_state.anonymous_id($ctx);
|
||||
galaxyui::record_telemetry_from_ctx!(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use galaxyui::color::ColorU;
|
||||
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
||||
use std::{borrow::Cow, fmt};
|
||||
use galaxyui::color::ColorU;
|
||||
|
||||
use super::OPAQUE;
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ use crate::ui::color::{
|
||||
contrast::{pick_best_foreground_color, MinimumAllowedContrast},
|
||||
Opacity,
|
||||
};
|
||||
use galaxyui::color::ColorU;
|
||||
use getset::Getters;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxyui::color::ColorU;
|
||||
|
||||
const BLOCK_SELECTION_OPACITY: Opacity = 10;
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ use crate::ui::color::contrast::relative_luminance;
|
||||
use self::color::CustomDetails;
|
||||
|
||||
use dirs::home_dir;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxyui::{assets::asset_cache::AssetSource, color::ColorU, geometry::vector::vec2f};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct Image {
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
use settings::PrivatePreferences;
|
||||
use galaxyui::SingletonEntity;
|
||||
use galaxyui_extras::user_preferences::UserPreferences;
|
||||
use settings::PrivatePreferences;
|
||||
|
||||
/// An extension trait on [`galaxyui::AppContext`] for accessing private user
|
||||
/// preferences.
|
||||
|
||||
@@ -14,26 +14,26 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use remote_server::client::RemoteServerClient;
|
||||
use remote_server::manager::RemoteServerManager;
|
||||
use galaxy_core::HostId;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use remote_server::client::RemoteServerClient;
|
||||
use remote_server::manager::RemoteServerManager;
|
||||
|
||||
use futures::io::{AsyncBufReadExt, BufReader};
|
||||
use futures::StreamExt;
|
||||
|
||||
use async_channel::Sender;
|
||||
use galaxy_util::content_version::ContentVersion;
|
||||
use galaxy_util::file::FileSaveError;
|
||||
use galaxy_util::file::{FileId, FileLoadError};
|
||||
use galaxyui::ModelHandle;
|
||||
use galaxyui::{r#async::SpawnedFutureHandle, AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use notify_debouncer_full::notify::{RecursiveMode, WatchFilter};
|
||||
use repo_metadata::{
|
||||
repositories::DetectedRepositories,
|
||||
repository::{RepositorySubscriber, SubscriberId},
|
||||
CanonicalizedPath, Repository, RepositoryUpdate,
|
||||
};
|
||||
use galaxy_util::content_version::ContentVersion;
|
||||
use galaxy_util::file::FileSaveError;
|
||||
use galaxy_util::file::{FileId, FileLoadError};
|
||||
use galaxyui::ModelHandle;
|
||||
use galaxyui::{r#async::SpawnedFutureHandle, AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use watcher::{BulkFilesystemWatcher, BulkFilesystemWatcherEvent};
|
||||
|
||||
pub mod text_file_reader;
|
||||
|
||||
@@ -7,9 +7,9 @@ use std::{
|
||||
|
||||
use anyhow::Result;
|
||||
use chrono::Local;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use log::LevelFilter;
|
||||
use std::sync::OnceLock;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use zip::{CompressionMethod, ZipWriter, write::SimpleFileOptions};
|
||||
|
||||
use crate::{LogConfig, LogDestination};
|
||||
|
||||
@@ -170,9 +170,9 @@ impl Log for WasmLogger {
|
||||
.map_or_else(|| "[Unknown]".to_string(), |line| line.to_string()),
|
||||
);
|
||||
// Send error logs to Sentry.
|
||||
galaxy_web_event_bus::emit_event(galaxy_web_event_bus::WarpEvent::ErrorLogged {
|
||||
error,
|
||||
});
|
||||
galaxy_web_event_bus::emit_event(
|
||||
galaxy_web_event_bus::WarpEvent::ErrorLogged { error },
|
||||
);
|
||||
|
||||
console::error_4(
|
||||
&s,
|
||||
|
||||
@@ -3,8 +3,6 @@ use std::{borrow::Cow, fmt, str::FromStr};
|
||||
use anyhow::{Result, anyhow};
|
||||
use chrono::{DateTime, Utc};
|
||||
use derivative::Derivative;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxy_core::{
|
||||
features::FeatureFlag,
|
||||
ui::{Icon, appearance::Appearance, theme::Fill},
|
||||
@@ -18,6 +16,8 @@ use galaxyui_core::{
|
||||
},
|
||||
ui_components::components::UiComponent,
|
||||
};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
auth::UserUid,
|
||||
@@ -892,7 +892,9 @@ impl TryFrom<galaxy_graphql::object_permissions::ObjectPermissions> for ServerPe
|
||||
impl TryFrom<galaxy_graphql::object_permissions::ObjectGuest> for ServerObjectGuest {
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(value: galaxy_graphql::object_permissions::ObjectGuest) -> Result<Self, Self::Error> {
|
||||
fn try_from(
|
||||
value: galaxy_graphql::object_permissions::ObjectGuest,
|
||||
) -> Result<Self, Self::Error> {
|
||||
let object_guest = ServerObjectGuest {
|
||||
subject: value.subject.try_into()?,
|
||||
access_level: value.access_level,
|
||||
@@ -936,7 +938,9 @@ impl TryFrom<galaxy_graphql::object_permissions::GuestSubject> for ServerGuestSu
|
||||
impl TryFrom<galaxy_graphql::object_permissions::LinkSharing> for ServerLinkSharing {
|
||||
type Error = anyhow::Error;
|
||||
|
||||
fn try_from(value: galaxy_graphql::object_permissions::LinkSharing) -> Result<Self, Self::Error> {
|
||||
fn try_from(
|
||||
value: galaxy_graphql::object_permissions::LinkSharing,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Ok(ServerLinkSharing {
|
||||
access_level: value.access_level,
|
||||
source: value.source.map(TryInto::try_into).transpose()?,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
use galaxy_graphql::object_permissions::AccessLevel;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use session_sharing_protocol::common::{ProfileData as SessionSharingProfileData, Role};
|
||||
use galaxy_graphql::object_permissions::AccessLevel;
|
||||
|
||||
use crate::{auth::UserUid, cloud_object::Owner, ids::ServerId};
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ use crate::cloud_object::{
|
||||
CloudObjectMetadata, CloudObjectPermissions, ObjectIdType, ObjectType, Owner,
|
||||
};
|
||||
use crate::ids::SyncId;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use persistence::model::{NewObjectMetadata, NewObjectPermissions, ObjectMetadata};
|
||||
use persistence::schema;
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
|
||||
/// The sqlite id of a cloud object.
|
||||
pub type CloudObjectId = i32;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use super::{
|
||||
mouse::{MouseAction, MouseButton, MouseState},
|
||||
|
||||
@@ -4,8 +4,8 @@ use std::cmp::Ordering;
|
||||
use std::fmt;
|
||||
use std::ops::{Add, AddAssign, Range, Sub, SubAssign};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use galaxyui::units::Lines;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::grid::Dimensions;
|
||||
|
||||
|
||||
@@ -7,12 +7,6 @@ use std::path::{Path, PathBuf};
|
||||
use anyhow::Result;
|
||||
use channel_versions::overrides::TargetOS;
|
||||
use enum_iterator::Sequence;
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smol_str::SmolStr;
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
use version_compare::{Cmp, Version};
|
||||
use galaxy_completer::completer::{CommandExitStatus, CommandOutput};
|
||||
#[cfg(windows)]
|
||||
use galaxy_core::paths::base_config_dir;
|
||||
@@ -20,6 +14,12 @@ use galaxy_core::platform::SessionPlatform;
|
||||
use galaxy_util::path::{
|
||||
convert_msys2_to_windows_native_path, convert_wsl_to_windows_host_path, msys2_exe_to_root,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smol_str::SmolStr;
|
||||
use typed_path::{TypedPath, TypedPathBuf, WindowsPath};
|
||||
use version_compare::{Cmp, Version};
|
||||
|
||||
use crate::model::escape_sequences;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ use std::borrow::Cow;
|
||||
pub mod root_view;
|
||||
|
||||
extern crate galaxyui;
|
||||
use rust_embed::RustEmbed;
|
||||
use galaxyui::{platform, AssetProvider};
|
||||
use rust_embed::RustEmbed;
|
||||
|
||||
#[derive(Clone, Copy, RustEmbed)]
|
||||
#[folder = "examples/assets"]
|
||||
|
||||
@@ -4,8 +4,8 @@ use std::borrow::Cow;
|
||||
pub mod root_view;
|
||||
|
||||
extern crate galaxyui;
|
||||
use rust_embed::RustEmbed;
|
||||
use galaxyui::{platform, AssetProvider};
|
||||
use rust_embed::RustEmbed;
|
||||
|
||||
#[derive(Clone, Copy, RustEmbed)]
|
||||
#[folder = "examples/assets"]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use instant::Instant;
|
||||
use galaxyui::{
|
||||
assets::asset_cache::AssetSource,
|
||||
elements::{
|
||||
@@ -7,6 +6,7 @@ use galaxyui::{
|
||||
},
|
||||
AppContext, Element, Entity, TypedActionView, View,
|
||||
};
|
||||
use instant::Instant;
|
||||
|
||||
pub struct RootView {
|
||||
animation_start_time: Instant,
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::borrow::Cow;
|
||||
pub mod root_view;
|
||||
|
||||
extern crate galaxyui;
|
||||
use rust_embed::RustEmbed;
|
||||
use galaxyui::{platform, AssetProvider};
|
||||
use rust_embed::RustEmbed;
|
||||
|
||||
#[derive(Clone, Copy, RustEmbed)]
|
||||
#[folder = "examples/assets"]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::DispatchEventResult;
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::{
|
||||
@@ -9,6 +8,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity, Tracked, TypedActionView, View,
|
||||
ViewContext, ViewHandle,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
pub fn init(ctx: &mut AppContext) {
|
||||
ctx.add_singleton_model(|_| Settings {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user