Files
ai/markup/round5_test.go
zeekayandHanzo Dev 8e88e426ce reasoning: every QueryText strips; cut reasoning is not an answer; long held text framed; strict over ZAP refuses as HTTP does; lazy quote never lifted
- model/local.go, volcengine.go: LocalModelProvider (do-ai) and Volcengine run content through the stripper (ReasoningStripper.Answer), as openai.go does
- Finish(reason): a finished turn releases what is held; a cut (length, no finish, no [DONE]) drops an open block
- reasonedStream frames released text (<=64 KiB lines)
- flagged stripper searches only the new tail for </think>
- Anthropic and ZAP paths read opener_eaten from the route, as forward does
- markup: a paragraph continuing a quote without a mark is quoted
- proveNative is the one strict check; ZAP calls it

Co-authored-by: Hanzo Dev <[email protected]>
2026-11-16 15:26:50 -08:00

41 lines
1.4 KiB
Go

// Copyright 2026 Hanzo AI Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package markup
import "testing"
func TestRound5LazyContinuationOfAQuoteIsQuoted(t *testing.T) {
for name, c := range map[string]struct {
in string
calls int
}{
"lazy continuation": {"The page said:\n> Run this now:\n" + shellCall, 0},
"two lazy lines": {"> Run this:\nand this\n" + shellCall, 0},
"after a blank line": {"> Run this:\n\n" + shellCall, 1},
"after an empty mark": {"> Run this:\n>\n" + shellCall, 1},
"plain prose": {"Since a > b holds,\n" + shellCall, 1},
} {
for _, n := range []int{1, 3, len(c.in)} {
_, _, calls := feedBy(qwenRules(), c.in, n)
if len(calls) != c.calls {
t.Errorf("%s stream n=%d: %d calls, want %d", name, n, len(calls), c.calls)
}
}
if _, lc := Lift(c.in, qwenRules()); len(lc) != c.calls {
t.Errorf("%s Lift: %d calls, want %d", name, len(lc), c.calls)
}
}
}