diff options
Diffstat (limited to 'Omni/Jr.hs')
| -rw-r--r-- | Omni/Jr.hs | 32 |
1 files changed, 0 insertions, 32 deletions
@@ -24,7 +24,6 @@ import qualified Omni.Test as Test import qualified System.Console.Docopt as Docopt import qualified System.Directory as Directory import System.Environment (withArgs) -import qualified System.Environment as Env import qualified System.Exit as Exit import System.FilePath (takeFileName) import qualified System.IO as IO @@ -53,7 +52,6 @@ Usage: jr web [--port=PORT] jr review [<task-id>] [--auto] jr loop [--delay=SECONDS] - jr merge-driver <ours> <theirs> jr test jr (-h | --help) @@ -63,7 +61,6 @@ Commands: web Start the web UI server review Review a completed task (show diff, accept/reject) loop Run autonomous work+review loop - merge-driver Internal git merge driver Options: -h --help Show this help @@ -117,37 +114,8 @@ move args Just d -> fromMaybe 5 (readMaybe d) Nothing -> 5 runLoop delay - | args `Cli.has` Cli.command "merge-driver" = mergeDriver args | otherwise = putText (str <| Docopt.usage help) -mergeDriver :: Cli.Arguments -> IO () -mergeDriver args = do - ours <- getArgOrExit args (Cli.argument "ours") - theirs <- getArgOrExit args (Cli.argument "theirs") - - -- Set TASK_DB_PATH to ours (the file git provided as the current version) - -- Since we are no longer using git-tracked tasks.jsonl, this merge driver logic needs rethinking. - -- If the merge driver is called, it means git found a conflict in .tasks/tasks.jsonl, but we deleted it. - -- So this code might be dead, or we might be dealing with legacy files during a rebase. - -- For now, we'll keep the logic but be aware it's likely unused. - Env.setEnv "TASK_DB_PATH" ours - -- TaskCore.importTasks theirs - -- Task.importTasks theirs - - -- We need to call task import via CLI or library. - -- Omni.Task.importTasks IS NOT EXPOSED. - -- But we can call Task.main - withArgs ["import", "-i", theirs] Task.main - Exit.exitSuccess - -getArgOrExit :: Cli.Arguments -> Docopt.Option -> IO String -getArgOrExit args opt = - case Cli.getArg args opt of - Just val -> pure val - Nothing -> do - putText <| "Error: Missing required argument " <> Text.pack (show opt) - Exit.exitFailure - -- | Run the autonomous loop: work -> review -> repeat runLoop :: Int -> IO () runLoop delaySec = do |
