Commit cbbc025
Address remaining CodeRabbit review feedback for streaming and rendering.
- Use distinct 3-tuple ('complete', text, messages) for completion events
to avoid ambiguity with ('tool_use', [...]) 2-tuples in chat streaming.
- Pass conversation history from request into chat_with_database_stream()
so follow-up NLQ turns retain context.
- Add re.IGNORECASE to SQL fence regex for case-insensitive matching.
- Render MarkdownContent as block element instead of span to avoid
invalid DOM when response contains paragraphs, lists, or tables.
- Keep stop notice as a separate message instead of appending to partial
markdown, preventing it from being swallowed by open code fences.
- Snapshot streamingIdRef before setMessages in error handler to avoid
race condition where ref is cleared before React executes the updater.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 288ac98 commit cbbc025
4 files changed
Lines changed: 48 additions & 21 deletions
File tree
- web/pgadmin
- llm
- tools/sqleditor
- static/js/components/sections
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2875 | 2875 | | |
2876 | 2876 | | |
2877 | 2877 | | |
| 2878 | + | |
2878 | 2879 | | |
2879 | 2880 | | |
2880 | 2881 | | |
| |||
2885 | 2886 | | |
2886 | 2887 | | |
2887 | 2888 | | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
2888 | 2893 | | |
2889 | 2894 | | |
2890 | 2895 | | |
| |||
2893 | 2898 | | |
2894 | 2899 | | |
2895 | 2900 | | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
2896 | 2911 | | |
2897 | 2912 | | |
2898 | 2913 | | |
2899 | 2914 | | |
2900 | 2915 | | |
2901 | 2916 | | |
2902 | | - | |
| 2917 | + | |
| 2918 | + | |
2903 | 2919 | | |
2904 | 2920 | | |
2905 | 2921 | | |
| |||
2916 | 2932 | | |
2917 | 2933 | | |
2918 | 2934 | | |
2919 | | - | |
2920 | | - | |
2921 | | - | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
2922 | 2939 | | |
2923 | 2940 | | |
2924 | 2941 | | |
2925 | 2942 | | |
2926 | 2943 | | |
2927 | | - | |
| 2944 | + | |
2928 | 2945 | | |
2929 | 2946 | | |
2930 | 2947 | | |
| |||
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
| 553 | + | |
554 | 554 | | |
555 | | - | |
556 | 555 | | |
557 | 556 | | |
558 | 557 | | |
| |||
882 | 881 | | |
883 | 882 | | |
884 | 883 | | |
885 | | - | |
| 884 | + | |
| 885 | + | |
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
891 | | - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
892 | 896 | | |
893 | 897 | | |
894 | 898 | | |
| |||
912 | 916 | | |
913 | 917 | | |
914 | 918 | | |
915 | | - | |
| 919 | + | |
916 | 920 | | |
917 | 921 | | |
918 | 922 | | |
919 | 923 | | |
920 | 924 | | |
921 | | - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
922 | 930 | | |
923 | 931 | | |
924 | 932 | | |
| |||
1043 | 1051 | | |
1044 | 1052 | | |
1045 | 1053 | | |
1046 | | - | |
| 1054 | + | |
| 1055 | + | |
1047 | 1056 | | |
1048 | | - | |
| 1057 | + | |
1049 | 1058 | | |
1050 | 1059 | | |
1051 | 1060 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
| 331 | + | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
0 commit comments