mycode-cli 0.8.0__py3-none-any.whl → 0.8.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mycode_cli/server/routers/chat.py +3 -0
- mycode_cli/server/routers/sessions.py +2 -0
- mycode_cli/server/static/assets/EditDiff-Dkb_qqN4.js +1750 -0
- mycode_cli/server/static/assets/highlighter-CBF5nAMY.js +1 -0
- mycode_cli/server/static/assets/index-BtZePyza.js +323 -0
- mycode_cli/server/static/assets/{index-zkuv4xDB.css → index-DkpWP3OG.css} +1 -1
- mycode_cli/server/static/assets/langs-BNF7a5b3.js +153 -0
- mycode_cli/server/static/index.html +2 -2
- {mycode_cli-0.8.0.dist-info → mycode_cli-0.8.2.dist-info}/METADATA +2 -2
- {mycode_cli-0.8.0.dist-info → mycode_cli-0.8.2.dist-info}/RECORD +13 -11
- mycode_cli/server/static/assets/EditDiff-DlkAvOn9.js +0 -1750
- mycode_cli/server/static/assets/index-BeQByCJa.js +0 -474
- {mycode_cli-0.8.0.dist-info → mycode_cli-0.8.2.dist-info}/WHEEL +0 -0
- {mycode_cli-0.8.0.dist-info → mycode_cli-0.8.2.dist-info}/entry_points.txt +0 -0
- {mycode_cli-0.8.0.dist-info → mycode_cli-0.8.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -76,6 +76,8 @@ async def _stream_run(req: Request, state: RunState, after: int) -> AsyncIterato
|
|
|
76
76
|
@router.post("/chat")
|
|
77
77
|
async def chat(chat: ChatRequest, store: StoreDep, runs: RunManagerDep):
|
|
78
78
|
cwd = os.path.abspath(chat.cwd or os.getcwd())
|
|
79
|
+
if not os.path.isdir(cwd):
|
|
80
|
+
raise HTTPException(status_code=400, detail=f"Working directory does not exist: {cwd}")
|
|
79
81
|
settings = get_settings(cwd)
|
|
80
82
|
resolved = resolve_provider(
|
|
81
83
|
settings,
|
|
@@ -367,6 +369,7 @@ async def get_config(cwd: str | None = None):
|
|
|
367
369
|
"default_reasoning_effort": settings.default_reasoning_effort,
|
|
368
370
|
"reasoning_effort_options": REASONING_EFFORT_OPTIONS,
|
|
369
371
|
"cwd": resolved_cwd,
|
|
372
|
+
"cwd_exists": os.path.isdir(resolved_cwd),
|
|
370
373
|
"project": settings.project,
|
|
371
374
|
"config_paths": settings.config_paths,
|
|
372
375
|
}
|
|
@@ -31,6 +31,8 @@ def _redact_document_data(messages: list[ConversationMessage]) -> list[Conversat
|
|
|
31
31
|
@router.post("")
|
|
32
32
|
async def create_session(req: SessionCreateRequest, store: StoreDep):
|
|
33
33
|
cwd = os.path.abspath(req.cwd or os.getcwd())
|
|
34
|
+
if not os.path.isdir(cwd):
|
|
35
|
+
raise HTTPException(status_code=400, detail=f"Working directory does not exist: {cwd}")
|
|
34
36
|
session_id = uuid4().hex
|
|
35
37
|
return await store.create_session(session_id, cwd=cwd)
|
|
36
38
|
|