style: format web apps with prettier and sort imports
Apply repo-wide Prettier/lint normalization across admin-web, desktop-client and ops-web: single quotes, no semicolons, trailing commas, consistent line wrapping, and import ordering. Also drop an unused brand-logo import in DesktopShell.vue. No behavior changes — formatting only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -134,9 +134,7 @@ describe('yuanbao adapter helpers', () => {
|
||||
// The new yuanbao model lowers <div data-idx-list="1,2,10"> placeholders to "[1][2][10]";
|
||||
// older SSE frames may still emit "[citation:N]". Both must extract the same indexes.
|
||||
expect(extractCitationMarkerIndexes('合肥老牌选 [1][2] 性价比 [10]。')).toEqual([1, 2, 10])
|
||||
expect(
|
||||
extractCitationMarkerIndexes('混合两种格式 [citation:3] 还有 [4]'),
|
||||
).toEqual([3, 4])
|
||||
expect(extractCitationMarkerIndexes('混合两种格式 [citation:3] 还有 [4]')).toEqual([3, 4])
|
||||
|
||||
const sources = [
|
||||
{ url: 'https://example.com/1', normalized_url: 'https://example.com/1' },
|
||||
@@ -148,9 +146,7 @@ describe('yuanbao adapter helpers', () => {
|
||||
})
|
||||
|
||||
it('rewrites legacy [citation:N] markers to bare [N] for SaaS rendering', () => {
|
||||
expect(normalizeCitationMarkers('正文 [citation:1] 和 [citation:10]')).toBe(
|
||||
'正文 [1] 和 [10]',
|
||||
)
|
||||
expect(normalizeCitationMarkers('正文 [citation:1] 和 [citation:10]')).toBe('正文 [1] 和 [10]')
|
||||
// Already-normalised text passes through.
|
||||
expect(normalizeCitationMarkers('已经是 [1][2] 格式')).toBe('已经是 [1][2] 格式')
|
||||
// Null/empty pass through.
|
||||
@@ -158,7 +154,7 @@ describe('yuanbao adapter helpers', () => {
|
||||
expect(normalizeCitationMarkers('')).toBe('')
|
||||
})
|
||||
|
||||
it("does not invent citations for fast-cache answers (no searchGuid frame, no [N] markers)", () => {
|
||||
it('does not invent citations for fast-cache answers (no searchGuid frame, no [N] markers)', () => {
|
||||
// hunyuan_t1 sometimes returns a cached / non-search answer ("已深度思考(用时1秒)"
|
||||
// with no "找到了 N 篇相关资料" panel). The SSE then carries only `text`
|
||||
// frames and no `searchGuid`. The adapter must still surface that answer to
|
||||
@@ -190,7 +186,7 @@ describe('yuanbao adapter helpers', () => {
|
||||
expect(findUnresolvedCitationIndexes(summary.answer, summary.citations)).toEqual([])
|
||||
})
|
||||
|
||||
it("aligns citations[index-1] with answer markers when SSE places refs in searchGuid.docs (new hunyuan_t1 protocol)", () => {
|
||||
it('aligns citations[index-1] with answer markers when SSE places refs in searchGuid.docs (new hunyuan_t1 protocol)', () => {
|
||||
// Captured against the live yuanbao endpoint: deep-search now ships every
|
||||
// reference inside `searchGuid.docs[]` with a 1-based `index`, and the
|
||||
// legacy `citations` field is always null in this frame. Whatever the
|
||||
|
||||
Reference in New Issue
Block a user