Skip to content

Commit 74b780d

Browse files
committed
better CSS for image URLs and images in Thought Process and Supporting Content
1 parent a960506 commit 74b780d

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

.github/chatmodes/fixer.chatmode.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ If you are running Python scripts that depend on installed requirements, you mus
3333
## Committing the change
3434

3535
When change is complete, offer to make a new branch, git commit, and pull request.
36+
(DO NOT check out a new branch unless explicitly confirmed - sometimes user is already in a branch)
3637
Make sure the PR follows the PULL_REQUEST_TEMPLATE.md format, with all sections filled out and appropriate checkboxes checked.

app/frontend/src/components/AnalysisPanel/AnalysisPanel.module.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77

88
.tList {
99
padding: 1.25em 1.25em 0 1.25em;
10-
display: inline-block;
10+
display: block; /* allow it to shrink within container */
1111
background: #e9e9e9;
12+
width: 100%;
13+
box-sizing: border-box;
14+
overflow-wrap: anywhere; /* aggressive wrapping for very long tokens/urls */
1215
}
1316

1417
.tListItem {
@@ -53,6 +56,12 @@
5356

5457
.tCodeBlock {
5558
max-height: 18.75em;
59+
overflow: auto;
60+
white-space: pre-wrap; /* allow wrapping */
61+
word-break: break-word;
62+
overflow-wrap: anywhere;
63+
width: 100%;
64+
box-sizing: border-box;
5665
}
5766

5867
.tPropRow {
@@ -71,6 +80,7 @@
7180
margin-bottom: 0.3em;
7281
word-break: break-word;
7382
white-space: normal;
83+
overflow-wrap: anywhere;
7484
}
7585

7686
.citationImg {

app/frontend/src/components/AnalysisPanel/ThoughtProcess.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ interface Props {
1818
// Helper to truncate URLs
1919
function truncateImageUrl(val: string) {
2020
if (typeof val === "string" && val.startsWith("data:image/")) {
21-
// Show only the first 30 chars and add ellipsis
2221
return val.slice(0, 30) + "...";
23-
} else if (typeof val === "string" && val.startsWith("http")) {
24-
const blobIndex = val.indexOf(".blob.core.windows.net/");
25-
return blobIndex !== -1 ? ".../" + val.slice(blobIndex + ".blob.core.windows.net/".length) : val;
2622
}
2723
return val;
2824
}

app/frontend/src/components/SupportingContent/SupportingContent.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@
3030

3131
.supportingContentItemImage {
3232
object-fit: contain;
33+
max-width: 100%;
34+
height: auto;
35+
display: block;
36+
margin: 0 auto; /* center if narrower */
3337
}

0 commit comments

Comments
 (0)