-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathexample_payloads.json
More file actions
242 lines (242 loc) · 10.9 KB
/
Copy pathexample_payloads.json
File metadata and controls
242 lines (242 loc) · 10.9 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
{
"examples": {
"process_files_request": {
"action": "process_files",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:30:00Z",
"payload": {
"files": [
"/Users/rob/code/FileKitty/src/filekitty/models.py",
"/Users/rob/code/FileKitty/src/filekitty/app_logic.py"
],
"selection_state": {
"mode": "All Files",
"selected_file": null,
"selected_items": []
},
"settings": {
"include_tree": true,
"tree_base_dir": "/Users/rob/code/FileKitty",
"tree_ignore_regex": "\\.git|\\.pyc|\\.DS_Store",
"include_date_modified": true,
"auto_copy": false,
"use_llm_timestamp": false
}
}
},
"process_files_response": {
"action": "process_files",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:30:02Z",
"success": true,
"payload": {
"prompt_session": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:30:00Z",
"files": [
"/Users/rob/code/FileKitty/src/filekitty/models.py",
"/Users/rob/code/FileKitty/src/filekitty/app_logic.py"
],
"file_metadata": [
{
"path": "/Users/rob/code/FileKitty/src/filekitty/models.py",
"display_path": "src/filekitty/models.py",
"is_text_file": true,
"language": "python",
"last_modified": "2025-07-05T14:25:00Z",
"file_hash": "abc123def456789012345678901234567890abcdef123456789012345678901234",
"size_bytes": 5432
},
{
"path": "/Users/rob/code/FileKitty/src/filekitty/app_logic.py",
"display_path": "src/filekitty/app_logic.py",
"is_text_file": true,
"language": "python",
"last_modified": "2025-07-05T12:00:00Z",
"file_hash": "def456789012345678901234567890abcdef123456789012345678901234567890",
"size_bytes": 2048
}
],
"selection_state": {
"mode": "All Files",
"selected_file": null,
"selected_items": []
},
"project_root": "/Users/rob/code/FileKitty",
"tree_snapshot": {
"base_path": "/Users/rob/code/FileKitty",
"base_path_display": "FileKitty/",
"ignore_regex": "\\.git|\\.pyc|\\.DS_Store",
"rendered": "# Folder Tree of FileKitty/\\n\\n```text\\nFileKitty/\\n├── src/\\n│ └── filekitty/\\n│ ├── models.py\\n│ ├── app_logic.py\\n│ └── __init__.py\\n├── README.md\\n└── pyproject.toml\\n```"
},
"output_text": "# Folder Tree of FileKitty/\\n\\n```text\\nFileKitty/\\n├── src/\\n│ └── filekitty/\\n│ ├── models.py\\n│ ├── app_logic.py\\n│ └── __init__.py\\n├── README.md\\n└── pyproject.toml\\n```\\n\\n# src/filekitty/models.py\\n**Last modified: Jul 05, 2025 2:25 PM PST**\\n\\n```python\\n\"\"\"Data models for FileKitty Swift integration.\"\"\"\\n\\nimport json\\nfrom dataclasses import dataclass, field\\nfrom datetime import datetime\\nfrom typing import Any, Dict, List, Optional\\n\\n\\n@dataclass\\nclass FileMetadata:\\n \"\"\"Metadata for a single file in the session.\"\"\"\\n path: str\\n display_path: str\\n is_text_file: bool\\n # ... rest of file content\\n```\\n\\n# src/filekitty/app_logic.py\\n**Last modified: Jul 05, 2025 12:00 PM PST**\\n\\n```python\\nimport sys\\nfrom pathlib import Path\\n\\nfrom PyQt5.QtCore import QEvent, Qt\\nfrom PyQt5.QtWidgets import QApplication\\n\\nfrom filekitty.ui.main_window import FilePicker\\n\\n\\nclass FileKittyApp(QApplication):\\n # ... rest of file content\\n```",
"settings": {
"include_tree": true,
"tree_base_dir": "/Users/rob/code/FileKitty",
"tree_ignore_regex": "\\.git|\\.pyc|\\.DS_Store",
"include_date_modified": true,
"auto_copy": false,
"use_llm_timestamp": false
}
}
}
},
"get_python_symbols_request": {
"action": "get_python_symbols",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:31:00Z",
"payload": {
"files": [
"/Users/rob/code/FileKitty/src/filekitty/models.py",
"/Users/rob/code/FileKitty/src/filekitty/app_logic.py"
]
}
},
"get_python_symbols_response": {
"action": "get_python_symbols",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:31:01Z",
"success": true,
"payload": {
"symbols": {
"/Users/rob/code/FileKitty/src/filekitty/models.py": {
"classes": ["FileMetadata", "TreeSnapshot", "SelectionState", "PromptSession"],
"functions": []
},
"/Users/rob/code/FileKitty/src/filekitty/app_logic.py": {
"classes": ["FileKittyApp"],
"functions": ["main"]
}
},
"errors": []
}
},
"update_selection_request": {
"action": "update_selection",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:32:00Z",
"payload": {
"selection_state": {
"mode": "Single File",
"selected_file": "/Users/rob/code/FileKitty/src/filekitty/models.py",
"selected_items": ["PromptSession", "FileMetadata"]
}
}
},
"update_selection_response": {
"action": "update_selection",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:32:01Z",
"success": true,
"payload": {
"output_text": "# Folder Tree of FileKitty/\\n\\n```text\\nFileKitty/\\n├── src/\\n│ └── filekitty/\\n│ ├── models.py\\n│ ├── app_logic.py\\n│ └── __init__.py\\n├── README.md\\n└── pyproject.toml\\n```\\n\\n# src/filekitty/models.py\\n**Last modified: Jul 05, 2025 2:25 PM PST**\\n\\n```python\\n@dataclass\\nclass FileMetadata:\\n \"\"\"Metadata for a single file in the session.\"\"\"\\n path: str\\n display_path: str\\n is_text_file: bool\\n language: Optional[str] = None\\n last_modified: Optional[datetime] = None\\n file_hash: Optional[str] = None\\n size_bytes: Optional[int] = None\\n\\n\\n@dataclass\\nclass PromptSession:\\n \"\"\"Complete session state for FileKitty.\"\"\"\\n id: str\\n timestamp: datetime\\n files: List[str]\\n file_metadata: List[FileMetadata]\\n selection_state: SelectionState\\n project_root: Optional[str] = None\\n tree_snapshot: Optional[TreeSnapshot] = None\\n output_text: Optional[str] = None\\n settings: Dict[str, Any] = field(default_factory=dict)\\n # ... methods omitted for brevity\\n```"
}
},
"save_session_request": {
"action": "save_session",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:33:00Z",
"payload": {
"file_path": "/Users/rob/Documents/filekitty_session.json"
}
},
"save_session_response": {
"action": "save_session",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:33:01Z",
"success": true,
"payload": {
"saved_path": "/Users/rob/Documents/filekitty_session.json"
}
},
"load_session_request": {
"action": "load_session",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:34:00Z",
"payload": {
"file_path": "/Users/rob/Documents/filekitty_session.json"
}
},
"load_session_response": {
"action": "load_session",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:34:01Z",
"success": true,
"payload": {
"prompt_session": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:30:00Z",
"files": [
"/Users/rob/code/FileKitty/src/filekitty/models.py",
"/Users/rob/code/FileKitty/src/filekitty/app_logic.py"
],
"file_metadata": [
{
"path": "/Users/rob/code/FileKitty/src/filekitty/models.py",
"display_path": "src/filekitty/models.py",
"is_text_file": true,
"language": "python",
"last_modified": "2025-07-05T14:25:00Z",
"file_hash": "abc123def456789012345678901234567890abcdef123456789012345678901234",
"size_bytes": 5432
}
],
"selection_state": {
"mode": "Single File",
"selected_file": "/Users/rob/code/FileKitty/src/filekitty/models.py",
"selected_items": ["PromptSession", "FileMetadata"]
},
"project_root": "/Users/rob/code/FileKitty",
"tree_snapshot": {
"base_path": "/Users/rob/code/FileKitty",
"base_path_display": "FileKitty/",
"ignore_regex": "\\.git|\\.pyc|\\.DS_Store",
"rendered": "# Folder Tree of FileKitty/\\n\\n```text\\nFileKitty/\\n├── src/\\n│ └── filekitty/\\n│ ├── models.py\\n│ ├── app_logic.py\\n│ └── __init__.py\\n├── README.md\\n└── pyproject.toml\\n```"
},
"output_text": "# Filtered content based on selection...",
"settings": {
"include_tree": true,
"tree_base_dir": "/Users/rob/code/FileKitty",
"tree_ignore_regex": "\\.git|\\.pyc|\\.DS_Store",
"include_date_modified": true,
"auto_copy": false,
"use_llm_timestamp": false
}
}
}
},
"error_response": {
"action": "process_files",
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-07-05T14:35:00Z",
"success": false,
"error": {
"type": "FileNotFoundError",
"message": "One or more files could not be found",
"details": {
"missing_files": [
"/Users/rob/code/FileKitty/nonexistent.py"
],
"accessible_files": [
"/Users/rob/code/FileKitty/src/filekitty/models.py"
]
}
}
},
"validation_error_response": {
"action": "update_selection",
"session_id": "invalid-session-id",
"timestamp": "2025-07-05T14:36:00Z",
"success": false,
"error": {
"type": "ValidationError",
"message": "Invalid session ID format",
"details": {
"field": "session_id",
"expected": "Valid UUID string",
"received": "invalid-session-id"
}
}
}
}
}