Rename agent/ to user/ and poc-agent binary to consciousness
Mechanical rename: src/agent/ -> src/user/, all crate::agent:: -> crate::user:: references updated. Binary poc-agent renamed to consciousness with CLI name and user-facing strings updated. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
beb49ec477
commit
14dd8d22af
31 changed files with 1857 additions and 1468 deletions
|
|
@ -466,7 +466,7 @@ pub struct ResolvedModel {
|
|||
|
||||
impl AppConfig {
|
||||
/// Resolve the active backend and assemble prompts into a SessionConfig.
|
||||
pub fn resolve(&self, cli: &crate::agent::cli::CliArgs) -> Result<SessionConfig> {
|
||||
pub fn resolve(&self, cli: &crate::user::cli::CliArgs) -> Result<SessionConfig> {
|
||||
let cwd = std::env::current_dir().context("Failed to get current directory")?;
|
||||
|
||||
let (api_base, api_key, model, prompt_file);
|
||||
|
|
@ -500,8 +500,8 @@ impl AppConfig {
|
|||
.with_context(|| format!("Failed to read {}", path.display()))?;
|
||||
(content, Vec::new(), 0, 0)
|
||||
} else {
|
||||
let system_prompt = crate::agent::identity::assemble_system_prompt();
|
||||
let (context_parts, cc, mc) = crate::agent::identity::assemble_context_message(&cwd, &prompt_file, self.memory_project.as_deref(), &context_groups)?;
|
||||
let system_prompt = crate::user::identity::assemble_system_prompt();
|
||||
let (context_parts, cc, mc) = crate::user::identity::assemble_context_message(&cwd, &prompt_file, self.memory_project.as_deref(), &context_groups)?;
|
||||
(system_prompt, context_parts, cc, mc)
|
||||
};
|
||||
|
||||
|
|
@ -609,7 +609,7 @@ macro_rules! merge_opt {
|
|||
};
|
||||
}
|
||||
|
||||
fn build_figment(cli: &crate::agent::cli::CliArgs) -> Figment {
|
||||
fn build_figment(cli: &crate::user::cli::CliArgs) -> Figment {
|
||||
let mut f = Figment::from(Serialized::defaults(AppConfig::default()))
|
||||
.merge(Json5File(config_path()));
|
||||
|
||||
|
|
@ -628,14 +628,14 @@ fn build_figment(cli: &crate::agent::cli::CliArgs) -> Figment {
|
|||
}
|
||||
|
||||
/// Load just the AppConfig — no validation, no prompt assembly.
|
||||
pub fn load_app(cli: &crate::agent::cli::CliArgs) -> Result<(AppConfig, Figment)> {
|
||||
pub fn load_app(cli: &crate::user::cli::CliArgs) -> Result<(AppConfig, Figment)> {
|
||||
let figment = build_figment(cli);
|
||||
let app: AppConfig = figment.extract().context("Failed to load configuration")?;
|
||||
Ok((app, figment))
|
||||
}
|
||||
|
||||
/// Load the full config: figment → AppConfig → resolve backend → assemble prompts.
|
||||
pub fn load_session(cli: &crate::agent::cli::CliArgs) -> Result<(SessionConfig, Figment)> {
|
||||
pub fn load_session(cli: &crate::user::cli::CliArgs) -> Result<(SessionConfig, Figment)> {
|
||||
let (app, figment) = load_app(cli)?;
|
||||
let config = app.resolve(cli)?;
|
||||
Ok((config, figment))
|
||||
|
|
@ -651,9 +651,9 @@ pub fn reload_for_model(app: &AppConfig, prompt_file: &str) -> Result<(String, V
|
|||
return Ok((content, Vec::new()));
|
||||
}
|
||||
|
||||
let system_prompt = crate::agent::identity::assemble_system_prompt();
|
||||
let system_prompt = crate::user::identity::assemble_system_prompt();
|
||||
let context_groups = get().context_groups.clone();
|
||||
let (context_parts, _, _) = crate::agent::identity::assemble_context_message(&cwd, prompt_file, app.memory_project.as_deref(), &context_groups)?;
|
||||
let (context_parts, _, _) = crate::user::identity::assemble_context_message(&cwd, prompt_file, app.memory_project.as_deref(), &context_groups)?;
|
||||
Ok((system_prompt, context_parts))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue