text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_prefix|>pub mod attachments; pub mod codex_setup; pub mod core; pub mod create; pub mod cursor_setup; pub mod execution; pub mod gh_cli_setup; pub mod git; pub mod integration; pub mod links; pub mod pr; pub mod repos; pub mod streams; pub mod workspace_summary; use axum::{ Router, middleware::from_fn_wi...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> repo info for PR checkout (gh CLI may not be installed): {e}" ); cleanup_failed_pr_workspace(pool, &workspace).await; return Ok(ResponseJson(ApiResponse::error_with_data( CreateFromPrError::BranchFetchFailed { message: format!("Faile...
fim
BloopAI/vibe-kanban
rust
use axum::{Extension, Json, Router, extract::State, response::Json as ResponseJson, routing::get}; use db::models::{ requests::WorkspaceRepoInput, workspace::{Workspace, WorkspaceError}, workspace_repo::{RepoWithTargetBranch, WorkspaceRepo}, }; use deployment::Deployment; use serde::{Deserialize, Serialize}...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ Extension, extract::{Query, State, ws::Message}, response::IntoResponse, }; use deployment::Deployment; use serde::Deserialize; use services::services::container::ContainerService; use crate::{ DeploymentImpl, middleware::signed_ws::{MaybeSignedWebSocket, SignedWsUpgrade},...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>mary { pub workspace_id: Uuid, /// Session ID of the latest execution process pub latest_session_id: Option<Uuid>, /// Is a tool approval currently pending? pub has_pending_approval: bool, /// Number of files with changes pub files_changed: Option<usize>, /// Total lines ad...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>n; <|fim_prefix|>pub mod <|fim_middle|>relay_registratio<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>//! Relay host connection — registers the local backend with the relay server //! so it can receive tunneled connections from remote browsers. use std::net::SocketAddr; use anyhow::Context as _; use deployment::Deployment as _; use relay_tunnel_core::client::{RelayClientConfi<|fim_suffix|> pub fn defaul...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> &Path, ensure_gitignore: bool, ) -> DirectoryMigrationStats { let mut stats = DirectoryMigrationStats::default(); if !src_dir.exists() { return stats; } if let Err(error) = fs::create_dir_all(dst_dir) { tracing::warn!( "Failed to create attachment directo...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>RemoteClientError}; <|fim_prefix|>pub mo<|fim_middle|>d services; pub use services::remote_client::{HandoffErrorCode, RemoteClient, <|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ collections::hash_map::DefaultHasher, hash::{Hash, Hasher}, time::Duration, }; use os_info; use serde_json::{Value, json}; #[derive(Debug, Clone)] pub struct AnalyticsContext { pub user_id: String, pub analytics_service: AnalyticsService, } #[derive(Debug, Clone)] pub str...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> "unexpected permission response for question request", )) } } } } <|fim_prefix|>use std::{collections::HashMap, sync::Arc}; use async_trait::async_trait; use db::{self, DBService, models::execution_process::ExecutionProcess}; use executors::approvals...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>pub mod executor_approvals; use std::{collections::HashSet, sync::Arc, time::Duration as StdDuration}; use chrono::{DateTime, Utc}; use dashmap::DashMap; use futures::{ StreamExt, future::{BoxFuture, FutureExt, Shared}, }; use json_patch::Patch; use serde::{Deserialize, Serialize}; use thiserror...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::sync::Arc; use api_types::ProfileResponse; use tokio::sync::{Mutex as TokioMutex, OwnedMutexGuard, RwLock}; use super::oauth_credentials::{Credentials, OAuthCredentials}; #[derive(Clone)] pub struct AuthContext { oauth: Arc<OAuthCredentials>, profile: Arc<RwLock<Option<ProfileResponse>...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{path::Path, str::FromStr}; use executors::{command::CommandBuilder, executors::ExecutorError}; use serde::{Deserialize, Serialize}; use strum_macros::{EnumIter, EnumString}; use thiserror::Error; use ts_rs::TS; fn default_auto_install_extension() -> bool { true } #[derive(Debug, Clone, Se...
fim
BloopAI/vibe-kanban
rust
use std::path::PathBuf; use thiserror::Error; pub mod editor; mod versions; pub use editor::EditorOpenError; pub const DEFAULT_PR_DESCRIPTION_PROMPT: &str = r#"Update the PR that was just created with a better title and description. The PR number is #{pr_number} and the URL is {pr_url}. Analyze the changes in this...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>pub(super) mod v1; pub(super) mod v2; pub(super) mod v3; pub(super) mod<|fim_suffix|>) mod v5; pub(super) mod v6; pub(super) mod v7; pub(super) mod v8; <|fim_middle|> v4; pub(super<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> GitHubConfig { pub pat: Option<String>, pub token: Option<String>, pub username: Option<String>, pub primary_email: Option<String>, pub default_pr_base: Option<String>, } #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub(super) enum EditorType { ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::path::PathBuf; use anyhow::Error; use serde::{Deserialize, Serialize}; use strum_macros::EnumString; use ts_rs::TS; use utils::{assets::SoundAssets, cache_dir}; // Re-export editor config from the dedicated editor module pub use crate::services::config::editor::{EditorConfig, EditorType}; use c...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>abled: None, workspace_dir: None, } } } <|fim_prefix|>use anyhow::Error; use serde::{Deserialize, Serialize}; use ts_rs::TS; pub use v2::{EditorConfig, EditorType, GitHubConfig, NotificationConfig, SoundFile, ThemeMode}; use crate::services::config::versions::v2; #[derive(Clone, ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>e, telemetry_acknowledged: false, notifications: NotificationConfig::default(), editor: EditorConfig::default(), github: GitHubConfig::default(), analytics_enabled: None, workspace_dir: None, } } } <|fim_prefix|>use anyhow...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>ged: false, github_login_acknowledged: false, telemetry_acknowledged: false, notifications: NotificationConfig::default(), editor: EditorConfig::default(), github: GitHubConfig::default(), analytics_enabled: None, workspac...
fim
BloopAI/vibe-kanban
rust
use std::str::FromStr; use anyhow::Error; use executors::{executors::BaseCodingAgent, profile::ExecutorProfileId}; use serde::{Deserialize, Serialize}; use ts_rs::TS; use utils; pub use v5::{EditorConfig, EditorType, GitHubConfig, NotificationConfig, SoundFile, ThemeMode}; use crate::services::config::versions::v5; ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> Self::default() } } } } impl Default for Config { fn default() -> Self { Self { config_version: "v7".to_string(), theme: ThemeMode::System, executor_profile: ExecutorProfileId::new(BaseCodingAgent::ClaudeCode), ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>app_version: Option<String>, pub show_release_notes: bool, #[serde(default)] pub language: UiLanguage, #[serde(default = "default_git_branch_prefix")] pub git_branch_prefix: String, #[serde(default)] pub showcases: ShowcaseState, #[serde(default = "default_pr_auto_descripti...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ collections::{HashMap, HashSet}, path::{Path, PathBuf}, sync::Arc, }; use anyhow::{Error as AnyhowError, anyhow}; use async_trait::async_trait; use db::{ DBService, models::{ coding_agent_turn::{CodingAgentTurn, CreateCodingAgentTurn}, execution_process::{ ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ collections::{HashMap, HashSet}, io, path::{Path, PathBuf}, sync::{ Arc, atomic::{AtomicUsize, Ordering}, }, time::{Duration, SystemTime}, }; use db::{ DBService, models::{workspace::Workspace, workspace_repo::WorkspaceRepo}, }; use executors::lo...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>ch path should be valid"), value: serde_json::json!({ "id": scratch_id, "payload": { "type": scratch_type_str }, "deleted": true }), })]) } } /// Helper functions for creating approval-specific patches. pub mod approvals_...
fim
BloopAI/vibe-kanban
rust
use db::models::{execution_process::ExecutionProcess, scratch::Scratch, workspace::Workspace}; use futures::StreamExt; use serde_json::json; use tokio_stream::wrappers::BroadcastStream; use utils::log_msg::LogMsg; use uuid::Uuid; use super::{ EventService, patches::execution_process_patch, types::{EventPat...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> rowid: i64, scratch_id: Option<Uuid>, scratch_type: Option<String>, }, } #[derive(Serialize, Deserialize, TS)] pub struct EventPatchInner { pub(crate) db_op: String, pub(crate) record: RecordTypes, } #[derive(Serialize, Deserialize, TS)] pub struct EventPatch { pub...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>kspace) => { // Emit workspace patch with status if let Ok(Some(workspace_with_status)) = Workspace::find_by_id_with_status(&db.pool, workspace.id) .a...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>(err).with_context(|| { format!( "read execution log file for execution {execution_id} from {}", prod_path.display() ) }); } }...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>", file.file_path); } } else { tracing::warn!("Missing cache file: {}", src.display()); } } Ok(()) } fn resolve_cached_path(&self, file_path: &str) -> Option<PathBuf> { let primary = self.cache_dir.join(file_path); ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ collections::HashMap, path::{Path, PathBuf}, sync::Arc, }; use dashmap::DashMap; use db::models::repo::{SearchMatchType, SearchResult}; use git::{FileStat, GitService, GitServiceError}; use once_cell::sync::Lazy; use tokio::task; /// File statistics for a repository pub type FileS...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ path::{Path, PathBuf}, sync::Arc, time::{Duration, Instant}, }; use db::models::repo::{SearchMatchType, SearchResult}; use fst::{Map, MapBuilder}; use git::GitService; use ignore::WalkBuilder; use moka::future::Cache; use serde::{Deserialize, Serialize}; use thiserror::Error; use t...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>git_repos_with_timeout( vec![base_path], timeout_ms, hard_timeout_ms, max_depth, ) .await } } #[cfg(not(feature = "qa-mode"))] async fn list_git_repos_with_timeout( &self, paths: Ve...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> &root_for_task, ); } } } RenameMode::Any | RenameMode::Other => { ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>cation; pub mod oauth_credentials; pub mod pr_monitor; #[cfg(feature = "qa-mode")] pub mod qa_repos; pub mod queued_message; pub mod remote_client; pub mod remote_sync; pub mod repo; <|fim_prefix|>pub mod analytics; <|fim_middle|>pub mod approvals; pub mod auth; pub mod config; pub mod container; pub mod...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> Err(e) => { tracing::error!("Failed to create cached sound file: {}", e); return; } }; // Use platform-specific sound notification // Note: spawn() calls are intentionally not awaited - sound notifications should be fire-and-forget ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> let tmp = self.path.with_extension("tmp"); let file = { let mut opts = std::fs::OpenOptions::new(); opts.create(true).truncate(true).write(true); #[cfg(unix)] { use std::os::unix::fs::OpenOptionsExt; opts.mode(...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{sync::Arc, time::Duration}; use api_types::{PullRequestStatus, UpdatePullRequestApiRequest, UpsertPullRequestRequest}; use chrono::Utc; use db::{ DBService, models::{ merge::MergeStatus, pull_request::PullRequest, workspace::{Workspace, WorkspaceError}, }, };...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> assert_eq!(dir1, dir2); assert!(dir1.ends_with("qa-repos")); } } <|fim_prefix|>//! QA Mode: Hardcoded repository management for testing //! //! This module provides two hardcoded QA repositories that are cloned //! to a persistent temp directory and returned as the only "recent" repos. use s...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::sync::Arc; use chrono::{DateTime, Utc}; use dashmap::DashMap; use db::models::scratch::DraftFollowUpData; use serde::{Deserialize, Serialize}; use ts_rs::TS; use uuid::Uuid; /// Represents a queued follow-up message for a session #[derive(Debug, Clone, Serialize, Deserialize, TS)] pub struct Qu...
fim
BloopAI/vibe-kanban
rust
//! OAuth client for authorization-code handoffs with automatic retries. use std::time::Duration; use api_types::{ AcceptInvitationResponse, AuthMethodsResponse, CreateInvitationRequest, CreateInvitationResponse, CreateIssueAssigneeRequest, CreateIssueRelationshipRequest, CreateIssueRequest, CreateIssueTa...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::UpsertPullRequestRequest; use db::models::workspace::Workspace; use git::GitService; use sqlx::SqlitePool; use tracing::{debug, error}; use uuid::Uuid; use super::{ diff_stream::{self, DiffStats}, remote_client::{RemoteClient, RemoteClientError}, }; async fn update_workspace_on_re...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::path::{Path, PathBuf}; use db::models::repo::{Repo as RepoModel, SearchMatchType, SearchResult}; use git::{GitService, GitServiceError}; use sqlx::SqlitePool; use thiserror::Error; use utils::path::expand_tilde; use uuid::Uuid; use super::file_search::{FileSearchCache, SearchQuery}; #[derive(D...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> ) .await; // Should return an error for non-existent path assert!(result.is_err()); } #[tokio::test] async fn test_list_git_repos_with_max_depth_limit() { let temp_dir = TempDir::new().unwrap(); let base_path = temp_dir.path(); ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>fn main() { println!("cargo:rerun-if-env-changed=SENTRY_DSN"); tauri_build::build(); #[cfg(target_os = "windows")] fix_duplicate_version_resources(); } /// Prevent CVTRES CVT1100 "duplicate resource type:VERSION" on Windows. /// /// `tauri-winres` creates `{OUT_DIR}/resource.lib` (actual...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> ); } } }); } Err(e) => tracing::warn!("Failed to show Linux notification: {e}"), } }); } <|fim_prefix|>//! Linux notification system using `notify-rust`. //! //! Bypasses `tauri-plugin-not...
fim
BloopAI/vibe-kanban
rust
//! macOS-native notification system using `UNUserNotificationCenter`. //! //! Bypasses `tauri-plugin-notification` (which has no desktop click handling) //! and uses the native UserNotifications framework directly. A //! `UNUserNotificationCenterDelegate` receives click callbacks with the //! `deeplinkPath` stored in ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>(target_os = "macos")] { disable_pinch_zoom(&window); optimize_webview_performance(&window); } let _ = window; } else { // Production: start the Axum server first, then open the window ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>let Err(e) = result { tracing::warn!("Failed to show Windows notification: {e}"); } } <|fim_prefix|>//! Windows notification system using `tauri-winrt-notification`. //! //! Bypasses `tauri-plugin-notification` (which has no desktop click handling) //! and uses WinRT toast notifications direct...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use thiserr<|fim_suffix|>"IO error: {0}")] Io(#[from] std::io::Error), } <|fim_middle|>or::Error; #[derive(Debug, Error)] pub enum TrustedKeyAuthError { #[error("Unauthorized")] Unauthorized, #[error("Bad request: {0}")] BadRequest(String), #[error("Forbidden: {0}")] Forbidden...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64_STANDARD}; use hkdf::Hkdf; use hmac::{Hmac, Mac}; use sha2::Sha256; use uuid::Uuid; use crate::error::TrustedKeyAuthError; const KEY_CONFIRMATION_INFO: &[u8] = b"key-confirmation"; const CLIENT_PROOF_CONTEXT: &[u8] = b"vk-spake2-clien...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>ignature; pub mod runtime; pub mod spake2; pub mod trusted_keys; <|fim_prefix|>pub mod error; pub mo<|fim_middle|>d key_confirmation; pub mod refresh; pub mod request_s<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> #[test] fn verify_refresh_signature_accepts_valid_signature() { let signing_key = signing_key(9); let client_id = Uuid::new_v4(); let message = build_refresh_message(1_700_000_000, "nonce", client_id); let signature_b64 = BASE64_STANDARD.encode(signing_key.sign(mess...
fim
BloopAI/vibe-kanban
rust
use std::{ path::Path, time::{SystemTime, UNIX_EPOCH}, }; use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64_STANDARD}; use ed25519_dalek::{Signature, VerifyingKey}; use http::{HeaderMap, Method}; use thiserror::Error; use crate::trusted_keys::load_trusted_public_keys; pub const SIGNATURE_...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ collections::HashMap, path::PathBuf, sync::Arc, time::{Duration, Instant}, }; use tokio::sync::RwLock; use uuid::Uuid; use crate::{ error::TrustedKeyAuthError, trusted_keys::{ TrustedRelayClient, list_trusted_clients, remove_trusted_client, upsert_trusted_clien...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64_STANDARD}; use rand::Rng; use spake2::{Ed25519Group, Identity, Password, Spake2, SysRng, UnwrapErr}; use crate::error::TrustedKeyAuthError; const SPAKE2_CLIENT_ID: &[u8] = b"vibe-kanban-browser"; const SPAKE2_SERVER_ID: &[u8] = b"vibe...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::path::Path; use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64_STANDARD}; use ed25519_dalek::VerifyingKey; use serde::{Deserialize, Serialize}; use tokio::fs; use uuid::Uuid; use crate::error::TrustedKeyAuthError; pub const TRUSTED_KEYS_FILE_NAME: &str = "trusted_ed25519_pub...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>// This file w<|fim_suffix|>le manually. export type DiffChangeKind = "added" | "deleted" | "modified" | "renamed" | "copied" | "permissionChange"; <|fim_middle|>as generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this fi<|endoftext|>
fim
BloopAI/vibe-kanban
typescript
<|fim_suffix|>eason: Option<String>, }, Answered { answers: Vec<QuestionAnswer>, }, TimedOut, } #[derive(Debug, Clone, Serialize, Deserialize, TS)] pub struct ApprovalResponse { pub execution_process_id: Uuid, pub status: ApprovalOutcome, } <|fim_prefix|>use chrono::{DateTime, Duration,...
fim
BloopAI/vibe-kanban
rust
use directories::ProjectDirs; use rust_embed::RustEmbed; const PROJECT_ROOT: &str = env!("CARGO_MANIFEST_DIR"); pub fn asset_dir() -> std::path::PathBuf { let path = if cfg!(debug_assertions) { std::path::PathBuf::from(PROJECT_ROOT).join("../../dev_assets") } else { prod_asset_dir_path() }...
fim
BloopAI/vibe-kanban
rust
use crate::{command_ext::NoWindowExt, is_wsl2}; /// Open URL in browser with WSL2 support pub async fn open_browser(url: &str) -> Result<(), Box<dyn std::error::Error + Send + Sync>> { if is_wsl2() { // In WSL2, use PowerShell to open the browser tokio::process::Command::new("powershell.exe") ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>//! Extension traits to suppress console windows on Windows. //! //! On Windows, spawned child processes open a visible console window by //! default. Call `.no_window()` before `.spawn()` or `.output()` to set //! the `CREATE_NO_WINDOW` creation flag and prevent this. //! //! On non-Windows platforms th...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>w_hunks } /// Creates a full unified diff with the file path in the header. /// /// Outputs git-diff format (`diff --git` prefix) so that downstream parsers /// (e.g. @pierre/diffs) split on `^diff --git` boundaries instead of /// `^---\s+\S`, which collides with deleted lines starting with `-- `. pub fn...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>: &str) -> std::io::Result<()> { self.file.write_all(jsonl_line.as_bytes()).await } } pub async fn read_execution_log_file(path: &Path) -> std::io::Result<String> { tokio::fs::read_to_string(path).await } pub fn parse_log_jsonl_lossy(execution_id: Uuid, jsonl: &str) -> Vec<LogMsg> { ...
fim
BloopAI/vibe-kanban
rust
pub fn is_hop_by_hop_header(name: &str) -> bool { name.eq_ignore_ascii_case("connection") || name.eq_ignore_ascii_case("keep-alive") || name.eq_ignore_ascii_case("proxy-authenticate") || name.eq_ignore_ascii_case("proxy-authorization") || name.eq_ignore_ascii_case("te") || na...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>, Deserialize)] struct SubClaim { sub: Option<String>, } /// Extract the expiration timestamp from a JWT without verifying its signature. pub fn extract_expiration(token: &str) -> Result<DateTime<Utc>, TokenClaimsError> { let data = insecure_decode::<ExpClaim>(token)?; let exp = data.claims.e...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{env, sync::OnceLock}; use directories::ProjectDirs; pub mod approvals; pub mod assets; pub mod browser; pub mod command_ext; pub mod diff; pub mod execution_logs; pub mod http_headers; pub mod jwt; pub mod log_msg; pub mod msg_store; pub mod path; pub mod port_file; pub mod process; pub mod re...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{extract::ws::Message, response::sse::Event}; use json_patch::Patch; use serde::{Deserialize, Serialize}; pub const EV_STDOUT: &str = "stdout"; pub const EV_STDERR: &str = "stderr"; pub const EV_JSON_PATCH: &str = "json_patch"; pub const EV_SESSION_ID: &str = "session_id"; pub const EV_MESSAGE_...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ collections::VecDeque, sync::{Arc, RwLock}, }; use futures::{StreamExt, future}; use tokio::{sync::broadcast, task::JoinHandle}; use tokio_stream::wrappers::{BroadcastStream, errors::BroadcastStreamRecvError}; use crate::{log_msg::LogMsg, stream_lines::LinesStreamExt}; // 100 MB Limi...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::path::{Path, PathBuf}; /// Directory name for storing attachments in worktrees pub const VIBE_ATTACHMENTS_DIR: &str = ".vibe-attachments"; /// Directories that should always be skipped regardless of gitignore. /// .git is not in .gitignore but should never be watched. pub const ALWAYS_SKIP_DIRS...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{env, path::PathBuf}; use serde::{Deserialize, Serialize}; use tokio::fs; #[derive(Debug, Serialize, Deserialize)] pub struct PortInfo { pub main_port: u16, #[serde(skip_serializing_if = "Option::is_none")] pub preview_proxy_port: Option<u16>, } pub async fn write_port_file_with_pr...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use command_group::AsyncGroupChild; #[cfg(unix)] use tokio::time::Duration; pub async fn kill_process_grou<|fim_suffix|>(child: &mut AsyncGroupChild) -> std::io::Result<()> { #[cfg(unix)] { // Use command_group's UnixChildExt::signal() which calls killpg() // with the pgid capture...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>a payload if present. pub fn into_data(self) -> Option<T> { self.data } } <|fim_prefix|>use serde::{Deserialize, Serialize}; use ts_rs::TS; #[derive(Debug, Serialize, Deserialize, TS)] pub struct ApiResponse<T, E = T> { success: bool, data: Option<T>, error_data: Option<E>, ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>b, Level::TRACE => EventFilter::Ignore, }) } <|fim_prefix|>use std::sync::OnceLock; use sentry_tracing::{EventFilter, SentryLayer}; use tracing::Level; static INIT_GUARD: OnceLock<sentry::ClientInitGuard> = OnceLock::new(); #[derive(Clone, Copy, Debug)] pub enum SentrySource { B...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> } } #[cfg(not(windows))] async fn get_fresh_path() -> Option<String> { use std::{process::Stdio, time::Duration}; use tokio::process::Command; async fn run(shell: &UnixShell) -> Option<String> { let mut cmd = Command::new(shell.path()); if shell.login() { cmd....
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use bytes::Bytes; use futures::{Stream, StreamExt, TryStreamExt}; use tokio_util::{ codec::{FramedRead, LinesCodec}, io::StreamReader, }; /// Extension trait for converting chunked string streams to line streams. pub trait LinesStreamExt: Stream<Item = Result<String, s<|fim_suffix|>m::BoxStream<'...
fim
BloopAI/vibe-kanban
rust
use regex::Regex; use uuid::Uuid; pub fn git_branch_id(input: &str) -> String { // 1. lowercase let lower = input.to_lowercase(); // 2. replace non-alphanumerics with hyphens let re = Regex::new(r"[^a-z0-9]+").unwrap(); let slug = re.replace_all(&lower, "-"); // 3. trim extra hyphens let ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{future::Future, sync::OnceLock}; use tokio::runtime::{Builder, Handle, Runtime, RuntimeFlavor}; fn rt() -> &'static Runtime { static RT: OnceLock<Run<|fim_suffix|>entThread | _ => std::thread::scope(|s| { s.spawn(|| rt().block_on(fut)) .join() ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>/// The<|fim_suffix|>GO_PKG_VERSION"); <|fim_middle|> current application version from Cargo.toml pub const APP_VERSION: &str = env!("CAR<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>mod workspace_manager; pub use workspace_manager::<|fim_suffix|>nput, RepoWorktree, WorkspaceDeletionContext, WorkspaceError, WorkspaceManager, WorktreeContainer, }; <|fim_middle|>{ ManagedWorkspace, RepoWorkspaceI<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::path::{Path, PathBuf}; use db::{ DBService, models::{ file::WorkspaceAttachment, repo::{Repo, RepoError}, requests::WorkspaceRepoInput, session::Session, workspace::Workspace as DbWorkspace, workspace_repo::{CreateWorkspaceRepo, RepoWithTar...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>, WorktreeManager}; <|fim_prefix|>mod worktr<|fim_middle|>ee_manager; pub use worktree_manager::{WorktreeCleanup, WorktreeError<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ collections::HashMap, fs, path::{Path, PathBuf}, sync::{Arc, LazyLock, Mutex, OnceLock}, }; static WORKSPACE_DIR_OVERRIDE: OnceLock<PathBuf> = OnceLock::new(); use git::{GitService, GitServiceError}; use thiserror::Error; use tracing::{debug, info, trace}; use utils::{path::no...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::extract::ws::Message as AxumWsMessage; use futures_util::{Sink, SinkExt, Stream, StreamExt}; use tokio_tungstenite::{tungstenite, tungstenite::client::IntoClientRequest}; use crate::ws_io::{axum_to_tungstenite, tungstenite_to_axum}; type BridgeSourceError = Box<dyn std::error::Error + Send + S...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>stenite_ws, connect_upstream_ws, }; pub use ws_io::{ AxumWsStreamIo, TungsteniteWsStreamIo, axum_ws_stream_io, tungstenite_ws_stream_io, }; <|fim_prefix|>mod bridge; mod ws_io; pub use bridge::{ Upstre<|fim_middle|>amWsConnectError, WsBridgeError, bridge_axum_ws, bridge_tung<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> { let this = self.as_mut().get_mut(); ready!(Pin::new(&mut this.ws).poll_flush(cx)) .map_err(|error| io::Error::other(error.to_string()))?; this.flushing = false; Poll::Re...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>import { execSync, spawn } from "child_process"; import path from "path"; import fs from "fs"; import { cac } from "cac"; import { ensureBinary, ensureDesktopBundle, BINARY_TAG, CACHE_DIR, DESKTOP_CACHE_DIR, LOCAL_DEV_MODE, LOCAL_DIST_DIR, R2_BASE_URL, getLatestVersion, } from "./downloa...
fim
BloopAI/vibe-kanban
typescript
<|fim_suffix|>launch Vibe Kanban from your Start menu.' ); return 0; } function launchWindowsApp(appExe: string): number { console.error('Launching Vibe Kanban...'); spawn(appExe, [], { detached: true, stdio: 'ignore' }).unref(); return 0; } export async function installAndLaunch( bundleInfo: DesktopBundl...
fim
BloopAI/vibe-kanban
typescript
<|fim_suffix|> .catch(reject); } if (res.statusCode !== 200) { return reject(new Error(`HTTP ${res.statusCode} fetching ${url}`)); } let data = ''; res.on('data', (chunk: string) => (data += chunk)); res.on('end', () => { try { resolve(JS...
fim
BloopAI/vibe-kanban
typescript
<|fim_suffix|> <RouterProvider router={router} /> </HotkeysProvider> </ClickedElementsProvider> </LocalAuthProvider> </UserSystemProvider> </AppNavigationProvider> </AppRuntimeProvider> ); } export default App; <|fim_prefix|>import { RouterProvider } from '@...
fim
BloopAI/vibe-kanban
typescript
<|fim_suffix|>og.init(import.meta.env.VITE_POSTHOG_API_KEY, { api_host: import.meta.env.VITE_POSTHOG_API_ENDPOINT, capture_pageview: false, capture_pageleave: true, capture_performance: true, autocapture: false, opt_out_capturing_by_default: true, }); } else { console.warn( 'PostHog API ...
fim
BloopAI/vibe-kanban
typescript
<|fim_prefix|>import { useEffect } from 'react'; import { isTauriApp } from '@/shared/lib/platform'; import { router } from '@web/app/router'; /** * Listens for `notification-clicked` events emitted by the macOS native * notification delegate when the user clicks an OS notification. * Navigates to the `deeplinkPath...
fim
BloopAI/vibe-kanban
typescript
<|fim_prefix|>import { useEffect } from 'react'; import { isTauriApp } from '@/shared/lib/platform'; import { useAppUpdateStore } from '@/shared/stores/useAppUpdateStore'; /** * Listens for the `update-installed` event emitted by the Tauri backend * after an update has been silently downloaded and applied. Sets the ...
fim
BloopAI/vibe-kanban
typescript
<|fim_prefix|>import { router } from '@web/app/router'; import type { FileRouteTypes } from '@web/routeTree.gen'; import { type AppDestination, type AppNavigation, type NavigationTransition, } from '@/shared/lib/routes/appNavigation'; type LocalRouteId = FileRouteTypes['id']; function getPathParam( routeParam...
fim
BloopAI/vibe-kanban
typescript
<|fim_prefix|>import { useEffect, useRef } from 'react'; import { useAuth } from '@/shared/h<|fim_suffix|>displayedNotificationIdsRef.current.add(group.id); } } initializedRef.current = true; return; } const activeGroupIds = new Set( groupedNotifications.map((group) => group.id)...
fim
BloopAI/vibe-kanban
typescript
<|fim_suffix|>.body, deeplinkPath: notification.deeplinkPath, }); } catch (error) { console.error( `Failed to show system notification for group ${notification.id}:`, error ); } } <|fim_prefix|>import { invoke } from '@tauri-apps/a<|fim_middle|>pi/core'; import { isTauriApp } from '@/s...
fim
BloopAI/vibe-kanban
typescript
<|fim_prefix|>import { useContext, useState, ReactNode, useEffect, useCallback } from 'react'; import { createHmrContext } from '@/shared/lib/hmrContext'; import type { OpenInEditorPayload, ComponentInfo, SelectedComponent, } from '@/shared/lib/previewBridge'; import type { Workspace } from 'shared/types'; import...
fim
BloopAI/vibe-kanban
typescript
<|fim_prefix|>import { ReactNode, useCallback, u<|fim_suffix|>g = useCallback(() => configApi.getConfig(null), []); const saveConfig = useCallback( (config: Parameters<typeof configApi.saveConfig>[0]) => configApi.saveConfig(config, null), [] ); const { value, userSystemInfo } = useUserSystemContro...
fim
BloopAI/vibe-kanban
typescript