try vscode plugin

This commit is contained in:
CakeCN
2025-09-11 01:06:14 +08:00
parent 2da2da1208
commit 3109cc94e2
16 changed files with 481 additions and 35 deletions

View File

@@ -56,9 +56,6 @@ class ASEngineClient:
def on_response(data):
print(f"Received response: {data}")
def register_route_with_entry(self, route: str,
callback: Optional[Callable] = None,
entry: Any = None,
@@ -167,10 +164,7 @@ class ASEngineClient:
print("Not connected to server")
return False
if route not in self.routes:
print(f"Route '{route}' not registered")
return False
try:
self.sio.emit(route, {'type': 'text', 'data': text}, namespace=self.namespace)
print(f"Sent text to route '{route}': {text}")
@@ -264,4 +258,14 @@ class ASEngineClient:
print("Client stopped by user")
self.disconnect()
else:
print("Not connected to server")
print("Not connected to server")
class HSAEngineClient(ASEngineClient):
def __init__(self, server_url: str, namespace: str):
super().__init__(server_url, namespace)
def loadmarkdown(self, fmd, fmdp, fsp):
self.send_text('markdown-in', fmd)
self.send_text('markdown-prompt-in', fmdp)
self.send_text('score-prompt-in', fsp)