gui: remove cut/copy/paste from prompt input
- Remove cut/copy/paste menu items from context menu
- Remove paste button (📋) from input row
- Remove B1+B2/B1+B3 chord handling for cut/paste
- Simplify mouse handling to just B2=exec, B3=plumb
- Standard Ctrl+X/C/V still work via TextArea defaults
This commit is contained in:
parent
c2df632744
commit
eb09a95a64
|
|
@ -406,7 +406,7 @@ Item {
|
||||||
if (!ollie.activeSessionId) return "No session"
|
if (!ollie.activeSessionId) return "No session"
|
||||||
if (!ollie.activeAgentId) return "No agent"
|
if (!ollie.activeAgentId) return "No agent"
|
||||||
if (ollie.activeSessionPaused) return "Session paused"
|
if (ollie.activeSessionPaused) return "Session paused"
|
||||||
return "B1=sel B2=exec B3=plumb B1+B2=cut B1+B3=paste"
|
return "B1=sel B2=exec B3=plumb"
|
||||||
}
|
}
|
||||||
enabled: ollie.daemonConnected && ollie.activeSessionId !== "" && ollie.activeAgentId !== "" && !ollie.activeSessionPaused
|
enabled: ollie.daemonConnected && ollie.activeSessionId !== "" && ollie.activeAgentId !== "" && !ollie.activeSessionPaused
|
||||||
wrapMode: TextEdit.Wrap
|
wrapMode: TextEdit.Wrap
|
||||||
|
|
@ -432,12 +432,10 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Acme-style mouse chording overlay
|
// Acme-style mouse handling overlay
|
||||||
// B1 = select (handled by TextArea)
|
// B1 = select (handled by TextArea)
|
||||||
// B2 = execute selection
|
// B2 = execute selection
|
||||||
// B3 = plumb selection / context menu
|
// B3 = plumb selection / context menu
|
||||||
// B1+B2 = cut (snarf)
|
|
||||||
// B1+B3 = paste
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: chordArea
|
id: chordArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -445,46 +443,12 @@ Item {
|
||||||
propagateComposedEvents: true
|
propagateComposedEvents: true
|
||||||
cursorShape: Qt.IBeamCursor
|
cursorShape: Qt.IBeamCursor
|
||||||
|
|
||||||
// Track if B1 (left) is currently held for chord detection
|
|
||||||
property bool leftHeld: false
|
|
||||||
|
|
||||||
// We can't directly detect B1 here since TextArea handles it,
|
|
||||||
// but we can check mouse.buttons in the handlers
|
|
||||||
onPressed: function(mouse) {
|
|
||||||
// Check if this is a chord (B1 already held)
|
|
||||||
if (mouse.buttons & Qt.LeftButton) {
|
|
||||||
leftHeld = true
|
|
||||||
if (mouse.button === Qt.MiddleButton) {
|
|
||||||
// B1+B2 = cut
|
|
||||||
promptInput.cut()
|
|
||||||
mouse.accepted = true
|
|
||||||
return
|
|
||||||
} else if (mouse.button === Qt.RightButton) {
|
|
||||||
// B1+B3 = paste
|
|
||||||
promptInput.paste()
|
|
||||||
mouse.accepted = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
leftHeld = false
|
|
||||||
mouse.accepted = false // Let it propagate for non-chord
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: function(mouse) {
|
onClicked: function(mouse) {
|
||||||
// Only handle non-chord clicks
|
|
||||||
if (leftHeld) {
|
|
||||||
leftHeld = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mouse.button === Qt.MiddleButton) {
|
if (mouse.button === Qt.MiddleButton) {
|
||||||
// B2: Execute selection as prompt
|
// B2: Execute selection as prompt
|
||||||
var sel = promptInput.selectedText
|
var sel = promptInput.selectedText
|
||||||
if (sel && sel.trim() !== "") {
|
if (sel && sel.trim() !== "") {
|
||||||
ollie.submit(sel.trim())
|
ollie.submit(sel.trim())
|
||||||
} else {
|
|
||||||
// No selection - paste from clipboard and execute?
|
|
||||||
// Or just ignore. For now, ignore.
|
|
||||||
}
|
}
|
||||||
} else if (mouse.button === Qt.RightButton) {
|
} else if (mouse.button === Qt.RightButton) {
|
||||||
// B3: Plumb selection or show context menu
|
// B3: Plumb selection or show context menu
|
||||||
|
|
@ -496,10 +460,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onReleased: {
|
|
||||||
leftHeld = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
|
|
@ -521,22 +481,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuSeparator {}
|
MenuSeparator {}
|
||||||
MenuItem {
|
|
||||||
text: "Cut (B1+B2)"
|
|
||||||
enabled: promptInput.selectedText.length > 0
|
|
||||||
onTriggered: promptInput.cut()
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: "Copy"
|
|
||||||
enabled: promptInput.selectedText.length > 0
|
|
||||||
onTriggered: promptInput.copy()
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: "Paste (B1+B3)"
|
|
||||||
enabled: promptInput.canPaste
|
|
||||||
onTriggered: promptInput.paste()
|
|
||||||
}
|
|
||||||
MenuSeparator {}
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Select All"
|
text: "Select All"
|
||||||
onTriggered: promptInput.selectAll()
|
onTriggered: promptInput.selectAll()
|
||||||
|
|
@ -544,19 +488,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paste button (mouse-first workflow)
|
|
||||||
ToolButton {
|
|
||||||
text: "📋"
|
|
||||||
font.pixelSize: 14
|
|
||||||
implicitWidth: 36
|
|
||||||
implicitHeight: 36
|
|
||||||
Layout.alignment: Qt.AlignBottom
|
|
||||||
enabled: promptInput.enabled
|
|
||||||
onClicked: promptInput.paste()
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: "Paste from clipboard"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send button (larger touch target)
|
// Send button (larger touch target)
|
||||||
Button {
|
Button {
|
||||||
text: "▶"
|
text: "▶"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue