remove optional
This commit is contained in:
+18
-18
@@ -53,15 +53,15 @@ def _collect_matches(
|
|||||||
*,
|
*,
|
||||||
query: str,
|
query: str,
|
||||||
root: str,
|
root: str,
|
||||||
user: Optional[str],
|
user: str,
|
||||||
channel: Optional[str],
|
channel: str,
|
||||||
team: Optional[str],
|
team: str,
|
||||||
after: Optional[dt.datetime],
|
after: dt.datetime,
|
||||||
before: Optional[dt.datetime],
|
before: dt.datetime,
|
||||||
regex: bool,
|
regex: bool,
|
||||||
search_mode: SearchMode,
|
search_mode: SearchMode,
|
||||||
ignore_case: Optional[bool],
|
ignore_case: bool,
|
||||||
limit: Optional[int],
|
limit: int,
|
||||||
db: str,
|
db: str,
|
||||||
no_index: bool,
|
no_index: bool,
|
||||||
) -> list[dict[str, Any]]:
|
) -> list[dict[str, Any]]:
|
||||||
@@ -158,17 +158,17 @@ def _format_human(matches: list[dict[str, Any]], show_file: bool) -> str:
|
|||||||
@mcp.tool
|
@mcp.tool
|
||||||
def mm_search(
|
def mm_search(
|
||||||
query: str,
|
query: str,
|
||||||
root: Optional[str] = None,
|
root: str = None,
|
||||||
user: Optional[str] = None,
|
user: str = None,
|
||||||
channel: Optional[str] = None,
|
channel: str = None,
|
||||||
team: Optional[str] = None,
|
team: str = None,
|
||||||
after: Optional[str] = None,
|
after: str = None,
|
||||||
before: Optional[str] = None,
|
before: str = None,
|
||||||
regex: bool = False,
|
regex: bool = False,
|
||||||
search_mode: SearchMode = "message",
|
search_mode: SearchMode = "message",
|
||||||
ignore_case: Optional[bool] = None,
|
ignore_case: bool = None,
|
||||||
limit: Optional[int] = None,
|
limit: int = None,
|
||||||
db: Optional[str] = None,
|
db: str = None,
|
||||||
no_index: bool = False,
|
no_index: bool = False,
|
||||||
output: Literal["json", "human"] = "json",
|
output: Literal["json", "human"] = "json",
|
||||||
show_file: bool = False,
|
show_file: bool = False,
|
||||||
@@ -235,8 +235,8 @@ def mm_search(
|
|||||||
|
|
||||||
@mcp.tool
|
@mcp.tool
|
||||||
def mm_search_index_status(
|
def mm_search_index_status(
|
||||||
db: Optional[str] = None,
|
db: str = None,
|
||||||
root: Optional[str] = None,
|
root: str = None,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""Report whether the sqlite index and export root are available."""
|
"""Report whether the sqlite index and export root are available."""
|
||||||
resolved_db = db or _env_db()
|
resolved_db = db or _env_db()
|
||||||
|
|||||||
Reference in New Issue
Block a user