chore: import upstream snapshot with attribution
FreeBSD Smoke / FreeBSD Smoke (x86_64) (push) Has been cancelled
CI / Quality Guardrails (push) Has been cancelled
CI / Build & Test (macos-latest) (push) Has been cancelled
CI / Build & Test (ubuntu-latest) (push) Has been cancelled
CI / Build & Test (windows-latest) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / PowerShell Syntax (push) Has been cancelled
CI / Windows Cross-Target Check (Linux) (push) Has been cancelled
FreeBSD Smoke / FreeBSD Smoke (x86_64) (push) Has been cancelled
CI / Quality Guardrails (push) Has been cancelled
CI / Build & Test (macos-latest) (push) Has been cancelled
CI / Build & Test (ubuntu-latest) (push) Has been cancelled
CI / Build & Test (windows-latest) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / PowerShell Syntax (push) Has been cancelled
CI / Windows Cross-Target Check (Linux) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "jcode-batch-types"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
jcode-message-types = { path = "../jcode-message-types" }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
@@ -0,0 +1,37 @@
|
||||
use jcode_message_types::ToolCall;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Progress update from a running batch tool call
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum BatchSubcallState {
|
||||
Running,
|
||||
Succeeded,
|
||||
Failed,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct BatchSubcallProgress {
|
||||
pub index: usize,
|
||||
pub tool_call: ToolCall,
|
||||
pub state: BatchSubcallState,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct BatchProgress {
|
||||
pub session_id: String,
|
||||
/// Parent tool_call_id of the batch call
|
||||
pub tool_call_id: String,
|
||||
/// Total number of sub-calls in this batch
|
||||
pub total: usize,
|
||||
/// Number of sub-calls that have completed (success or error)
|
||||
pub completed: usize,
|
||||
/// Name of the sub-call that just completed
|
||||
pub last_completed: Option<String>,
|
||||
/// Sub-calls that are currently still running
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub running: Vec<ToolCall>,
|
||||
/// Ordered per-subcall progress state for richer UI rendering
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub subcalls: Vec<BatchSubcallProgress>,
|
||||
}
|
||||
Reference in New Issue
Block a user