Merge branch 'orchestration' into develop

# Conflicts:
#	web/workspace/deno.json
This commit is contained in:
2026-08-14 14:49:01 +09:00
81 changed files with 3997 additions and 6039 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ session-store = { workspace = true }
fs4 = { workspace = true }
ticket = { workspace = true }
serde = { workspace = true, features = ["derive"] }
minijinja = "2.19.0"
worker = { path = "../worker" }
pulldown-cmark = { version = "0.13.3", default-features = false }
llm-engine.workspace = true
+4 -11
View File
@@ -69,8 +69,7 @@ use render::{PanelListRow, row_hit_boxes};
const MAX_ENTRIES: usize = 50;
const CLOSED_VISIBLE_ROWS: usize = 3;
const ORCHESTRATOR_IDLE_QUEUE_NOTICE_TEMPLATE: &str =
include_str!("../../../../resources/prompts/panel/orchestrator_idle_queue_notice.md");
const ORCHESTRATOR_IDLE_QUEUE_NOTICE_PROMPT: &str = "panel.orchestrator_idle_queue_notice";
const ORCHESTRATOR_QUEUE_ATTENTION_MAX_TICKETS: usize = 6;
const ORCHESTRATOR_QUEUE_ATTENTION_MAX_TEXT_CHARS: usize = 120;
const ORCHESTRATOR_QUEUE_ATTENTION_MAX_MESSAGE_CHARS: usize = 2_400;
@@ -3791,15 +3790,9 @@ fn orchestrator_queue_template_ticket(
fn render_orchestrator_queue_attention_template(
context: &OrchestratorQueueTemplateContext,
) -> Result<String, minijinja::Error> {
let mut env = minijinja::Environment::new();
env.set_undefined_behavior(minijinja::UndefinedBehavior::Strict);
env.add_template(
"orchestrator_idle_queue_notice",
ORCHESTRATOR_IDLE_QUEUE_NOTICE_TEMPLATE,
)?;
env.get_template("orchestrator_idle_queue_notice")?
.render(context)
) -> Result<String, worker::CatalogError> {
worker::PromptCatalog::builtins_only()?
.render_serializable(ORCHESTRATOR_IDLE_QUEUE_NOTICE_PROMPT, context)
}
fn orchestrator_work_set_detail(
+12 -52
View File
@@ -1,7 +1,7 @@
//! Inline-viewport "spawn Worker and attach" UX.
//!
//! Rendered at the user's current cursor position when `yoi` is invoked
//! with no positional argument. Discovers `.yoi/profiles.toml` profile
//! with no positional argument. Uses user-configured and bundled Profile
//! choices plus bundled profiles, defaults to the builtin profile, prompts for
//! the Worker's name, and on confirmation launches the Worker runtime command as an
//! independent process. Once the process reports its socket via the
@@ -654,68 +654,28 @@ mod tests {
}
#[test]
fn profile_choices_use_project_registry_default() {
fn profile_choices_ignore_repository_local_profile_registry() {
let temp = tempfile::tempdir().unwrap();
let project = temp.path().join("project");
let yoi = project.join(".yoi");
std::fs::create_dir_all(&yoi).unwrap();
std::fs::write(
yoi.join("profiles.toml"),
r#"
default = "coder"
[profile]
coder = "profiles/coder.toml"
"#,
"default = \"coder\"\n[profile]\ncoder = \"profiles/coder.toml\"\n",
)
.unwrap();
let (choices, default_index) = profile_choices_for_cwd(&project);
let default_choice = choices
.iter()
.position(|choice| choice.selector.as_deref() == Some("project:coder"))
.expect("project default choice is present");
assert_eq!(default_index, default_choice);
let selected = &choices[default_index];
assert_eq!(selected.selector.as_deref(), Some("project:coder"));
assert_eq!(selected.label, "project:coder (default)");
assert!(selected.is_default);
}
#[test]
fn profile_choices_include_builtin_and_project_default_marker() {
let temp = tempfile::tempdir().unwrap();
let project = temp.path().join("project");
let yoi = project.join(".yoi");
std::fs::create_dir_all(&yoi).unwrap();
std::fs::write(
yoi.join("profiles.toml"),
r#"
default = "coder"
[profile.coder]
path = "profiles/coder.toml"
description = "Project coder"
"#,
)
.unwrap();
let (choices, default_index) = profile_choices_for_cwd(&project);
assert_eq!(choices[0].selector.as_deref(), Some("builtin:companion"));
assert_eq!(
choices[0].label,
"builtin:companion — Bundled Companion role profile"
assert_eq!(default_index, 0);
assert!(
choices
.iter()
.all(|choice| { choice.selector.as_deref() != Some("project:coder") })
);
let project_index = choices
.iter()
.position(|choice| choice.selector.as_deref() == Some("project:coder"))
.expect("project default choice is present");
assert_eq!(default_index, project_index);
assert_eq!(
choices[project_index].selector.as_deref(),
Some("project:coder")
);
assert_eq!(
choices[project_index].label,
"project:coder (default) — Project coder"
assert!(
choices
.iter()
.any(|choice| { choice.selector.as_deref() == Some("builtin:companion") })
);
}