Questions about relationship analyses too
CI / test (push) Successful in 1m6s
CI / build (push) Successful in 5m1s
CI / deploy (push) Skipped

- The answer sees both charts and the comparison; both people see the questions
- Heading, hint and example question per analysis kind

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-18 21:51:38 +00:00
co-authored by Claude Opus 5.5
parent 02e4e225f0
commit 029a001ca6
11 changed files with 116 additions and 29 deletions
+4 -2
View File
@@ -51,8 +51,9 @@ impl Analyzer {
async fn question_prompt(&self, job: &QuestionJob) -> Result<prompt::Prompt, LlmError> {
let db_err = |e: sqlx::Error| LlmError::Transient(format!("database: {e}"));
let (kind, chart_id, forecast_id, content): (String, Option<Uuid>, Option<Uuid>, Option<Value>) =
sqlx::query_as("SELECT kind, chart_id, forecast_id, content FROM analyses WHERE id = $1")
type Row = (String, Option<Uuid>, Option<Uuid>, Option<Uuid>, Option<Value>);
let (kind, chart_id, synastry_id, forecast_id, content): Row =
sqlx::query_as("SELECT kind, chart_id, synastry_id, forecast_id, content FROM analyses WHERE id = $1")
.bind(job.analysis_id)
.fetch_optional(&self.db)
.await
@@ -62,6 +63,7 @@ impl Analyzer {
let content = content.ok_or_else(|| LlmError::Permanent("the analysis has no text".into()))?;
let chart_text = match kind {
Kind::Forecast => self.forecast_text(forecast_id).await?,
Kind::Synastry => self.synastry_text(synastry_id).await?,
_ => self.natal_text(chart_id).await?,
};
let analysis = prompt::to_markdown(kind, &job.language, &content);