Preserve explicit code candidates and expose verified model asset milestones

This commit is contained in:
karl committed 2026-10-13 08:47:41 +02:00
1 parent 6e05227f53
commit e28e20af38
9 files changed
+475 -16

No files matched your search

+13 -1
View File
@@ -22,7 +22,7 @@ impl SemanticOrigin {
}
/// A conservative intent hint, not a language understanding model. Explicit
/// document/visual cues veto it; ordinary topic and instrument queries do not
/// document/visual/code cues veto it; ordinary topic and instrument queries do not
/// silently restrict modality. Word boundaries avoid filename substrings.
fn preferred_origin(query: &str) -> Option<SemanticOrigin> {
if query.split_whitespace().count() == 1 && Path::new(query).extension().is_some() {
@@ -49,6 +49,12 @@ fn preferred_origin(query: &str) -> Option<SemanticOrigin> {
"screenshot",
"dokument",
"textdatei",
"code",
"function",
"implementation",
"quellcode",
"funktion",
"implementierung",
]) {
return None;
}
@@ -211,6 +217,12 @@ mod tests {
"a document that someone mentioned",
"speech.png",
"a screenshot of an audio waveform",
"code that chooses audio search when a query mentions speech",
"an implementation for identifying music",
"a function that decodes audio samples",
"Quellcode für die Suche nach gesprochenen Themen",
"eine Funktion für die Verarbeitung von Musik",
"Implementierung für die Erkennung von Geräuschen",
] {
assert_eq!(preferred_origin(query), None, "{query}");
}