cowork-dash 0.1.8__py3-none-any.whl → 0.2.0__py3-none-any.whl
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.
- cowork_dash/agent.py +32 -11
- cowork_dash/app.py +888 -81
- cowork_dash/assets/app.js +34 -0
- cowork_dash/assets/styles.css +788 -697
- cowork_dash/canvas.py +8 -0
- cowork_dash/cli.py +9 -0
- cowork_dash/components.py +398 -55
- cowork_dash/config.py +12 -1
- cowork_dash/file_utils.py +65 -9
- cowork_dash/layout.py +2 -2
- cowork_dash/sandbox.py +361 -0
- cowork_dash/tools.py +734 -79
- {cowork_dash-0.1.8.dist-info → cowork_dash-0.2.0.dist-info}/METADATA +1 -1
- cowork_dash-0.2.0.dist-info/RECORD +23 -0
- cowork_dash-0.1.8.dist-info/RECORD +0 -22
- {cowork_dash-0.1.8.dist-info → cowork_dash-0.2.0.dist-info}/WHEEL +0 -0
- {cowork_dash-0.1.8.dist-info → cowork_dash-0.2.0.dist-info}/entry_points.txt +0 -0
- {cowork_dash-0.1.8.dist-info → cowork_dash-0.2.0.dist-info}/licenses/LICENSE +0 -0
cowork_dash/assets/app.js
CHANGED
|
@@ -118,6 +118,40 @@ if (typeof window.mermaidObserver === 'undefined') {
|
|
|
118
118
|
attachMermaidObserver();
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
// Prevent clicks on "Add to Canvas" buttons from toggling the collapsible
|
|
122
|
+
// We need to intercept the toggle event on the details element, not the click
|
|
123
|
+
(function initAddToCanvasButtons() {
|
|
124
|
+
function setupButtonHandlers() {
|
|
125
|
+
// Track if button was clicked to prevent details toggle
|
|
126
|
+
let buttonClicked = false;
|
|
127
|
+
|
|
128
|
+
// When button is clicked, set flag (uses capture to run first)
|
|
129
|
+
document.addEventListener('click', function(e) {
|
|
130
|
+
const button = e.target.closest('.add-to-canvas-btn');
|
|
131
|
+
if (button) {
|
|
132
|
+
buttonClicked = true;
|
|
133
|
+
// Reset flag after a short delay to allow for the toggle event
|
|
134
|
+
setTimeout(() => { buttonClicked = false; }, 50);
|
|
135
|
+
}
|
|
136
|
+
}, true);
|
|
137
|
+
|
|
138
|
+
// Intercept the toggle event on details elements
|
|
139
|
+
document.addEventListener('toggle', function(e) {
|
|
140
|
+
if (buttonClicked && e.target.classList.contains('display-inline-container')) {
|
|
141
|
+
// Button was clicked, prevent the toggle by reverting it
|
|
142
|
+
// The toggle has already happened, so we need to undo it
|
|
143
|
+
e.target.open = !e.target.open;
|
|
144
|
+
}
|
|
145
|
+
}, true);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (document.readyState === 'loading') {
|
|
149
|
+
document.addEventListener('DOMContentLoaded', setupButtonHandlers);
|
|
150
|
+
} else {
|
|
151
|
+
setupButtonHandlers();
|
|
152
|
+
}
|
|
153
|
+
})();
|
|
154
|
+
|
|
121
155
|
// Auto-scroll chat messages to bottom
|
|
122
156
|
(function initChatAutoScroll() {
|
|
123
157
|
let chatMessages = null;
|