| 1050 | </div> |
| 1051 | ); |
| 1052 | const copyButton = (field: SessionCopyField, value: string) => { |
| 1053 | const copied = copiedSessionField === field; |
| 1054 | return ( |
| 1055 | <button |
| 1056 | type="button" |
| 1057 | title={copied ? "Copied" : `Copy ${field === "file" ? "file path" : "session ID"}`} |
| 1058 | onClick={() => handleCopySessionField(field, value)} |
| 1059 | style={{ |
| 1060 | alignSelf: "start", |
| 1061 | display: "inline-flex", |
| 1062 | alignItems: "center", |
| 1063 | justifyContent: "center", |
| 1064 | width: 22, |
| 1065 | height: 22, |
| 1066 | marginTop: -2, |
| 1067 | color: copied ? "var(--accent)" : "var(--text-dim)", |
| 1068 | background: "transparent", |
| 1069 | border: "1px solid var(--border)", |
| 1070 | borderRadius: 4, |
| 1071 | cursor: "pointer", |
| 1072 | flex: "0 0 auto", |
| 1073 | transition: "color 0.12s, border-color 0.12s, background 0.12s", |
| 1074 | }} |
| 1075 | onMouseEnter={(e) => { |
| 1076 | e.currentTarget.style.color = "var(--accent)"; |
| 1077 | e.currentTarget.style.borderColor = "var(--accent)"; |
| 1078 | e.currentTarget.style.background = "var(--bg-hover)"; |
| 1079 | }} |
| 1080 | onMouseLeave={(e) => { |
| 1081 | e.currentTarget.style.color = copied ? "var(--accent)" : "var(--text-dim)"; |
| 1082 | e.currentTarget.style.borderColor = "var(--border)"; |
| 1083 | e.currentTarget.style.background = "transparent"; |
| 1084 | }} |
| 1085 | > |
| 1086 | {copied ? ( |
| 1087 | <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"> |
| 1088 | <polyline points="20 6 9 17 4 12" /> |
| 1089 | </svg> |
| 1090 | ) : ( |
| 1091 | <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"> |
| 1092 | <rect x="9" y="9" width="13" height="13" rx="2" ry="2" /> |
| 1093 | <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" /> |
| 1094 | </svg> |
| 1095 | )} |
| 1096 | </button> |
| 1097 | ); |
| 1098 | }; |
| 1099 | const sessionInfoSection = ( |
| 1100 | <div style={{ minWidth: 0 }}> |
| 1101 | <div style={{ fontSize: 11, fontWeight: 700, color: "var(--text)", marginBottom: 6 }}>Session Info</div> |