(raw: &str)
| 1700 | } |
| 1701 | |
| 1702 | fn parse_model_string(raw: &str) -> ModelRef { |
| 1703 | if let Some((provider_id, model_id)) = raw.split_once(':').or_else(|| raw.split_once('/')) { |
| 1704 | return ModelRef { |
| 1705 | provider_id: provider_id.to_string(), |
| 1706 | model_id: model_id.to_string(), |
| 1707 | }; |
| 1708 | } |
| 1709 | if raw.is_empty() { |
| 1710 | return ModelRef { |
| 1711 | provider_id: "default".to_string(), |
| 1712 | model_id: "default".to_string(), |
| 1713 | }; |
| 1714 | } |
| 1715 | ModelRef { |
| 1716 | provider_id: "default".to_string(), |
| 1717 | model_id: raw.to_string(), |
| 1718 | } |
| 1719 | } |
| 1720 | |
| 1721 | fn compose_subsession_prompt(history: &[PersistedSubsessionTurn], prompt: &str) -> String { |
| 1722 | if history.is_empty() { |
no test coverage detected