Cthulhu is no longer a fork. Now it is a screen reader written in Golang.
This commit is contained in:
1 parent
a998fe67de
commit
069fc674dc
708 files changed
+112482
-532
No files matched your search
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
"""Private independent wire fixture. Not an SDK or installable tentacle."""
|
||||
|
||||
import json
|
||||
import sys
|
||||
|
||||
active = False
|
||||
for line in sys.stdin.buffer:
|
||||
request = json.loads(line)
|
||||
method = request["method"]
|
||||
if method == "initialize":
|
||||
initialization = request["params"]
|
||||
result = {
|
||||
"protocol": initialization["protocol"],
|
||||
"session": initialization["session"],
|
||||
"commands": [{"id": "echo", "title": "Echo text", "description": ""}],
|
||||
}
|
||||
elif method == "initialized":
|
||||
active = True
|
||||
continue
|
||||
elif method == "shutdown":
|
||||
break
|
||||
elif method == "command.invoke" and active:
|
||||
result = request["params"]["arguments"]
|
||||
else:
|
||||
sys.exit(2)
|
||||
print(json.dumps({"jsonrpc": "2.0", "id": request["id"], "result": result}), flush=True)
|
||||
Reference in new issue
Block a user