Add RSA settings - #15
Conversation
afcf0c8 to
84e6a32
Compare
tbennun
left a comment
There was a problem hiding this comment.
A few unnecessary changes. This PR should be redone in the context of the FLASK-Copilot PR
| except (RuntimeError, Exception) as send_error: | ||
| logger.debug( |
There was a problem hiding this comment.
Isn't RuntimeError a subclass of Exception?
| ) | ||
| except (RuntimeError, Exception) as send_error: | ||
| logger.debug( | ||
| f"Could not send error to WebSocket (likely closed): {send_error}" |
There was a problem hiding this comment.
also, this should be logger.exception
| except (RuntimeError, Exception) as send_error: | ||
| logger.debug( | ||
| f"Could not send complete to WebSocket (likely closed): {send_error}" | ||
| ) |
There was a problem hiding this comment.
I don't see a reason to change any of these lines
| "message": {"source": source, "message": msg, **kwargs}, | ||
| } | ||
| ) | ||
| except (RuntimeError, Exception): |
There was a problem hiding this comment.
again, the two might not be necessary
| except (RuntimeError, Exception) as e: | ||
| # WebSocket is closed or disconnected - log to console but don't raise | ||
| logger.debug( | ||
| f"Could not send message to WebSocket (likely closed): {str(e)}" | ||
| ) |
There was a problem hiding this comment.
logger.exception and one Exception please
| # Unbind the websocket so we don't keep trying to send to it | ||
| self.websocket = None |
There was a problem hiding this comment.
This is a bad assumption that should be removed
There was a problem hiding this comment.
Looks like this is a duplicate of the FLASK-Copilot settings panel. I think this one is the only one that should exist, so the other one should be removed.
| useRsa?: boolean; | ||
| rsaMode?: 'standalone' | 'rag'; | ||
| rsaN?: number; | ||
| rsaK?: number; | ||
| rsaT?: number; |
There was a problem hiding this comment.
This means that the type changes in FLASK-Copilot are unnecessary
f140619 to
b8d712f
Compare
c3e5b2d to
d022c5d
Compare
89a7b13 to
b1416f6
Compare
tbennun
left a comment
There was a problem hiding this comment.
Too many unrelated changes
| except (RuntimeError, Exception) as send_error: | ||
| logger.debug( |
| ) | ||
| except (RuntimeError, Exception) as send_error: | ||
| logger.debug( | ||
| f"Could not send error to WebSocket (likely closed): {send_error}" |
| tb = "".join(traceback.format_exception(exc)) | ||
| msg = f"Background task failed with exception: {type(exc).__name__}: {tb}" | ||
| logger.error(msg) | ||
| await self.websocket.send_json( |
There was a problem hiding this comment.
Unrelated changes to the PR should be reverted and uploaded as a separate PR with sufficient reasoning and or a failing case.
| @@ -19,6 +24,11 @@ | |||
| "@typescript-eslint/semi": "warn", // Changes "semi" rule violations to warnings | |||
| "@typescript-eslint/quotes": ["warn", "double"], // Example of a rule with options as a warning | |||
| "@typescript-eslint/no-unused-vars": "warn", // Changes "no-unused-vars" to a warning | |||
| "@typescript-eslint/no-explicit-any": "warn" // Changes "no-explicit-any" to a warning - // eslint-disable-line @typescript-eslint/no-explicit-any | |||
| "@typescript-eslint/no-explicit-any": "warn", // Changes "no-explicit-any" to a warning - // eslint-disable-line @typescript-eslint/no-explicit-any | |||
| "react/react-in-jsx-scope": "off", | |||
| "react-hooks/rules-of-hooks": "warn", | |||
| "react/no-unescaped-entities": "warn", | |||
| "react/display-name": "warn", | |||
| "react/prop-types": "warn" | |||
There was a problem hiding this comment.
Why were these lines changed?
b1416f6 to
07a4dd4
Compare
Reverted non-RSA diffs. |
Summary
Add
RsaSettingsPanel: a reusable UI component for configuring Recursive Self-Aggregation (RSA) parameters. Imported byFLASK-Copilot's retrosynthesis tab.
Changes
lcc_ui_components/src/RsaSettingsPanel.tsx: new component: checkbox to enable RSA, mode selector (standalone / RAG), andvalidated N / K / T inputs (each ≥ 2, with K ≤ N)
lcc_ui_components/src/index.ts— export the new componentRelated PRs
import { RsaSettingsPanel } from 'lc-conductor')