Enable and fix /buddy command
The /buddy command was completely disabled by bun:bundle feature('BUDDY')
flag which evaluates to false at runtime. Removed all feature('BUDDY')
checks across the codebase to register the command, and added keyboard
event handling (q/Enter to dismiss) which was missing from the UI.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { c as _c } from "react/compiler-runtime";
|
||||
import { feature } from 'bun:bundle';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useNotifications } from '../context/notifications.js';
|
||||
import { Text } from '../ink.js';
|
||||
@@ -50,9 +49,6 @@ export function useBuddyNotification() {
|
||||
let t1;
|
||||
if ($[0] !== addNotification || $[1] !== removeNotification) {
|
||||
t0 = () => {
|
||||
if (!feature("BUDDY")) {
|
||||
return;
|
||||
}
|
||||
const config = getGlobalConfig();
|
||||
if (config.companion || !isBuddyTeaserWindow()) {
|
||||
return;
|
||||
@@ -80,7 +76,6 @@ export function findBuddyTriggerPositions(text: string): Array<{
|
||||
start: number;
|
||||
end: number;
|
||||
}> {
|
||||
if (!feature('BUDDY')) return [];
|
||||
const triggers: Array<{
|
||||
start: number;
|
||||
end: number;
|
||||
|
||||
Reference in New Issue
Block a user