Skip to content

Conversation

ayylemao
Copy link
Contributor

@ayylemao ayylemao commented Aug 12, 2025

From #2335
Simple clear of user env before writing to db with .chainlit/config.toml default parameter

Also changed: API key fields in frontend are now masked for improved security.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. backend Pertains to the Python backend. enhancement New feature or request labels Aug 12, 2025
@hayescode
Copy link
Contributor

@ayylemao I feel like this should be user controllable

@ayylemao
Copy link
Contributor Author

ayylemao commented Aug 13, 2025

@ayylemao I feel like this should be user controllable

Makes sense.
Both are now options in the config.toml:

# Set to true to store user env vars in DB, false to exclude them for security
persist_user_env = false

# Whether to mask user environment variables (API keys) in the UI with password type
# Set to true to show API keys as ***, false to show them as plain text
mask_user_env = false

@ayylemao
Copy link
Contributor Author

I have resolved the conflicts.
Can you review it and then merge and close?
@hayescode
Regards

@hayescode
Copy link
Contributor

@ayylemao small ruff formatting issue.

@ayylemao
Copy link
Contributor Author

If i run ruff locally with uv run ruff in the backend forlder i get that all checks pass.
Could you help me finding out whats wrong so we can get this PR finnally closed? 😄
@hayescode

@hayescode
Copy link
Contributor

Try running the commands from the CI like uv run ruff format --check and run uv format .

https://github.com/Chainlit/chainlit/blob/main/.github%2Fworkflows%2Flint-backend.yaml#L24-L32

@ayylemao
Copy link
Contributor Author

i hope this last commit fixes it
@hayescode

@hayescode hayescode added this pull request to the merge queue Aug 26, 2025
Merged via the queue into Chainlit:main with commit 9e77d8e Aug 26, 2025
9 checks passed
zhou-san pushed a commit to zhou-san/chainlit that referenced this pull request Aug 28, 2025
From Chainlit#2335 
Simple clear of user env before writing to db with .chainlit/config.toml
default parameter

**Also changed:** API key fields in frontend are now masked for improved
security.

---------

Co-authored-by: Matthias Vogler <[email protected]>
Co-authored-by: Josh Hayes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Pertains to the Python backend. enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants