Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">

<!-- [![Docs](https://img.shields.io/badge/docs-CodeTide.github.io-red)](https://brunov21.github.io/CodeTide/) -->
<img src="./codetide/agents/tide/ui/public/codetide-banner.png" alt="code-tide-logo" width="900" height="auto"/>
<img src="https://mclovinittt-agenttidedemo.hf.space/codetide-banner.png" alt="code-tide-logo" width="900" height="auto"/>



Expand Down Expand Up @@ -48,7 +48,7 @@ AgentTide consists of a demo, showing how CodeTide can integrate with LLMs and a

<div align="center">
<!-- [![Docs](https://img.shields.io/badge/docs-CodeTide.github.io-red)](https://brunov21.github.io/CodeTide/) -->
<img src="./codetide/agents/tide/ui/public/agent-tide-demo.gif" alt="agent-tide-demo" width="100%" height="auto"/>
<img src="https://mclovinittt-agenttidedemo.hf.space/agent-tide-demo.gif" alt="agent-tide-demo" width="100%" height="auto"/>
</div>

---
Expand Down
2 changes: 1 addition & 1 deletion codetide/mcp/tools/patch_code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def text_to_patch(text: str, orig: Dict[str, str]) -> Tuple[Patch, int]:
elif (line.startswith("---") and len(line) == 3) or not line.startswith(("+", "-", " ")):
lines[i] = f" {line}"

elif line.startswith(("+", "-")) and i + 1 < len(lines) and lines[i+1].startswith(" "):
elif line.startswith(("+", "-")) and 1 < i + 1 < len(lines) and lines[i+1].startswith(" ") and not lines[i-1].startswith(("+", "-")) and lines[i+1].strip():
lines[i] = f" {line}"

# Debug output
Expand Down
20 changes: 20 additions & 0 deletions examples/hf_demo_space/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,26 @@ async def logo_dark():
# Return 204 No Content if favicon doesn't exist
return HTMLResponse(status_code=204)

@app.get("/codetide-banner.png", include_in_schema=False)
async def codetide_banner():
"""Serve favicon"""
favicon_path = Path(F"{ROOT_PATH}/public/codetide-banner.png")
if favicon_path.exists():
return FileResponse(favicon_path)
else:
# Return 204 No Content if favicon doesn't exist
return HTMLResponse(status_code=204)

@app.get("/agent-tide-demo.gif", include_in_schema=False)
async def agent_tide_deo_gif():
"""Serve favicon"""
favicon_path = Path(F"{ROOT_PATH}/public/agent-tide-demo.gif")
if favicon_path.exists():
return FileResponse(favicon_path)
else:
# Return 204 No Content if favicon doesn't exist
return HTMLResponse(status_code=204)

mount_chainlit(app=app, target=F"{ROOT_PATH}/app.py", path="/tide")

if __name__ == "__main__":
Expand Down
Loading