Skip to content

Commit 95f5011

Browse files
committed
fix: test failing ssues
1 parent fa454b1 commit 95f5011

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

models/search.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Any, NotRequired, TypedDict
5+
from typing import Any, TypedDict
66

77

88
class ConversationSummary(TypedDict, total=False):
@@ -14,14 +14,19 @@ class ConversationSummary(TypedDict, total=False):
1414
raw: dict[str, Any]
1515

1616

17-
class SearchResult(TypedDict):
18-
"""One hit returned by ``/api/search`` and the search service helpers."""
19-
17+
class _SearchResultRequired(TypedDict):
2018
workspaceId: str
2119
workspaceFolder: str | None
2220
chatId: str
2321
chatTitle: str
2422
timestamp: int | str
2523
matchingText: str
2624
type: str # "composer" | "chat" | "cli_agent"
27-
source: NotRequired[str] # "cli" for CLI agent sessions
25+
26+
27+
class _SearchResultOptional(TypedDict, total=False):
28+
source: str # "cli" for CLI agent sessions
29+
30+
31+
class SearchResult(_SearchResultRequired, _SearchResultOptional):
32+
"""One hit returned by ``/api/search`` and the search service helpers."""

0 commit comments

Comments
 (0)