Files
llmx/llmx-rs/core/src/tasks/compact.rs
Sebastian Krüger a6c537ac50 Phase 2 Part 2: Fix Rust compilation errors after rename
Fixed all compilation errors resulting from the crate rename:

- Fixed FunctionCallOutputPayload::from() double reference issue in response_processing.rs:61
  - Removed unnecessary & as call_tool_result was already a reference
- Fixed spawn_task method call in llmx.rs by adding & reference to Arc<Session>
- Fixed Arc type inference by adding explicit type annotations
- Fixed tokio::join! type inference by separating future creation
- Updated all remaining crate::codex imports to crate::llmx across:
  - tools/orchestrator.rs
  - tools/handlers/shell.rs
  - apply_patch.rs
  - compact.rs
  - unified_exec/mod.rs
  - tools/context.rs
  - tools/sandboxing.rs
  - tools/events.rs

Successfully verified with cargo check --bin llmx (31.50s compile time).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 14:41:08 +01:00

33 lines
756 B
Rust

use std::sync::Arc;
use async_trait::async_trait;
use tokio_util::sync::CancellationToken;
use crate::llmx::TurnContext;
use crate::compact;
use crate::state::TaskKind;
use llmx_protocol::user_input::UserInput;
use super::SessionTask;
use super::SessionTaskContext;
#[derive(Clone, Copy, Default)]
pub(crate) struct CompactTask;
#[async_trait]
impl SessionTask for CompactTask {
fn kind(&self) -> TaskKind {
TaskKind::Compact
}
async fn run(
self: Arc<Self>,
session: Arc<SessionTaskContext>,
ctx: Arc<TurnContext>,
input: Vec<UserInput>,
_cancellation_token: CancellationToken,
) -> Option<String> {
compact::run_compact_task(session.clone_session(), ctx, input).await
}
}