Skip to content

Commit 6702e13

Browse files
committed
test and build fix
1 parent 2b0ac30 commit 6702e13

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

crates/llm-types/src/parser.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use nom::{
33
bytes::complete::{tag, take_until},
44
character::complete::multispace0,
55
combinator::map,
6-
sequence::{delimited, terminated},
6+
sequence::delimited,
77
};
88
use std::collections::HashMap;
99

@@ -96,10 +96,7 @@ impl StreamingParser {
9696

9797
fn parse_think_block(input: &str) -> IResult<&str, String> {
9898
let mut parser = map(
99-
terminated(
100-
delimited(tag("<think>"), take_until("</think>"), tag("</think>")),
101-
multispace0,
102-
),
99+
delimited(tag("<think>"), take_until("</think>"), tag("</think>")),
103100
|content: &str| content.trim().to_string(),
104101
);
105102
parser.parse(input)
@@ -167,7 +164,7 @@ mod tests {
167164
items,
168165
[
169166
Response::Reasoning("I need to process this request.".to_string()),
170-
Response::TextDelta("Here's my ".to_string()),
167+
Response::TextDelta("\nHere's my ".to_string()),
171168
Response::TextDelta("response.".to_string())
172169
]
173170
);
@@ -220,6 +217,7 @@ mod tests {
220217
items,
221218
[
222219
Response::Reasoning("I need to process this request.".to_string()),
220+
Response::TextDelta("\n".to_string()),
223221
Response::ToolCall {
224222
name: "greet".to_string(),
225223
arguments: HashMap::from([(
@@ -327,7 +325,7 @@ Hyprnote is an AI-powered notepad designed for private meetings with complete on
327325
.map(|item| match item {
328326
Response::TextDelta(text) => text.clone(),
329327
Response::Reasoning(reasoning) => {
330-
format!("<think>\n{}\n</think>\n", reasoning)
328+
format!("<think>\n{}\n</think>", reasoning)
331329
}
332330
_ => "".to_string(),
333331
})

scripts/setup-linux-tauri.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ sudo apt-get install -y \
1414
libxdo-dev \
1515
libssl-dev \
1616
libayatana-appindicator3-dev \
17-
librsvg2-dev
17+
librsvg2-dev \
18+
xdg-utils

0 commit comments

Comments
 (0)