mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-02 05:08:48 +02:00
[Haik]: ckpt (right click in dash triggers marquee drag) (if click enter while a single agent card is selected in dash -> triggers expand/collapse) (also btw that g workspace issue still exists in prod)
This commit is contained in:
@@ -618,7 +618,10 @@ async def _discover_mcp_tools_stdio(command: str, args: list[str] | None = None,
|
||||
proc.terminate()
|
||||
await asyncio.wait_for(proc.wait(), timeout=5.0)
|
||||
except Exception:
|
||||
proc.kill()
|
||||
try:
|
||||
proc.kill()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
@tools_lib.router.post("/{tool_id}/discover")
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "openswarm",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "openswarm",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"electron-updater": "^6.3.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "openswarm",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "OpenSwarm — AI Agent Orchestrator",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -214,6 +214,7 @@ const AgentCard: React.FC<Props> = ({
|
||||
const justDraggedRef = useRef(false);
|
||||
|
||||
const handleDragPointerDown = useCallback((e: React.PointerEvent) => {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
dragState.current = { startX: e.clientX, startY: e.clientY, origX: cardX, origY: cardY };
|
||||
@@ -274,6 +275,7 @@ const AgentCard: React.FC<Props> = ({
|
||||
|
||||
const handleResizeDown = useCallback(
|
||||
(dir: ResizeDir) => (e: React.PointerEvent) => {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const effectiveW = Math.max(cardWidth, MIN_W);
|
||||
|
||||
@@ -376,6 +376,7 @@ const BrowserCard: React.FC<Props> = ({
|
||||
const justDraggedRef = useRef(false);
|
||||
|
||||
const handleDragPointerDown = useCallback((e: React.PointerEvent) => {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
dragState.current = { startX: e.clientX, startY: e.clientY, origX: cardX, origY: cardY };
|
||||
@@ -431,6 +432,7 @@ const BrowserCard: React.FC<Props> = ({
|
||||
|
||||
const handleResizeDown = useCallback(
|
||||
(dir: ResizeDir) => (e: React.PointerEvent) => {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
resizeRef.current = {
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
generateTitle,
|
||||
resumeSession,
|
||||
setExpandedSessionIds,
|
||||
toggleExpandSession,
|
||||
} from '@/shared/state/agentsSlice';
|
||||
import type { AgentConfig } from '@/shared/state/agentsSlice';
|
||||
import {
|
||||
@@ -159,11 +160,17 @@ const DashboardInner: React.FC = () => {
|
||||
canvas.handlers.onMouseDown(e);
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.button === 2) {
|
||||
e.preventDefault();
|
||||
selection.handleCanvasMouseDown(e.nativeEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.button !== 0) return;
|
||||
if (isCardTarget(e.target, e.currentTarget)) return;
|
||||
|
||||
if (isElementSelectMode) {
|
||||
// Cmd/Ctrl held → allow panning even in element select mode
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
canvas.handlers.onMouseDown(e);
|
||||
}
|
||||
@@ -348,6 +355,21 @@ const DashboardInner: React.FC = () => {
|
||||
return () => window.removeEventListener('keydown', handleShortcut);
|
||||
}, [newAgentShortcut]);
|
||||
|
||||
useEffect(() => {
|
||||
const handleEnter = (e: KeyboardEvent) => {
|
||||
if (e.key !== 'Enter') return;
|
||||
const tag = (e.target as HTMLElement)?.tagName;
|
||||
if (tag === 'INPUT' || tag === 'TEXTAREA' || (e.target as HTMLElement)?.isContentEditable) return;
|
||||
if (selection.selectedIds.size !== 1) return;
|
||||
const [id, type] = selection.selectedIds.entries().next().value!;
|
||||
if (type !== 'agent') return;
|
||||
e.preventDefault();
|
||||
dispatch(toggleExpandSession(id));
|
||||
};
|
||||
window.addEventListener('keydown', handleEnter);
|
||||
return () => window.removeEventListener('keydown', handleEnter);
|
||||
}, [selection.selectedIds, dispatch]);
|
||||
|
||||
const handleNewAgent = useCallback(() => {
|
||||
setToolbarOpen(true);
|
||||
}, []);
|
||||
@@ -508,6 +530,7 @@ const DashboardInner: React.FC = () => {
|
||||
onMouseDown={handleViewportMouseDown}
|
||||
onMouseMove={handleViewportMouseMove}
|
||||
onMouseUp={handleViewportMouseUp}
|
||||
onContextMenu={(e) => e.preventDefault()}
|
||||
sx={{
|
||||
position: 'absolute',
|
||||
inset: 0,
|
||||
|
||||
@@ -80,6 +80,7 @@ const DashboardViewCard: React.FC<Props> = ({
|
||||
const justDraggedRef = useRef(false);
|
||||
|
||||
const handleDragPointerDown = useCallback((e: React.PointerEvent) => {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
dragState.current = { startX: e.clientX, startY: e.clientY, origX: cardX, origY: cardY };
|
||||
@@ -135,6 +136,7 @@ const DashboardViewCard: React.FC<Props> = ({
|
||||
|
||||
const handleResizeDown = useCallback(
|
||||
(dir: ResizeDir) => (e: React.PointerEvent) => {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
resizeRef.current = {
|
||||
|
||||
@@ -155,7 +155,7 @@ export function useDashboardSelection(
|
||||
|
||||
const handleCanvasMouseDown = useCallback(
|
||||
(e: MouseEvent) => {
|
||||
if (e.button !== 0) return;
|
||||
if (e.button !== 0 && e.button !== 2) return;
|
||||
|
||||
marqueeOriginRef.current = { screenX: e.clientX, screenY: e.clientY };
|
||||
isDraggingMarqueeRef.current = false;
|
||||
|
||||
Reference in New Issue
Block a user