fix: preserve the conversational workspace contract#988
Open
radu-mocanu wants to merge 2 commits into
Open
Conversation
71d3890 to
54a15ed
Compare
There was a problem hiding this comment.
Pull request overview
This PR tightens the “conversational workspace” contract by ensuring assistant-side workspace files are excluded from LLM-visible history while preserving normal assistant attachments, and by making conversational advanced-agent state handling explicit and safer.
Changes:
- Update message mapping to skip only assistant workspace file content-parts (via
metadata.fileKind == "workspace"or stablews-content-part IDs), while still producing attachments for ordinary assistant files. - Remove mutable Pydantic defaults in advanced-agent graph state/output models and fail fast when conversational exchange state wasn’t captured.
- Decouple runtime modules from agent modules by moving the shared
ClientSideToolInfotype into a neutral module.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Bumps locked package version to 0.14.8. |
| pyproject.toml | Bumps project version to 0.14.8. |
| tests/runtime/test_chat_message_mapper_workspace.py | Expands coverage to ensure only workspace-marked assistant file parts are hidden and ordinary assistant attachments remain. |
| src/uipath_langchain/runtime/messages.py | Implements workspace-file detection (metadata + ws- ID fallback) and skips only assistant workspace file parts. |
| src/uipath_langchain/runtime/runtime.py | Switches to importing ClientSideToolInfo from the new neutral types module. |
| src/uipath_langchain/agent/tools/client_side_tool.py | Removes the local TypedDict definition and imports the shared ClientSideToolInfo. |
| src/uipath_langchain/agent/advanced/types.py | Replaces mutable defaults with Field(default_factory=...) for graph state. |
| src/uipath_langchain/agent/advanced/agent.py | Makes conversational wrapper output/state handling explicit; raises a structured error if state capture is missing. |
| src/uipath_langchain/_client_side_tool_types.py | Adds a shared, neutral ClientSideToolInfo TypedDict. |
54a15ed to
cf67632
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Validation