Tighten identity and trim trailing blank lines in coder-lite.

2e59e30d513a · AtlantisPleb · · parent a2438e0b2fd4

Tighten identity and trim trailing blank lines in coder-lite.

- Add an explicit `Item::system_message` to `CoderRuntimeSession::new` with
  strong identity constraints: do not identify as Google/Anthropic/OpenAI,
  do not mention model/training, never claim to be a large language model.
- Remove the hard-coded trailing blank line after assistant entries in tui.rs.
- Pop trailing empty `Line`s produced by ratatui-markdown so no extra spacing
  appears after assistant responses.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified crates/coder-lite/src/runtime.rs
  • modified crates/coder-lite/src/tui.rs

Diff

2 files changed, +7 -3

crates/coder-lite/src/runtime.rs modified +3 -1

@@ -5,6 +5,8 @@ use openresponses_rust::{CreateResponseBody, Input, Item, StreamingClient, Strea

5 5
use std::env;
6 6
use std::sync::mpsc::Sender;
7 7
8
const SYSTEM_INSTRUCTIONS: &str = "You are OpenAgents Coder. Do not say you are from Google, Anthropic, OpenAI, or any other company. Do not mention your model, training, or architecture. Respond as a neutral, terse terminal: no greetings, no \"As an AI\", no explanations of your role, and no unnecessary padding. Use short sentences and dense, factual output. Answer questions directly. Output only code and minimal context when asked for code.";
9
8 10
pub enum Control {
9 11
    Chunk(String),
10 12
    Done,

@@ -22,7 +24,7 @@ impl CoderRuntimeSession {

22 24
            api_key: env::var("OPENAGENTS_API_KEY").unwrap_or_default(),
23 25
            base_url: env::var("OPENAGENTS_BASE_URL")
24 26
                .unwrap_or_else(|_| "https://openagents.com/api/v1".to_string()),
25
            history: Vec::new(),
27
            history: vec![Item::system_message(SYSTEM_INSTRUCTIONS)],
26 28
        }
27 29
    }
28 30
crates/coder-lite/src/tui.rs modified +4 -2

@@ -312,8 +312,10 @@ impl CoderUi {

312 312
                    *line = Line::from(mapped);
313 313
                }
314 314
315
                if !self.loading {
316
                    lines.push(Line::default());
315
                while lines.last().map_or(false, |l| {
316
                    l.spans.iter().all(|s| s.content.is_empty())
317
                }) {
318
                    lines.pop();
317 319
                }
318 320
319 321
                lines

This page updates live while a promote is in flight · changelog