Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rlm_query
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fi
# Trace logging (optional)
# ----------------------------------------------------------------------
if [ -n "${PI_TRACE_FILE:-}" ]; then
echo "[$(date +%H:%M:%S.%3N)] depth=$DEPTH→$NEXT_DEPTH PID=$$ PPID=$PPID call=$RLM_CALL_COUNT trace=$RLM_TRACE_ID fork=$FORK prompt: ${PROMPT:0:120}" >> "$PI_TRACE_FILE"
echo "[$(date +%H:%M:%S.%3N)] depth=${DEPTH}→${NEXT_DEPTH} PID=$$ PPID=$PPID call=$RLM_CALL_COUNT trace=$RLM_TRACE_ID fork=$FORK prompt: ${PROMPT:0:120}" >> "$PI_TRACE_FILE"
fi

# ----------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion tests/test_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ OUTPUT=$(
CONTEXT="$TEST_TMP/ctx.txt" \
rlm_query "How many r's in strawberry?"
)
assert_contains "T14d: prompt file is set" "RLM_PROMPT_FILE=/tmp/rlm_prompt_" "$OUTPUT"
assert_contains "T14d: prompt file is set" "RLM_PROMPT_FILE=" "$OUTPUT"
assert_contains "T14d: prompt file path contains rlm_prompt" "rlm_prompt_" "$OUTPUT"
assert_contains "T14d: prompt file has content" "PROMPT_CONTENT=How many r's in strawberry?" "$OUTPUT"

# ─── Test Group: Temp File Cleanup ────────────────────────────────────────
Expand Down
3 changes: 3 additions & 0 deletions ypi
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ while [[ $# -gt 0 ]]; do
done
# Launch Pi with the combined system prompt, passing all args through
# User's own extensions (hashline, etc.) are discovered automatically by Pi.
# Pass through RLM_PROVIDER/RLM_MODEL to the root session if set.
PI_ARGV=(pi --system-prompt "$COMBINED_PROMPT")
[ -n "${RLM_PROVIDER:-}" ] && PI_ARGV+=(--provider "$RLM_PROVIDER")
[ -n "${RLM_MODEL:-}" ] && PI_ARGV+=(--model "$RLM_MODEL")
[ ${#YPI_EXT_ARGS[@]} -gt 0 ] && PI_ARGV+=("${YPI_EXT_ARGS[@]}")
[ ${#PASS_ARGS[@]} -gt 0 ] && PI_ARGV+=("${PASS_ARGS[@]}")
exec "${PI_ARGV[@]}"