fix: update run_manager on state changes (#2560)
* feat: update RunnableVerticesManager to include an update_run_state method * feat: refactor build_run_map method in RunnableVerticesManager This commit refactors the `build_run_map` method in the `RunnableVerticesManager` class. Instead of directly accessing the `graph` object, it now takes `predecessor_map` and `vertices_to_run` as parameters. This improves code readability and maintainability. * fix(state): set vertices_to_run and predecessor_map correctly when updating a state * fix: set inactive vertices to active when updating graph * fix: add conditions to avoid duplicated vertices in maps This commit fixes a bug in the Graph class where the predecessor and successor maps were not being updated correctly. The bug caused incorrect mapping of edges in the graph. This fix ensures that the maps are updated properly when adding edges to the graph. * refactor: fix vertex build response in chat.py This commit fixes the `build_vertex` function in `chat.py` to correctly handle the `VertexBuildResponse` object. The `inactivated_vertices`, `next_vertices_ids`, and `top_level_vertices` attributes are now converted to lists to remove any duplicate values. This ensures that the response object contains unique values for these attributes. The fix improves the accuracy and reliability of the vertex build process. * style(graph/base.py): update type annotations for predecessor_map and successor_map variables to improve code readability and maintain consistency * fix: uncomment code for stopping build in MenuBar component
This commit is contained in:
parent
64880850ce
commit
7abf697b7b
4 changed files with 36 additions and 22 deletions
|
|
@ -218,8 +218,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
|
|||
/>
|
||||
<div>{printByBuildStatus()}</div>
|
||||
</div>
|
||||
{/* Deactivating this until we find a better solution */}
|
||||
{/* <button
|
||||
<button
|
||||
disabled={!isBuilding}
|
||||
onClick={(_) => {
|
||||
if (isBuilding) {
|
||||
|
|
@ -237,7 +236,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
|
|||
>
|
||||
<IconComponent name="Square" className="h-4 w-4" />
|
||||
<span>Stop</span>
|
||||
</button> */}
|
||||
</button>
|
||||
</div>
|
||||
</ShadTooltip>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue