mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-07 04:20:11 +08:00
965f4590ff
#### PR Dependency Tree * **PR #15426** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added workspace BYOK profiles with provider/model catalogs, capability validation, connection probing, credential rotation, reordering, and secure local leases. * Added Copilot route options, selectable targets, managed tiers, explicit profile/model overrides, and improved streaming with tool callbacks and abort support. * Added Copilot availability controls to prevent access when the feature is disabled. * **Changes** * Simplified Copilot configuration and removed legacy provider-specific settings. * Removed obsolete model, token-cost, transcript strategy, and provider metadata fields from public responses. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
51 lines
1.3 KiB
Rust
51 lines
1.3 KiB
Rust
#[napi_derive::napi(string_enum)]
|
|
#[derive(Clone, Copy, PartialEq, Eq)]
|
|
pub enum CopilotManagedTier {
|
|
Standard,
|
|
Premium,
|
|
}
|
|
|
|
#[derive(Clone)]
|
|
#[napi_derive::napi(object)]
|
|
pub struct CopilotAccessProjection {
|
|
pub route_allowed: bool,
|
|
pub managed_tier: CopilotManagedTier,
|
|
pub server_byok: bool,
|
|
pub local_byok: bool,
|
|
}
|
|
|
|
#[derive(Clone)]
|
|
#[napi_derive::napi(object)]
|
|
pub struct CopilotTargetOverrideInput {
|
|
pub profile_id: String,
|
|
pub model_id: String,
|
|
}
|
|
|
|
#[derive(Clone)]
|
|
#[napi_derive::napi(object)]
|
|
pub struct CopilotRouteCheckInput {
|
|
pub slot: String,
|
|
pub built_in_route_id: Option<String>,
|
|
pub workspace_id: Option<String>,
|
|
pub user_id: Option<String>,
|
|
pub local_lease_id: Option<String>,
|
|
pub access: CopilotAccessProjection,
|
|
pub managed_target_id: Option<String>,
|
|
pub target_override: Option<CopilotTargetOverrideInput>,
|
|
}
|
|
|
|
#[derive(Clone)]
|
|
#[napi_derive::napi(object)]
|
|
pub struct CopilotExecuteInput {
|
|
pub slot: String,
|
|
pub built_in_route_id: Option<String>,
|
|
pub workspace_id: Option<String>,
|
|
pub user_id: Option<String>,
|
|
pub local_lease_id: Option<String>,
|
|
pub access: CopilotAccessProjection,
|
|
pub managed_target_id: Option<String>,
|
|
pub target_override: Option<CopilotTargetOverrideInput>,
|
|
#[napi(ts_type = "unknown")]
|
|
pub request: serde_json::Value,
|
|
}
|