Commit 2307535
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 b210c08 commit 2307535
File tree
4 files changed
+48
-21
lines changed- web/pgadmin
- llm
- tools/sqleditor
- static/js/components/sections
- tests
4 files changed
+48
-21
lines changed| 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 | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
531 | 531 | | |
532 | | - | |
533 | 532 | | |
534 | 533 | | |
535 | 534 | | |
| |||
859 | 858 | | |
860 | 859 | | |
861 | 860 | | |
862 | | - | |
| 861 | + | |
| 862 | + | |
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
868 | | - | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
869 | 873 | | |
870 | 874 | | |
871 | 875 | | |
| |||
889 | 893 | | |
890 | 894 | | |
891 | 895 | | |
892 | | - | |
| 896 | + | |
893 | 897 | | |
894 | 898 | | |
895 | 899 | | |
896 | 900 | | |
897 | 901 | | |
898 | | - | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
899 | 907 | | |
900 | 908 | | |
901 | 909 | | |
| |||
1020 | 1028 | | |
1021 | 1029 | | |
1022 | 1030 | | |
1023 | | - | |
| 1031 | + | |
| 1032 | + | |
1024 | 1033 | | |
1025 | | - | |
| 1034 | + | |
1026 | 1035 | | |
1027 | 1036 | | |
1028 | 1037 | | |
| |||
| 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