-
Notifications
You must be signed in to change notification settings - Fork 47
feat(save): save markdown and websites from UI for chat creations #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Changes requested ❌
Reviewed everything up to fd240e8 in 2 minutes and 14 seconds. Click for details.
- Reviewed
753
lines of code in11
files - Skipped
1
files when reviewing. - Skipped posting
1
draft 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]> 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.py
route to handle artifact saving inroutes
.ArtifactsService
inservices/artifacts.py
to process markdown files and extract linked files.FilesService
inservices/files.py
for file path validation and retrieval.main.py
to includeartifacts
router.SaveArtifactButton
component insave-artifact-button.tsx
for saving artifacts from the UI.@radix-ui/react-dialog
for dialog management indialog.tsx
.content-sidebar.tsx
to include save button for markdown files.saveArtifact
function inapi/artifacts.ts
to handle API requests for saving artifacts.package.json
to include@radix-ui/react-dialog
dependency.This description was created by
for fd240e8. You can customize this summary. It will automatically update as commits are pushed.