feat(save): save markdown and websites from UI for chat creations#44
feat(save): save markdown and websites from UI for chat creations#44ArslanSaleem wants to merge 287 commits into
Conversation
There was a problem hiding this comment.
Caution
Changes requested ❌
Reviewed everything up to fd240e8 in 2 minutes and 14 seconds. Click for details.
- Reviewed
753lines of code in11files - Skipped
1files when reviewing. - Skipped posting
1draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. examples/ui/frontend/src/components/content-sidebar.tsx:775
- Draft comment:
The string manipulation for determining the download file extension (replacing 'md' with 'pdf') is brittle; consider refactoring for clarity and robustness. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_npzhKHSJGLggqlc7
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
|
|
||
| import aiohttp | ||
| from fastapi import APIRouter, HTTPException, Request | ||
| from fastapi.security import HTTPBearer |
There was a problem hiding this comment.
Unused import: HTTPBearer is imported but never used; consider removing it.
| from fastapi.security import HTTPBearer |
| class ArtifactsService: | ||
|
|
||
| @staticmethod | ||
| async def get_files_for_artifact(type: str, filepath: str, conversation_id: str): |
There was a problem hiding this comment.
Avoid using 'type' as a parameter name to prevent shadowing the built-in; consider renaming it (e.g. artifactType).
This comment was generated because it violated a code review rule: mrule_jwFVvydpsvYdje26.
| return None | ||
|
|
||
| @staticmethod | ||
| async def get_file_from_env(file_path: str, env: BaseEnv) -> str: |
There was a problem hiding this comment.
The return type of get_file_from_env is declared as 'str' but it returns a tuple (content_bytes, mime_type); update the type annotation accordingly.
| async def get_file_from_env(file_path: str, env: BaseEnv) -> str: | |
| async def get_file_from_env(file_path: str, env: BaseEnv) -> tuple[bytes, str]: |
| @@ -0,0 +1,6 @@ | |||
| class FileNotFoundError(Exception): | |||
There was a problem hiding this comment.
Custom exception 'FileNotFoundError' conflicts with the built-in exception; consider renaming it (e.g. CustomFileNotFoundError) to avoid confusion.
This comment was generated because it violated a code review rule: mrule_jwFVvydpsvYdje26.
| ) | ||
|
|
||
| # Create router | ||
| router = APIRouter(prefix="/artifacts", tags=["artifacts"]) |
There was a problem hiding this comment.
Ensure new API routes and service functions (e.g. artifacts endpoints) are accompanied by proper unit tests.
This comment was generated because it violated a code review rule: mrule_q7uemN6whkfXoUH0.
| </DialogTrigger> | ||
| <DialogContent className="sm:max-w-[425px]"> | ||
| <DialogHeader> | ||
| <DialogTitle>Save Completion</DialogTitle> |
There was a problem hiding this comment.
The dialog title 'Save Completion' may be misleading; consider renaming it to 'Save Artifact' to match the feature purpose.
This comment was generated because it violated a code review rule: mrule_kO2c9rTcwkbqZtg4.
* refactor chatbox * refactor chatbox to separate component * improve UI to show menu and same layout for creations page * fix: show loader on the table * fix: new chat button not working * feat improve ui and view invoices and billings * move static links to config * fix: build errors
…i/panda-agi into feat/save_completions
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
feat(release): add pipeline to auto deploy on release
* fix: creation fallback web page * feat(fallback): don't show error of creations on the complete ui instead show on table area * fix: remove duplicate to separate component
s size of generated pdf text
fix: e2b strict version
* fix: excel file viewer * fix: requested improvements in code * refactor and move to utils
…ling - Added a new method `_is_breaking_tool` to check if a tool name or its alias corresponds to a breaking tool. - Updated the logic in the agent to utilize the new method for better clarity and maintainability. - Modified the `set_idle` tool registration to include additional aliases for improved handling of tool calls. - Temporarily disabled handling of unknown tools in the frontend component.
…hart components - Updated ChartRenderer to allow switching between bar, horizontal bar, and line chart types. - Enhanced BarChart to handle horizontal bar configurations, including custom scale settings for horizontal orientation. - Adjusted dependencies in useEffect for better performance and clarity.
* fix(csv): handle large csv files * fix: user worker to parse csv file
* add limit of 10 MB size to csv file * update error message * Update examples/ui/frontend/src/components/chatbox.tsx Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Update examples/ui/frontend/src/components/chatbox.tsx Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix: abort upload on new chat * remove extra
* feat(pro_user): remove branding for pro user * Update examples/ui/backend/pxml/dashboard_compiler.py Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: Gabriele Venturi <lele.venturi@gmail.com> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix: get creation user plan * Update examples/ui/backend/routes/artifacts.py Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix: csv scrolling issue * fix: make requested changes
* fix: csv scrolling issue * fix: make requested changes * sync table view to be same as of in dashboard * fix: maxheight prop
- Updated dashboard-core.js to extract column names from unique, min, and max formulas, allowing for both range and direct column name formats. - Added functionality in dynamic-filters.js to handle direct column name references in function calls, improving formula evaluation capabilities.
- Introduced `cleanNumericValue` function in both `charts.js` and `base-chart.tsx` to standardize the cleaning of numeric inputs by removing non-numeric characters and handling edge cases. - Updated data processing logic in `processChartData` and `processCSVData` to utilize the new cleaning function, ensuring more robust data handling for various chart types.
Important
This PR adds functionality to save markdown files from the UI to the backend, including new backend routes, services, and frontend components for artifact management.
artifacts.pyroute to handle artifact saving inroutes.ArtifactsServiceinservices/artifacts.pyto process markdown files and extract linked files.FilesServiceinservices/files.pyfor file path validation and retrieval.main.pyto includeartifactsrouter.SaveArtifactButtoncomponent insave-artifact-button.tsxfor saving artifacts from the UI.@radix-ui/react-dialogfor dialog management indialog.tsx.content-sidebar.tsxto include save button for markdown files.saveArtifactfunction inapi/artifacts.tsto handle API requests for saving artifacts.package.jsonto include@radix-ui/react-dialogdependency.This description was created by
for fd240e8. You can customize this summary. It will automatically update as commits are pushed.