Skip to content

Conversation

@jcheng5
Copy link
Collaborator

@jcheng5 jcheng5 commented Aug 6, 2024

Chat input is rendered like plain text today. With this change, it becomes Markdown, same as the output except raw HTML tags are escaped. I think this is pretty nice, especially for code, but if we want to be more like ChatGPT we could treat it as plaintext but preserve breaks. (Edit: @wch suggests we make this configurable)

I also made a subtle but important change to the NotifyException, it now chains the underlying exception (raise x from y). We should do a sweep sometime to make sure we do this everywhere; it's so hard to debug without being able to trace back to the original exception.

@jcheng5 jcheng5 requested a review from cpsievert August 6, 2024 04:30
@jcheng5
Copy link
Collaborator Author

jcheng5 commented Aug 6, 2024

The failing tests are real, at least some of them. Need to update the tests probably.

@wch
Copy link
Collaborator

wch commented Aug 28, 2024

Currently on this branch, when rendering a code block from user input, long lines get cut off to the left and there is no way to scroll. For example:

image

I don't know if this is the best solution, but I found that if I turn off align-self: flex-end, then the code displays more how I would expect:

image

@cpsievert
Copy link
Collaborator

cpsievert commented Aug 28, 2024

Thanks @wch, fixed via af655fb

@cpsievert
Copy link
Collaborator

Reviewed in person with Joe.

@cpsievert cpsievert merged commit 144ab69 into main Aug 29, 2024
@cpsievert cpsievert deleted the chat-tweaks branch August 29, 2024 17:46
schloerke added a commit to machow/py-shiny that referenced this pull request Sep 5, 2024
* main:
  CI(deploy): Add more installation configs to surface failure cause (posit-dev#1658)
  `Chat.messages()` no longer trims messages by default (posit-dev#1657)
  tests(controllers): Split _controls.py into separate files (posit-dev#1652)
  Chat tweaks (posit-dev#1607)
  docs: Add modal_show/remove examples (posit-dev#1628)
  Delay sending of chat UI messages until reactive graph is flushed (posit-dev#1593)
  ci(remove future behavior warning): Set the `asyncio_default_fixture_loop_scope` to `fixture` (posit-dev#1655)
  bug: Verify mypy can run on CI (posit-dev#1650)
  Fix CI install failures on Windows (posit-dev#1651)
  Quartodoc 0.7.6 (posit-dev#1636)
  Allow `@chat.transform_assistant_response` function to return `None` (posit-dev#1641)
  feat: Support templates with `_template.json` metadata (posit-dev#1631)
  Fix KeyError when serving static files (posit-dev#1648)
  tests(navsets): Add navsets kitchensink tests (posit-dev#1602)
  Change default claude model to 3.5 sonnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants