text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_prefix|>use axum::{ Json, <|fim_suffix|>sitory::new(state.pool()); let hosts = repo .list_accessible_hosts(ctx.user.id) .await .map_err(|error| { tracing::warn!(?error, "failed to list relay hosts"); ErrorResponse::new(StatusCode::INTERNAL_SERVER_ERROR, "Fai...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{Extension, Json, R<|fim_suffix|>h::RequestContext}; #[derive(Debug, Serialize, Deserialize)] struct IdentityResponse { pub user_id: Uuid, pub username: Option<String>, pub email: String, } pub(super) fn router() -> Router<AppState> { Router::new().route("/identity", get(get_id...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>ue_id).await?; let response = IssueAssigneeRepository::create( state.pool(), payload.id, payload.issue_id, payload.user_id, ) .await .map_err(|error| { tracing::error!(?error, "failed to create issue assignee"); db_error(error, "failed to cr...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ CreateIssueCommentReactionRequest, DeleteResponse, IssueComment, IssueCommentReaction, ListIssueCommentReactionsQuery, ListIssueCommentReactionsResponse, MutationResponse, NotificationPayload, NotificationType, UpdateIssueCommentReactionRequest, }; use axum::{ Json, ex...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ CreateIssueCommentRequest, DeleteResponse, IssueComment, ListIssueCommentsQuery, ListIssueCommentsResponse, MemberRole, MutationResponse, NotificationPayload, NotificationType, UpdateIssueCommentRequest, }; use axum::{ Json, extract::{Extension, Path, Query, State}, ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ CreateIssueFollowerRequest, DeleteResponse, IssueFollower, ListIssueFollowersQuery, ListIssueFollowersResponse, MutationResponse, }; use axum::{ Json, extract::{Extension, Path, Query, State}, http::StatusCode, }; use tracing::instrument; use uuid::Uuid; use super::{ ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ CreateIssueRelationshipRequest, DeleteResponse, IssueRelationship, ListIssueRelationshipsQuery, ListIssueRelationshipsResponse, MutationResponse, }; use axum::{ Json, extract::{Extension, Path, Query, State}, http::StatusCode, }; use tracing::instrument; use uuid::Uuid...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>| { tracing::error!(?error, %issue_tag_id, "failed to load issue tag"); ErrorResponse::new( StatusCode::INTERNAL_SERVER_ERROR, "failed to load issue tag", ) })? .ok_or_else(|| ErrorResponse::new(StatusCode::NOT_FOUND, "iss...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>Context>, Path(issue_id): Path<Uuid>, Json(payload): Json<UpdateIssueRequest>, ) -> Result<Json<MutationResponse<Issue>>, ErrorResponse> { let issue = IssueRepository::find_by_id(state.pool(), issue_id) .await .map_err(|error| { tracing::error!(?error, %issue_id, "f...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>ion().definition(), issues::mutation().definition(), issue_assignees::mutation().definition(), issue_followers::mutation().definition(), issue_tags::mutation().definition(), issue_relationships::mutation().definition(), issue_comments::mutation().definition(...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>otification_id, user_id = %ctx.user.id) )] async fn update_notification( State(state): State<AppState>, Extension(ctx): Extension<RequestContext>, Path(notification_id): Path<Uuid>, Json(payload): Json<UpdateNotificationRequest>, ) -> Result<Json<MutationResponse<Notification>>, ErrorRespo...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>:Borrowed("not_authorized")), OAuthHandoffError::AlreadyRedeemed => { (StatusCode::GONE, Cow::Borrowed("already_redeemed")) } OAuthHandoffError::NotFound => (StatusCode::NOT_FOUND, Cow::Borrowed("not_found")), OAuthHandoffError::Database(_) =...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ ListMembersResponse, MemberRole, OrganizationMemberWithProfile, RevokeInvitationRequest, UpdateMemberRoleRequest, UpdateMemberRoleResponse, }; use axum::{ Json, Router, extract::{Path, State}, http::StatusCode, response::IntoResponse, routing::{delete, get, pat...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ CreateOrganizationRequest, CreateOrganizationResponse, GetOrganizationResponse, ListOrganizationsResponse, MemberRole, UpdateOrganizationRequest, }; use axum::{ Json, Router, extract::{Path, State}, http::StatusCode, response::IntoResponse, routing::{delete, ge...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> )); } // Update the status within the transaction let updated = sqlx::query_as!( ProjectStatus, r#" UPDATE project_statuses SET name = COALESCE($1, name), color = COALESCE($2, color), ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ BulkUpdateProjectsRequest, BulkUpdateProjectsResponse, CreateProjectRequest, DeleteResponse, ListProjectsQuery, ListProjectsResponse, MutationResponse, Project, UpdateProjectRequest, }; use axum::{ Json, extract::{Extension, Path, Query, State}, http::StatusCode, r...
fim
BloopAI/vibe-kanban
rust
use api_types::{ CreatePullRequestIssueRequest, DeleteResponse, ListPullRequestIssuesResponse, MutationResponse, PullRequestIssue, }; use axum::{ Json, extract::{Extension, Path, Query, State}, http::StatusCode, }; use tracing::instrument; use uuid::Uuid; use super::{ error::{ErrorResponse, db_...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ ListPullRequestsQuery, ListPullRequestsResponse, MutationResponse, PullRequest, PullRequestStatus, UpsertPullRequestRequest, }; use axum::{ Json, Router, extract::{Extension, Query, State}, http::StatusCode, routing::get, }; use chrono::{DateTime, Utc}; use serde::...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::net::IpAddr; use axum::{ Json, Router, body::Body, extract::{Path, State}, http::{HeaderMap, StatusCode}, response::{IntoResponse, Response}, routing::{get, post}, }; use chrono::{DateTime, Duration, Utc}; use serde::{Deserialize, Serialize}; use uuid::Uuid; use crate::{...
fim
BloopAI/vibe-kanban
rust
use api_types::{ CreateTagRequest, DeleteResponse, ListTagsQuery, ListTagsResponse, MutationResponse, Tag, UpdateTagRequest, }; use axum::{ Json, extract::{Extension, Path, Query, State}, http::StatusCode, }; use tracing::instrument; use uuid::Uuid; use super::{ error::{ErrorResponse, db_error}...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{TokenRefreshRequest, TokenRefreshResponse}; use axum::{ Json, Router, extract::State, http::StatusCode, response::{IntoResponse, Response}, routing::post, }; use tracing::{info, warn}; use crate::{ AppState, audit::{self, AuditAction, AuditEvent}, auth::{Jw...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{DeleteWorkspaceRequest, UpdateWorkspaceRequest, Workspace}; use axum::{ Json, Router, extract::{Extension, Path, State}, http::StatusCode, routing::{delete, get, head, post}, }; use serde::Deserialize; use tracing::instrument; use uuid::Uuid; use super::{ error::{Error...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>//! Shape infrastructure: struct, trait, and macro. use std::marker::PhantomData; use ts_rs::TS; #[derive(Debug)] pub struct ShapeDefinition<T: TS> { pub name: &'static str, pub table: &'static str, pub where_clause: &'static str, pub params: &'static [&'static str], pub url: &'stat...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>//! Unified registration for Electric proxy + REST fallback routes. //! //! Each shape has exactly one proxy handler (GET on its URL) and a required //! REST fallback route. `ShapeRoute::new` pairs the shape with its //! authorization scope and fallback, then registers both routes in one call. //! //! # E...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>//! All shape route declarations with authorization scope and REST fallback. use api_types::{ ListIssueAssigneesResponse, ListIssueCommentReactionsResponse, ListIssueCommentsResponse, ListIssueFollowersResponse, ListIssueRelationshipsResponse, ListIssueTagsResponse, ListIssuesResponse, ListPr...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>onst PROJECT_PULL_REQUESTS_SHAPE: ShapeDefinition<PullRequest> = crate::define_shape!( name: "PROJECT_PULL_REQUESTS_SHAPE", table: "pull_requests", where_clause: r#""project_id" = $1"#, url: "/shape/project/{project_id}/pull_requests", params: ["project_id"], ); pub const PROJECT_PULL...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>// SharedKey authorization policy for connecting to Azurite (local Azure Storage emulator). // Only used for local development — production uses Entra ID. // Based on: https://github.com/Azure/azure-sdk-for-rust/issues/2975#issuecomment-3538764202 use std::{borrow::Cow, sync::Arc}; use async_trait::asyn...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>ver_public_base_url, http_client, handoff, oauth_token_validator, r2, azure_blob, github_app, billing, analytics, } } pub fn pool(&self) -> &PgPool { &self.pool } pub fn config...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::sync::OnceLock; /// Runtime information about configured remote endpoints. #[derive(Clone)] pub struct RemoteInfo { api_base: OnceLock<String>, relay_api_base: OnceLock<String>, } impl Default for RemoteInfo { fn default() -> Self { Self::new() } } impl RemoteInfo { ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>rror(format!("{status}: {body}"))); } Ok(()) } /// Poll the review status pub(crate) async fn poll_status(&self, review_id: &str) -> Result<StatusResponse, ReviewError> { let url = format!("{}/v1/review/{}/status", self.base_url, review_id); debug!("GET {url}"...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{fs::File, path::Path}; use flate2::{Compression, write::GzEncoder}; use tar::Builder; use tracing::debug; use crate::error::ReviewError; /// Create a tar.gz archive from a directory pub(crate) fn create_tarball(source_dir: &Path) -> Result<Vec<u8>, ReviewError> { debug!("Creating tarball ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> text blocks let text_blocks: Vec<serde_json::Value> = content_array .iter() .filter(|block| block.get("type").and_then(|t| t.as_str()) == Some("text")) .cloned() .collect(); // Skip if no text...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::path::PathBuf; use serde::{Deserialize, Serialize}; #[derive(Debug, Default<|fim_suffix|>.toml) fn config_path() -> Option<PathBuf> { dirs::config_dir().map(|p| p.join("vibe-kanban").join("review.toml")) } /// Load config from disk, returning default if file doesn't exist ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>R information: {0}")] PrInfoFailed(String), #[error("Failed to clone repository: {0}")] CloneFailed(String), #[error("Failed to checkout PR: {0}")] CheckoutFailed(String), #[error("Failed to create archive: {0}")] ArchiveFailed(String), #[error("API request failed: {0}"...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{path::Path, process::Command}; use serde::Deserialize; use tracing::debug; use utils::command_ext::NoWindowExt; use crate::error::ReviewError; /// Information about a pull request #[derive(Debug)] pub(crate) struct PrInfo { pub(crate) owner: String, pub(crate) repo: String, pub(cr...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>r.finish_with_message(format!("Review ID: {}", init_response.review_id)); // 9. Upload archive let spinner = create_spinner("Uploading archive..."); client.upload(&init_response.upload_url, payload).await?; spinner.finish_with_message("Upload complete"); // 10. Start review let s...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{path::PathBuf, time::SystemTime}; use dialoguer::{Select, theme::ColorfulTheme}; use tracing::debug; use crate::{ claude_session::{ ClaudeProject, discover_projects, discover_sessions, find_projects_by_branch, }, error::ReviewError, }; /// Result of session selection proce...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>dist_path = Path::new("../../packages/local-web/dist"); if !dist_path.exists() { println!("cargo:warning=Creating dummy packages/local-web/dist directory for compilation"); fs::create_dir_all(dist_path).unwrap(); // Create a dummy index.html let dummy_html = r#"<!DOCTY...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> serde_json::to_string(DEFAULT_PR_DESCRIPTION_PROMPT).unwrap(), serde_json::to_string(DEFAULT_COMMIT_REMINDER_PROMPT).unwrap() ); format!("{HEADER}\n\n{body}\n\n{constants}") } fn generate_json_schema<T: JsonSchema>() -> Result<String, serde_json::Error> { // Draft-07, inline everyt...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>rorInfo::with_status( StatusCode::INTERNAL_SERVER_ERROR, "WorktreeError", format!("Worktree operation failed: {}", err), ), ApiError::Config(_) => ErrorInfo::internal("ConfigError"), ApiError::Io(_) => ErrorInfo::internal(...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>pub mod error; pub mod middleware; pub mod relay_pairing; pub mod routes; pub mod runtime; pub mod startup; // #[cfg(feature = "cloud")] // type DeploymentImpl = vibe_kanban_cloud::deploym<|fim_suffix|>Deployment; // #[cfg(not(feature = "cloud"))] pub type DeploymentImpl = local_deployment::LocalDeployme...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use anyhow::{self, Error as AnyhowError}; use axum::Router; use deployment::{Deployment, DeploymentError}; use server::{ DeploymentImpl, middleware::origin::validate_origin, routes, runtime::relay_registration, }; use services::services::container::ContainerService; use sqlx::Error as SqlxError; use s...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>().unwrap_or("<unmatched>"), status = %response.status(), "API request returned server error" ); } response } <|fim_prefix|>use axum::{ extract::{MatchedPath, OriginalUri, Request}, middleware:<|fim_middle|>:Next, response::Response, }; pub async fn lo...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>pub mod error_logging; pub mod model_loaders; pub mod origin; pub mod relay_request_signature; pub mod signed_ws; pub use error<|fim_suffix|>aders::*; pub use origin::*; pub use relay_request_signature::*; <|fim_middle|>_logging::*; pub use model_lo<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>e with the next middleware/handler Ok(next.run(request).await) } pub async fn load_session_middleware( State(deployment): State<DeploymentImpl>, Path(session_id): Path<Uuid>, mut request: Request, next: Next, ) -> Result<Response, StatusCode> { let session = match Session::find_by...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>e allowed let mut req = make_request(Some("http://127.0.0.1:3000"), Some("[::1]:3000")); assert!(validate_origin(&mut req).is_ok()); } #[test] fn default_ports_handled_correctly() { assert_eq!( OriginKey::from_origin("http://example.com").unwrap().port, ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>); let path_and_query = if filtered.is_empty() { path } else { format!("{path}?{filtered}") }; Ok(Some(( RequestSignature { signing_session_id, timestamp, nonce, signature_b64, }, path_and_query, )...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> match signed_axum_websocket(&ctx.signing, &ctx.request_signature, socket).await { Ok(signed) => WebSocketInner::Signed(Box::new(signed)), Err(e) => { tracing::warn!( sessio...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>server::{RelayPairingEvents, RelayPairingServer}, }; pub fn build_relay_pairing_server(deployment: &DeploymentImpl) -> RelayPairingServer { RelayPairingServer::new( deployment.trusted_key_auth().clone(), deployment.relay_signing().clone(), RelayPairingEvents::new( ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>uth:spake2-start:global", SPAKE2_START_GLOBAL_LIMIT, RATE_LIMIT_WINDOW, ) .await .map_err(ApiError::from)?; let spake2_start = start_spake2_enrollment(&payload.enrollment_code, &payload.client_message_b64)?; ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ Router, extract::{State, ws::Message}, http::StatusCode, response::{IntoResponse, Json as ResponseJson}, routing::{get, post}, }; use deployment::Deployment; use futures_util::StreamExt; use utils::{ approvals::{ApprovalOutcome, ApprovalResponse}, log_msg::LogMsg, ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> let (content_type, disposition) = content_type_and_disposition_for_attachment("image/png"); assert_eq!(content_type, "image/png"); assert_eq!(disposition, None); } #[test] fn forces_html_to_download() { let (content_type, disposition) = content_type_and_disposition_...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::collections::HashMap; use api_types::LoginStatus; use axum::{ Json, Router, body::Body, extract::{Path, Query, State, ws::Message}, http, response::{IntoResponse, Json as ResponseJson, Response}, routing::{get, put}, }; use deployment::{Deployment, DeploymentError}; use e...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>he extension. .route("/containers/info", get(get_container_info)) .route("/containers/attempt-context", get(get_context)) } <|fim_prefix|>use axum::{ Router, extract::{Query, State}, response::Json as ResponseJson, routing::get, }; use db::models::{ requests::ContainerQ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ BoxError, Router, extract::State, response::{ Sse, sse::{Event, KeepAlive}, }, routing::get, }; use deployment::Deployment; use futures_util::TryStreamExt; use crate::DeploymentImpl; async fn events( State(deployment): State<DeploymentImpl>, ) -> Resul...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use anyhow; use axum::{ Extension, Router, extract::{Path, Query, State, ws::Message}, middleware::from_fn_with_state, response::{IntoResponse, Json as ResponseJson}, routing::{get, post}, }; use db::models::{ execution_process::{ExecutionProcess, ExecutionProcessStatus}, execu...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ Router, extract::{Query, State}, response::Json as ResponseJson, routing::get, }; use deployment::Deployment; use serde::Deserialize; use services::services::filesystem::{DirectoryEntry, DirectoryListResponse, FilesystemError}; use utils::response::ApiResponse; use crate::{Dep...
fim
BloopAI/vibe-kanban
rust
use axum::{ body::Body, http::HeaderValue, response::{IntoResponse, Response}, }; use reqwest::{StatusCode, header}; use rust_embed::RustEmbed; #[derive(RustEmbed)] #[folder = "../../packages/local-web/dist"] struct Assets; pub(super) async fn serve_frontend(uri: axum::extract::Path<String>) -> impl IntoR...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|><|fim_suffix|> Json<ApiResponse<String>> { Json(ApiResponse::success("OK".to_string())) } <|fim_middle|>use axum::response::Json; use utils::response::ApiResponse; pub(super) async fn health_check() -><|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> .layer(axum::middleware::from_fn_with_state( deployment.clone(), middleware::require_relay_request_signature, )), ) } <|fim_prefix|>use axum::Router; use crate::{DeploymentImpl, middleware}; mod open_remote_editor; mod proxy; pub use open_remote_edi...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>("Failed to parse editor path response: {e}")))?; let workspace_path = payload .into_data() .ok_or_else(|| ApiError::BadGateway("Editor path response missing workspace path".into()))? .workspace_path; // Create SSH tunnel. let local_port = relay_host.get_or_create_ssh...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> builder = builder.header(name, value); } } builder .body(Body::from_stream(response.body)) .unwrap_or_else(|_| { ( StatusCode::INTERNAL_SERVER_ERROR, "Failed to build relay proxy response", ) ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ Router, routing::{IntoMakeService, get}, }; use tower_http::{compression::CompressionLayer, validate_request::ValidateRequestHeaderLayer}; use crate::{DeploymentImpl, middleware}; pub mod approvals; pub mod config; pub mod containers; pub mod filesystem; // pub mod github; pub mod at...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ AuthMethodsResponse, HandoffInitRequest, HandoffRedeemRequest, LocalLoginRequest, ProfileResponse, StatusResponse, }; use axum::{ Router, extract::{Json, Query, State}, http::{Response, StatusCode}, response::Json as ResponseJson, routing::{get, post}, }; use c...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>), ) .route("/organizations/{org_id}/invitations", get(list_invitations)) .route( "/organizations/{org_id}/invitations/revoke", post(revoke_invitation), ) .route("/invitations/{token}", get(get_invitation)) .route("/invitations/{token...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ Router, extract::{Path, Request, State, ws::rejection::WebSocketUpgradeRejection}, http::StatusCode, response::{IntoResponse, Response}, routing::any, }; use deployment::Deployment; use ws_bridge::{bridge_axum_ws, connect_upstream_ws}; use crate::{DeploymentImpl, middlewar...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>/pair", post(pair_relay_host)) .route("/relay-auth/client/hosts", get(list_relay_paired_hosts)) .route( "/relay-auth/client/hosts/{host_id}", delete(remove_relay_paired_host), ) } pub async fn pair_relay_host( State(deployment): State<DeploymentImpl>, ...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::Router; use crate::De<|fim_suffix|>)) } <|fim_middle|>ploymentImpl; pub mod client; pub mod server; pub fn router() -> Router<DeploymentImpl> { Router::new() .merge(server::router()) .merge(client::router(<|endoftext|>
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ Json, Router, extract::{Json as ExtractJson, Path, State}, http::HeaderMap, routing::{delete, get, post}, }; use relay_types::{ FinishSpake2EnrollmentRequest, FinishSpake2EnrollmentResponse, ListRelayPairedClientsResponse, RefreshRelaySigningSessionRequest, RefreshRelay...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::{ sync::OnceLock, time::{Duration, Instant}, }; use axum::{Router, response::Json as ResponseJson, routing::get}; use reqwest::Client; use serde::{Deserialize, Serialize}; use tokio::sync::RwLock; use crate::DeploymentImpl; const CACHE_TTL: Duration = Duration::from_secs(15 * 60); cons...
fim
BloopAI/vibe-kanban
rust
use api_types::{ CreateIssueAssigneeRequest, IssueAssignee, ListIssueAssigneesResponse, MutationResponse, }; use axum::{ Router, extract::{Json, Path, Query, State}, response::Json as ResponseJson, routing::get, }; use serde::Deserialize; use utils::response::ApiResponse; use uuid::Uuid; use crate:...
fim
BloopAI/vibe-kanban
rust
use api_types::{ CreateIssueRelationshipRequest, IssueRelationship, ListIssueRelationshipsQuery, ListIssueRelationshipsResponse, MutationResponse, }; use axum::{ Router, extract::{Json, Path, Query, State}, response::Json as ResponseJson, routing::get, }; use utils::response::ApiResponse; use uu...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>Response>>, ApiError> { let client = deployment.remote_client()?; let response = client.list_issue_tags(query.issue_id).await?; Ok(ResponseJson(ApiResponse::success(response))) } async fn get_issue_tag( State(deployment): State<DeploymentImpl>, Path(issue_tag_id): Path<Uuid>, ) -> Res...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>Impl>, Json(request): Json<CreateIssueRequest>, ) -> Result<ResponseJson<ApiResponse<MutationResponse<Issue>>>, ApiError> { let client = deployment.remote_client()?; let response = client.create_issue(&request).await?; Ok(ResponseJson(ApiResponse::success(response))) } async fn update_iss...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::Router; use crate::DeploymentImpl; mod issue_assignees; mod issue_relationships; mod issue_tags; mod issues; mod project_statuses; mod projects; pub mod pull_requests; mod tags; mod workspaces; pub fn router() -> Router<DeploymentImpl> { Router::new() .merge(issue_assignees::route...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::ListProjectStatusesResponse; use axum::{ Router, extract::{Query, State}, response::Json as ResponseJson, routing::get, }; use serde::Deserialize; use utils::response::ApiResponse; use uuid::Uuid; use crate::{DeploymentImpl, error::ApiError}; #[derive(Debug, Deserialize)] ...
fim
BloopAI/vibe-kanban
rust
use api_types::{ListProjectsResponse, Project}; use axum::{ Router, extract::{Path, Query, State}, response::Json as ResponseJson, routing::get, }; use serde::Deserialize; use utils::response::ApiResponse; use uuid::Uuid; use crate::{DeploymentImpl, error::ApiError}; #[derive(Debug, Deserialize)] pub(...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ListPullRequestsQuery, ListPullRequestsResponse}; use axum::{ Json, Router, extract::{Query, State}, <|fim_suffix|>ialize}; use ts_rs::TS; use utils::response::ApiResponse; use crate::{DeploymentImpl, error::ApiError}; pub fn router() -> Router<DeploymentImpl> { Router::n...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{ListTagsResponse, <|fim_suffix|>ResponseJson<ApiResponse<Tag>>, ApiError> { let client = deployment.remote_client()?; let response = client.get_tag(tag_id).await?; Ok(ResponseJson(ApiResponse::success(response))) } <|fim_middle|>Tag}; use axum::{ Router, extract::{Path,...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::Workspace; use axum::<|fim_suffix|>ub(super) fn router() -> Router<DeploymentImpl> { Router::new().route( "/workspaces/by-local-id/{local_workspace_id}", get(get_workspace_by_local_id), ) } async fn get_workspace_by_local_id( State(deployment): State<DeploymentI...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>"Failed to create git host service: {}", e); return Ok(ResponseJson(ApiResponse::error(&e.to_string()))); } }; match git_host.list_open_prs(&repo.path, &remote.url).await { Ok(prs) => Ok(ResponseJson(ApiResponse::success(prs))), Err(GitHostError::CliNotInstalle...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ Json, Router, extract::{Path, State, ws::Message}, response::{IntoResponse, Json as ResponseJson}, routing::get, }; use db::models::scratch::{CreateScratch, Scratch, ScratchType, UpdateScratch}; use deployment::Deployment; use futures_util::{StreamExt, TryStreamExt}; use serde:...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use axum::{ Router, extract::{Query, State}, response::Json as ResponseJson, routing::get, }; use db::models::repo::{Repo, SearchResult}; use deployment::Deployment; use serde::Deserialize; use services::services::file_search::{SearchMode, SearchQuery}; use utils::response::ApiResponse; us...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>pub mod queue; pub mod review; use axum::{ Extension, Json, Router, extract::{Query, State}, middleware::from_fn_with_state, response::Json as ResponseJson, routing::{get, post}, }; use db::models::{ coding_agent_turn::CodingAgentTurn, execution_process::{ExecutionProcess, Exe...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>e_id": session.workspace_id.to_string(), }), ) .await; Ok(ResponseJson(ApiResponse::success(QueueStatus::Empty))) } /// Get the current queue status for a session's workspace async fn get_queue_status( Extension(session): Extension<Session>, State(deployment): Sta...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::path::PathBuf; use axum::{Extension, Json, extract::State, response::Json as ResponseJson}; use db::models::{ coding_agent_turn::CodingAgentTurn, execution_process::{ExecutionProcess, ExecutionProcessRunReason}, session::Session, workspace::{Workspace, WorkspaceError}, worksp...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>ove { let stream = ws_bridge::axum_ws_stream_io(socket); if let Err(error) = embedded_ssh::run_ssh_session(stream, ssh_config, relay_signing).await { tracing::warn!(?error, "SSH session failed"); } }) } <|fim_prefix|>use axum::{extract::State, response::IntoResponse...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>() .route("/", get(get_tags).post(create_tag)) .nest("/{tag_id}", tag_router); Router::new().nest("/tags", inner) } <|fim_prefix|>use axum::{ Extension, Json, Router, extract::{Query, State}, middleware::from_fn_with_state, response::Json as ResponseJson, routing::...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use std::path::PathBuf; use axum::{ Router, extract::{Query, State, ws::Message}, response::IntoResponse, routing::get, }; use base64::{Engine, engine::general_purpose::STANDARD as BASE64}; use db::models::{workspace::Workspace, workspace_repo::WorkspaceRepo}; use deployment::Deployment; ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>t( "Local server address is not available".to_string(), )); }; webrtc_host.add_ice_candidate(candidate).await?; Ok(StatusCode::NO_CONTENT) } <|fim_prefix|>use axum::{ Json, Router, extract::State, http::StatusCode, response::Json as ResponseJson, routing::post, }; use ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>uct AssociateWorkspaceAttachmentsRequest { pub attachment_ids: Vec<Uuid>, } #[derive(Debug, Deserialize, Serialize, TS)] pub struct ImportIssueAttachmentsRequest { pub issue_id: Uuid, } #[derive(Debug, Serialize, TS)] pub struct ImportIssueAttachmentsResponse { pub attachment_ids: Vec<Uuid>,...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>ession = match Session::find_latest_by_workspace_id(&deployment.db().pool, workspace.id).await? { Some(s) => s, None => { // Create a new session for setup scripts Session::create( &deployment.db().pool, ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>tatusCode::ACCEPTED, ResponseJson(ApiResponse::success(())))) } #[axum::debug_handler] pub async fn mark_seen( Extension(workspace): Extension<Workspace>, State(deployment): State<DeploymentImpl>, ) -> Result<ResponseJson<ApiResponse<()>>, ApiError> { let pool = &deployment.db().pool; Cod...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|> if let Err(e) = managed_workspace.associate_attachments(&imported_ids).await { tracing::warn!("Failed to associate imported files with workspace: {}", e); } workspace_prompt = rewrite_imported_issue_attachments_markdown( &workspace...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use db::models::{ execution_process::{ExecutionProcess, ExecutionProcessRunReason}, session::{CreateSession, Session}, workspace::<|fim_suffix|>port PATH="$HOME/.local/bin:$PATH"' >> {config_file_str} "# )); } let install_request = ScriptRequest { ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>unReason::CleanupScript, ) .await?; deployment .track_if_analytics_allowed( "cleanup_script_executed", serde_json::json!({ "workspace_id": workspace.id.to_string(), }), ) .await; Ok(ResponseJson(ApiRespon...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use db::models::{ execution_process::{ExecutionProcess, ExecutionProcessRunReason}, session::{CreateSession, Session}, workspace::Workspace, }; use deployment::Deployment; use executors::actions::ExecutorAction; #[cfg(unix)] use executors::{ actions::{ ExecutorActionType, s...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>turn Ok(ResponseJson(ApiResponse::error_with_data( RenameBranchError::OpenPullRequest, ))); } let repos = WorkspaceRepo::find_repos_for_workspace(pool, workspace.id).await?; let container_ref = deployment .container() .ensure_container_exists(&workspace) ...
fim
BloopAI/vibe-kanban
rust
<|fim_suffix|>workspace): Extension<Workspace>, State(deployment): State<DeploymentImpl>, Query(query): Query<OpenEditorPathQuery>, ) -> Result<ResponseJson<ApiResponse<OpenEditorPathResponse>>, ApiError> { let path = resolve_workspace_editor_path(&deployment, &workspace, query.file_path.as_deref())...
fim
BloopAI/vibe-kanban
rust
<|fim_prefix|>use api_types::{CreateWorkspaceRequest, PullRequestStatus, UpsertPullRequestRequest}; use axum::{ Extension, Json, Router, extract::{Path as AxumPath, State}, middleware::from_fn_with_state, response::Json as ResponseJson, routing::{delete, post}, }; use db::models::{merge::MergeStatus...
fim
BloopAI/vibe-kanban
rust