@game_ryo/lsji 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
9
9
|
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0d1117; color: #e6edf3; }
|
|
10
10
|
</style>
|
|
11
|
-
<script type="module" crossorigin src="/assets/main-
|
|
11
|
+
<script type="module" crossorigin src="/assets/main-cTHaY04L.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/main-DNMVBaZA.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
@@ -22,7 +22,7 @@ function App() {
|
|
|
22
22
|
// Initialize socket connection
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
const newSocket = io(window.location.origin, {
|
|
25
|
-
transports: ['websocket',
|
|
25
|
+
transports: ['websocket'], // Use only websocket to avoid localStorage issues in private browsing
|
|
26
26
|
reconnection: true,
|
|
27
27
|
reconnectionAttempts: 10,
|
|
28
28
|
reconnectionDelay: 1000,
|
|
@@ -33,6 +33,16 @@ function App() {
|
|
|
33
33
|
console.log('Connected to LSJI server');
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
+
newSocket.on('connect_error', (err) => {
|
|
37
|
+
console.error('Socket connection error:', err.message);
|
|
38
|
+
// If websocket fails, try with polling as fallback
|
|
39
|
+
const transports = newSocket.io.opts.transports;
|
|
40
|
+
if (Array.isArray(transports) && transports.length === 1 && transports[0] === 'websocket') {
|
|
41
|
+
console.log('Retrying with polling transport...');
|
|
42
|
+
newSocket.io.opts.transports = ['polling', 'websocket'];
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
36
46
|
newSocket.on('disconnect', () => {
|
|
37
47
|
setConnected(false);
|
|
38
48
|
console.log('Disconnected from LSJI server');
|
|
@@ -65,6 +65,7 @@ function NewRunModal({ onClose, onStart }) {
|
|
|
65
65
|
const [maxTokens, setMaxTokens] = useState(100000);
|
|
66
66
|
const [hitlEnabled, setHitlEnabled] = useState(true);
|
|
67
67
|
const [submitting, setSubmitting] = useState(false);
|
|
68
|
+
const [error, setError] = useState('');
|
|
68
69
|
|
|
69
70
|
// Update model when provider changes
|
|
70
71
|
useEffect(() => {
|
|
@@ -88,6 +89,7 @@ function NewRunModal({ onClose, onStart }) {
|
|
|
88
89
|
if (!task.trim()) return;
|
|
89
90
|
|
|
90
91
|
setSubmitting(true);
|
|
92
|
+
setError('');
|
|
91
93
|
try {
|
|
92
94
|
await onStart({
|
|
93
95
|
task: task.trim(),
|
|
@@ -96,6 +98,8 @@ function NewRunModal({ onClose, onStart }) {
|
|
|
96
98
|
budget: { maxCostPerRun: maxCost, maxTokensPerRun: maxTokens },
|
|
97
99
|
hitl: { enabled: hitlEnabled },
|
|
98
100
|
});
|
|
101
|
+
} catch (err) {
|
|
102
|
+
setError(err.message || 'Failed to start run');
|
|
99
103
|
} finally {
|
|
100
104
|
setSubmitting(false);
|
|
101
105
|
}
|
|
@@ -108,6 +112,11 @@ function NewRunModal({ onClose, onStart }) {
|
|
|
108
112
|
<div className="modal" onClick={e => e.stopPropagation()}>
|
|
109
113
|
<h2 className="modal-title">Create New Agent Run</h2>
|
|
110
114
|
<form onSubmit={handleSubmit}>
|
|
115
|
+
{error && (
|
|
116
|
+
<div className="form-error" style={{color: 'var(--danger)', marginBottom: '12px', padding: '8px', background: 'rgba(255,0,0,0.1)', borderRadius: '4px', fontSize: '13px'}}>
|
|
117
|
+
{error}
|
|
118
|
+
</div>
|
|
119
|
+
)}
|
|
111
120
|
<div className="form-group">
|
|
112
121
|
<label className="form-label">Task Description *</label>
|
|
113
122
|
<textarea
|