MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / session_id_from_transcript

Function session_id_from_transcript

src/sessions/kiro.rs:418–431  ·  view source on GitHub ↗
(path: &Path, value: &Value)

Source from the content-addressed store, hash-verified

416}
417
418fn session_id_from_transcript(path: &Path, value: &Value) -> String {
419 string_field(value, &["sessionId", "conversationId", "workflowId", "id"])
420 .or_else(|| {
421 value
422 .get("metadata")
423 .and_then(|meta| string_field(meta, &["workflowId", "sessionId"]))
424 })
425 .unwrap_or_else(|| {
426 path.file_stem()
427 .and_then(|stem| stem.to_str())
428 .unwrap_or("unknown")
429 .to_string()
430 })
431}
432
433fn model_from_transcript(value: &Value) -> Option<String> {
434 string_field(value, &["modelId", "modelID", "modelName", "model"]).or_else(|| {

Callers 1

parse_newMethod · 0.85

Calls 1

string_fieldFunction · 0.70

Tested by

no test coverage detected