mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 21:11:51 +08:00
Rewriting Project Claw Code - Python port with Rust on the way
This commit is contained in:
21
src/direct_modes.py
Normal file
21
src/direct_modes.py
Normal file
@@ -0,0 +1,21 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user