mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 16:51:51 +08:00
22 lines
543 B
Python
22 lines
543 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class DirectModeReport:
|
|
mode: str
|
|
target: str
|
|
active: bool
|
|
|
|
def as_text(self) -> str:
|
|
return f'mode={self.mode}\ntarget={self.target}\nactive={self.active}'
|
|
|
|
|
|
def run_direct_connect(target: str) -> DirectModeReport:
|
|
return DirectModeReport(mode='direct-connect', target=target, active=True)
|
|
|
|
|
|
def run_deep_link(target: str) -> DirectModeReport:
|
|
return DirectModeReport(mode='deep-link', target=target, active=True)
|