-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenums.py
More file actions
40 lines (30 loc) · 803 Bytes
/
enums.py
File metadata and controls
40 lines (30 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from enum import Enum
from typing import NamedTuple
class AppEventType(Enum):
ASSISTANT = "assistant"
INIT = "init"
RESULT = "result"
STREAM_EVENT = "stream_event"
SYSTEM = "system"
TOOL_PERMISSION_REQUEST = "tool_permission_request"
USER = "user"
class ContentType(Enum):
TEXT = "text"
TOOL_USE = "tool_use"
CONTENT_BLOCK_DELTA = "content_block_delta"
TEXT_DELTA = "text_delta"
class ControlCommand(Enum):
NEW_CONVERSATION = "new_conversation"
CHANGE_MODEL = "change_model"
EXIT = "exit"
CLEAR = "clear"
class ModelChangeCommand(NamedTuple):
command: ControlCommand
model: str
class Key(Enum):
ENTER = "enter"
ESCAPE = "escape"
BACKSPACE = "backspace"
DELETE = "delete"
CTRL_J = "ctrl+j"
SLASH = "/"