FlowFuse / FlowFuse/flowfuse

Cleanup expert store module

Open
#6,258 0 comments 0 reactions 0 assignees View on GitHub
area:ff-expert
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 20h
Merged PRs (30d)
149

Description

Parent issue: #6254

## Description
Cleanup expert store module

## Tasks
- [ ] Re-naming the received payload from the website into something more appropriate, current confusion between context received from website and context passed to rag agent
- [ ] Extract HYDRATE_MESSAGES mutator transformation into distinct and extensible transformer using the decorator/transformer pattern
- [ ] Remove expert api initSession from the module, only the chat method should be used moving forward, artefact of website implementation
- [ ] Cleanup unused actions
- [ ] Revisit async/sync state of actions based on return values
- [ ] Parametrize the ADD_MESSAGE mutation with a destructured object so we're aware of what properties it can support
- [ ] The handle message method initiates a new session id which it shouldn't that's handled by the backend. the only thing it should be doing is to start the session timer if no session id is present
- [ ] The backend will initiate the session id if one is not given to it
- [ ] Setting the session id should be done in the case one is not present when receiving a chat response

## Related Issues
- Parent: #6254

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.