feat(phase9): migration v14 + storage and Tauri command extension for llm_tags
Adds llm_tags TEXT NOT NULL DEFAULT '' to the transcripts table via new migration v14. SELECT statements + TranscriptRow + transcript_row_from now carry the column. update_transcript_meta gains a sixth Option for llm_tags following the existing COALESCE pattern; an #[allow(too_many_arguments)] keeps clippy happy without inverting the signature into a struct that would just shift the indirection. The Tauri-side TranscriptDto + UpdateTranscriptMetaRequest + the update_transcript_meta_cmd command pass llm_tags through unchanged. Pre-existing manualTags persistence path now has a sibling for llmTags ready for the frontend to call. Phase 8 brittle test fix included: list_recent_completions_uses_local_day_boundary was anchoring its "-2 days" UTC offset against the local-day spine, which drifted across UTC midnight. Anchored to the local date directly so it matches the spine regardless of clock. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,8 @@ pub struct TranscriptDto {
|
||||
pub template: String,
|
||||
pub language: String,
|
||||
pub segments_json: String,
|
||||
/// Phase 9 LLM-generated content tags ("topic:...", "intent:...").
|
||||
pub llm_tags: String,
|
||||
}
|
||||
|
||||
impl From<TranscriptRow> for TranscriptDto {
|
||||
@@ -68,6 +70,7 @@ impl From<TranscriptRow> for TranscriptDto {
|
||||
template: r.template,
|
||||
language: r.language,
|
||||
segments_json: r.segments_json,
|
||||
llm_tags: r.llm_tags,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,6 +224,11 @@ pub struct UpdateTranscriptMetaRequest {
|
||||
pub language: Option<String>,
|
||||
#[serde(default)]
|
||||
pub segments_json: Option<String>,
|
||||
/// Phase 9 LLM content tags. Same comma-joined string convention as
|
||||
/// `manual_tags`. Pass `None` to leave unchanged; pass `Some("")` to
|
||||
/// explicitly clear.
|
||||
#[serde(default)]
|
||||
pub llm_tags: Option<String>,
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
@@ -237,6 +245,7 @@ pub async fn update_transcript_meta_cmd(
|
||||
patch.template.as_deref(),
|
||||
patch.language.as_deref(),
|
||||
patch.segments_json.as_deref(),
|
||||
patch.llm_tags.as_deref(),
|
||||
)
|
||||
.await
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
Reference in New Issue
Block a user