@inkeep/agents-cli 0.64.8 → 0.64.10
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.
|
@@ -3,7 +3,7 @@ import { ConflictView } from "./conflict-view.js";
|
|
|
3
3
|
import { HelpBar } from "./help-bar.js";
|
|
4
4
|
import { ResolutionSummary } from "./resolution-summary.js";
|
|
5
5
|
import { Box, Text, useApp, useInput } from "ink";
|
|
6
|
-
import { useEffect,
|
|
6
|
+
import { useEffect, useReducer } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/pull-v4/merge-ui/merge-app.tsx
|
|
@@ -107,7 +107,7 @@ function MergeApp({ conflicts }) {
|
|
|
107
107
|
const { exit } = useApp();
|
|
108
108
|
const [state, dispatch] = useReducer(mergeReducer, conflicts, createInitialState);
|
|
109
109
|
const isEmpty = conflicts.length === 0;
|
|
110
|
-
const allChangedColumns =
|
|
110
|
+
const allChangedColumns = conflicts.map(getChangedColumns);
|
|
111
111
|
const currentConflict = isEmpty ? void 0 : conflicts[state.currentConflictIndex];
|
|
112
112
|
const isRowLevelOnly = currentConflict?.ours === null || currentConflict?.theirs === null;
|
|
113
113
|
const currentChangedColumns = allChangedColumns[state.currentConflictIndex] ?? [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-app.js","names":[],"sources":["../../../../src/commands/pull-v4/merge-ui/merge-app.tsx"],"sourcesContent":["import type { ConflictItem, ConflictResolution } from '@inkeep/agents-core';\nimport { Box, Text, useApp, useInput } from 'ink';\nimport { useEffect, useMemo, useReducer } from 'react';\nimport { ConflictView } from './conflict-view';\nimport { HelpBar } from './help-bar';\nimport { ResolutionSummary } from './resolution-summary';\nimport type { ConflictResolutionState, MergeAction, MergeState, Side } from './types';\nimport { diffTypeColor, formatDiffType, formatEntityId, getChangedColumns } from './utils';\n\nfunction createInitialState(conflicts: ConflictItem[]): MergeState {\n return {\n phase: 'resolving',\n currentConflictIndex: 0,\n focusedColumnIndex: -1,\n resolutions: conflicts.map(\n (): ConflictResolutionState => ({\n rowDefaultPick: 'ours',\n columnOverrides: {},\n })\n ),\n };\n}\n\nfunction mergeReducer(state: MergeState, action: MergeAction): MergeState {\n switch (action.type) {\n case 'SET_ROW_DEFAULT': {\n const resolutions = [...state.resolutions];\n resolutions[state.currentConflictIndex] = {\n rowDefaultPick: action.side,\n columnOverrides: {},\n };\n return { ...state, resolutions };\n }\n case 'SET_COLUMN_PICK': {\n const resolutions = [...state.resolutions];\n const current = resolutions[state.currentConflictIndex];\n resolutions[state.currentConflictIndex] = {\n ...current,\n columnOverrides: {\n ...current.columnOverrides,\n [action.column]: action.side,\n },\n };\n return { ...state, resolutions };\n }\n case 'FOCUS_UP':\n return { ...state, focusedColumnIndex: state.focusedColumnIndex - 1 };\n case 'FOCUS_DOWN':\n return { ...state, focusedColumnIndex: state.focusedColumnIndex + 1 };\n case 'NEXT_CONFLICT': {\n const nextIndex = state.currentConflictIndex + 1;\n if (nextIndex >= action.totalConflicts) {\n return { ...state, phase: 'summary' };\n }\n return { ...state, currentConflictIndex: nextIndex, focusedColumnIndex: -1 };\n }\n case 'PREV_CONFLICT': {\n if (state.currentConflictIndex <= 0) return state;\n return {\n ...state,\n currentConflictIndex: state.currentConflictIndex - 1,\n focusedColumnIndex: -1,\n };\n }\n case 'GO_BACK_TO_RESOLVING':\n return {\n ...state,\n phase: 'resolving',\n currentConflictIndex: action.lastConflictIndex,\n focusedColumnIndex: -1,\n };\n case 'CONFIRM':\n return { ...state, phase: 'confirmed' };\n case 'CANCEL':\n return { ...state, phase: 'cancelled' };\n }\n}\n\nfunction buildResolutions(\n conflicts: ConflictItem[],\n resolutions: ConflictResolutionState[],\n allChangedColumns: string[][]\n): ConflictResolution[] {\n return conflicts.map((conflict, i) => {\n const res = resolutions[i];\n const changedCols = allChangedColumns[i];\n const columns: Record<string, Side> = {};\n for (const col of changedCols) {\n columns[col] = res.columnOverrides[col] ?? res.rowDefaultPick;\n }\n return {\n table: conflict.table,\n primaryKey: conflict.primaryKey,\n rowDefaultPick: res.rowDefaultPick,\n columns,\n };\n });\n}\n\ninterface MergeAppProps {\n conflicts: ConflictItem[];\n}\n\nexport function MergeApp({ conflicts }: MergeAppProps) {\n const { exit } = useApp();\n const [state, dispatch] = useReducer(mergeReducer, conflicts, createInitialState);\n const isEmpty = conflicts.length === 0;\n\n const allChangedColumns = useMemo(() => conflicts.map(getChangedColumns), [conflicts]);\n\n const currentConflict = isEmpty ? undefined : conflicts[state.currentConflictIndex];\n const isRowLevelOnly = currentConflict?.ours === null || currentConflict?.theirs === null;\n const currentChangedColumns = allChangedColumns[state.currentConflictIndex] ?? [];\n const maxColumnIndex = currentChangedColumns.length - 1;\n\n useEffect(() => {\n if (isEmpty) {\n exit([]);\n return;\n }\n if (state.phase === 'confirmed') {\n exit(buildResolutions(conflicts, state.resolutions, allChangedColumns));\n } else if (state.phase === 'cancelled') {\n exit(null);\n }\n }, [isEmpty, state.phase, conflicts, state.resolutions, allChangedColumns, exit]);\n\n useInput((input, key) => {\n if (isEmpty) return;\n\n if (key.escape || input === 'q') {\n dispatch({ type: 'CANCEL' });\n return;\n }\n\n if (state.phase === 'summary') {\n if (key.return) {\n dispatch({ type: 'CONFIRM' });\n }\n if (input === 'b' || input === 'p') {\n dispatch({ type: 'GO_BACK_TO_RESOLVING', lastConflictIndex: conflicts.length - 1 });\n }\n return;\n }\n\n if (state.phase !== 'resolving') return;\n\n if (!isRowLevelOnly) {\n if (key.upArrow || input === 'k') {\n if (state.focusedColumnIndex > -1) {\n dispatch({ type: 'FOCUS_UP' });\n }\n }\n if (key.downArrow || input === 'j') {\n if (state.focusedColumnIndex < maxColumnIndex) {\n dispatch({ type: 'FOCUS_DOWN' });\n }\n }\n }\n\n if (input === '1' || input === 'l' || key.leftArrow) {\n if (isRowLevelOnly || state.focusedColumnIndex === -1) {\n dispatch({ type: 'SET_ROW_DEFAULT', side: 'ours' });\n } else {\n dispatch({\n type: 'SET_COLUMN_PICK',\n column: currentChangedColumns[state.focusedColumnIndex],\n side: 'ours',\n });\n }\n }\n if (input === '2' || input === 'r' || key.rightArrow) {\n if (isRowLevelOnly || state.focusedColumnIndex === -1) {\n dispatch({ type: 'SET_ROW_DEFAULT', side: 'theirs' });\n } else {\n dispatch({\n type: 'SET_COLUMN_PICK',\n column: currentChangedColumns[state.focusedColumnIndex],\n side: 'theirs',\n });\n }\n }\n\n if (key.return || input === 'n') {\n dispatch({ type: 'NEXT_CONFLICT', totalConflicts: conflicts.length });\n }\n if (input === 'p') {\n dispatch({ type: 'PREV_CONFLICT' });\n }\n });\n\n if (isEmpty) return null;\n\n const conflictListHeader = (\n <Box flexDirection=\"column\" marginBottom={1}>\n <Text color=\"yellow\">{conflicts.length} conflict(s) found:</Text>\n {conflicts.map((c, i) => {\n const entity = formatEntityId(c.primaryKey);\n return (\n <Text key={`${c.table}-${entity}`}>\n {' '}\n {i + 1}. <Text color=\"cyan\">{c.table}</Text> <Text bold>{entity}</Text>\n {' local: '}\n <Text color={diffTypeColor(c.ourDiffType)}>{formatDiffType(c.ourDiffType)}</Text>\n {' | remote: '}\n <Text color={diffTypeColor(c.theirDiffType)}>{formatDiffType(c.theirDiffType)}</Text>\n </Text>\n );\n })}\n </Box>\n );\n\n if (state.phase === 'summary') {\n return (\n <Box flexDirection=\"column\">\n {conflictListHeader}\n <ResolutionSummary\n conflicts={conflicts}\n resolutions={state.resolutions}\n allChangedColumns={allChangedColumns}\n />\n </Box>\n );\n }\n\n return (\n <Box flexDirection=\"column\">\n {conflictListHeader}\n <ConflictView\n conflict={conflicts[state.currentConflictIndex]}\n resolution={state.resolutions[state.currentConflictIndex]}\n changedColumns={currentChangedColumns}\n focusedColumnIndex={state.focusedColumnIndex}\n conflictIndex={state.currentConflictIndex}\n totalConflicts={conflicts.length}\n />\n <HelpBar phase=\"resolving\" />\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;AASA,SAAS,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E,YAAY;MAAQ;IAChF;IACD,oBAAC;KAAK,OAAO,cAAc,EAAE,cAAc;eAAG,eAAe,EAAE,cAAc;MAAQ;QAN5E,GAAG,EAAE,MAAM,GAAG,SAOlB;IAET;GACE;AAGR,KAAI,MAAM,UAAU,UAClB,QACE,qBAAC;EAAI,eAAc;aAChB,oBACD,oBAAC;GACY;GACX,aAAa,MAAM;GACA;IACnB;GACE;AAIV,QACE,qBAAC;EAAI,eAAc;;GAChB;GACD,oBAAC;IACC,UAAU,UAAU,MAAM;IAC1B,YAAY,MAAM,YAAY,MAAM;IACpC,gBAAgB;IAChB,oBAAoB,MAAM;IAC1B,eAAe,MAAM;IACrB,gBAAgB,UAAU;KAC1B;GACF,oBAAC,WAAQ,OAAM,cAAc;;GACzB"}
|
|
1
|
+
{"version":3,"file":"merge-app.js","names":[],"sources":["../../../../src/commands/pull-v4/merge-ui/merge-app.tsx"],"sourcesContent":["import type { ConflictItem, ConflictResolution } from '@inkeep/agents-core';\nimport { Box, Text, useApp, useInput } from 'ink';\nimport { useEffect, useReducer } from 'react';\nimport { ConflictView } from './conflict-view';\nimport { HelpBar } from './help-bar';\nimport { ResolutionSummary } from './resolution-summary';\nimport type { ConflictResolutionState, MergeAction, MergeState, Side } from './types';\nimport { diffTypeColor, formatDiffType, formatEntityId, getChangedColumns } from './utils';\n\nfunction createInitialState(conflicts: ConflictItem[]): MergeState {\n return {\n phase: 'resolving',\n currentConflictIndex: 0,\n focusedColumnIndex: -1,\n resolutions: conflicts.map(\n (): ConflictResolutionState => ({\n rowDefaultPick: 'ours',\n columnOverrides: {},\n })\n ),\n };\n}\n\nfunction mergeReducer(state: MergeState, action: MergeAction): MergeState {\n switch (action.type) {\n case 'SET_ROW_DEFAULT': {\n const resolutions = [...state.resolutions];\n resolutions[state.currentConflictIndex] = {\n rowDefaultPick: action.side,\n columnOverrides: {},\n };\n return { ...state, resolutions };\n }\n case 'SET_COLUMN_PICK': {\n const resolutions = [...state.resolutions];\n const current = resolutions[state.currentConflictIndex];\n resolutions[state.currentConflictIndex] = {\n ...current,\n columnOverrides: {\n ...current.columnOverrides,\n [action.column]: action.side,\n },\n };\n return { ...state, resolutions };\n }\n case 'FOCUS_UP':\n return { ...state, focusedColumnIndex: state.focusedColumnIndex - 1 };\n case 'FOCUS_DOWN':\n return { ...state, focusedColumnIndex: state.focusedColumnIndex + 1 };\n case 'NEXT_CONFLICT': {\n const nextIndex = state.currentConflictIndex + 1;\n if (nextIndex >= action.totalConflicts) {\n return { ...state, phase: 'summary' };\n }\n return { ...state, currentConflictIndex: nextIndex, focusedColumnIndex: -1 };\n }\n case 'PREV_CONFLICT': {\n if (state.currentConflictIndex <= 0) return state;\n return {\n ...state,\n currentConflictIndex: state.currentConflictIndex - 1,\n focusedColumnIndex: -1,\n };\n }\n case 'GO_BACK_TO_RESOLVING':\n return {\n ...state,\n phase: 'resolving',\n currentConflictIndex: action.lastConflictIndex,\n focusedColumnIndex: -1,\n };\n case 'CONFIRM':\n return { ...state, phase: 'confirmed' };\n case 'CANCEL':\n return { ...state, phase: 'cancelled' };\n }\n}\n\nfunction buildResolutions(\n conflicts: ConflictItem[],\n resolutions: ConflictResolutionState[],\n allChangedColumns: string[][]\n): ConflictResolution[] {\n return conflicts.map((conflict, i) => {\n const res = resolutions[i];\n const changedCols = allChangedColumns[i];\n const columns: Record<string, Side> = {};\n for (const col of changedCols) {\n columns[col] = res.columnOverrides[col] ?? res.rowDefaultPick;\n }\n return {\n table: conflict.table,\n primaryKey: conflict.primaryKey,\n rowDefaultPick: res.rowDefaultPick,\n columns,\n };\n });\n}\n\ninterface MergeAppProps {\n conflicts: ConflictItem[];\n}\n\nexport function MergeApp({ conflicts }: MergeAppProps) {\n const { exit } = useApp();\n const [state, dispatch] = useReducer(mergeReducer, conflicts, createInitialState);\n const isEmpty = conflicts.length === 0;\n\n const allChangedColumns = conflicts.map(getChangedColumns);\n\n const currentConflict = isEmpty ? undefined : conflicts[state.currentConflictIndex];\n const isRowLevelOnly = currentConflict?.ours === null || currentConflict?.theirs === null;\n const currentChangedColumns = allChangedColumns[state.currentConflictIndex] ?? [];\n const maxColumnIndex = currentChangedColumns.length - 1;\n\n useEffect(() => {\n if (isEmpty) {\n exit([]);\n return;\n }\n if (state.phase === 'confirmed') {\n exit(buildResolutions(conflicts, state.resolutions, allChangedColumns));\n } else if (state.phase === 'cancelled') {\n exit(null);\n }\n }, [isEmpty, state.phase, conflicts, state.resolutions, allChangedColumns, exit]);\n\n useInput((input, key) => {\n if (isEmpty) return;\n\n if (key.escape || input === 'q') {\n dispatch({ type: 'CANCEL' });\n return;\n }\n\n if (state.phase === 'summary') {\n if (key.return) {\n dispatch({ type: 'CONFIRM' });\n }\n if (input === 'b' || input === 'p') {\n dispatch({ type: 'GO_BACK_TO_RESOLVING', lastConflictIndex: conflicts.length - 1 });\n }\n return;\n }\n\n if (state.phase !== 'resolving') return;\n\n if (!isRowLevelOnly) {\n if (key.upArrow || input === 'k') {\n if (state.focusedColumnIndex > -1) {\n dispatch({ type: 'FOCUS_UP' });\n }\n }\n if (key.downArrow || input === 'j') {\n if (state.focusedColumnIndex < maxColumnIndex) {\n dispatch({ type: 'FOCUS_DOWN' });\n }\n }\n }\n\n if (input === '1' || input === 'l' || key.leftArrow) {\n if (isRowLevelOnly || state.focusedColumnIndex === -1) {\n dispatch({ type: 'SET_ROW_DEFAULT', side: 'ours' });\n } else {\n dispatch({\n type: 'SET_COLUMN_PICK',\n column: currentChangedColumns[state.focusedColumnIndex],\n side: 'ours',\n });\n }\n }\n if (input === '2' || input === 'r' || key.rightArrow) {\n if (isRowLevelOnly || state.focusedColumnIndex === -1) {\n dispatch({ type: 'SET_ROW_DEFAULT', side: 'theirs' });\n } else {\n dispatch({\n type: 'SET_COLUMN_PICK',\n column: currentChangedColumns[state.focusedColumnIndex],\n side: 'theirs',\n });\n }\n }\n\n if (key.return || input === 'n') {\n dispatch({ type: 'NEXT_CONFLICT', totalConflicts: conflicts.length });\n }\n if (input === 'p') {\n dispatch({ type: 'PREV_CONFLICT' });\n }\n });\n\n if (isEmpty) return null;\n\n const conflictListHeader = (\n <Box flexDirection=\"column\" marginBottom={1}>\n <Text color=\"yellow\">{conflicts.length} conflict(s) found:</Text>\n {conflicts.map((c, i) => {\n const entity = formatEntityId(c.primaryKey);\n return (\n <Text key={`${c.table}-${entity}`}>\n {' '}\n {i + 1}. <Text color=\"cyan\">{c.table}</Text> <Text bold>{entity}</Text>\n {' local: '}\n <Text color={diffTypeColor(c.ourDiffType)}>{formatDiffType(c.ourDiffType)}</Text>\n {' | remote: '}\n <Text color={diffTypeColor(c.theirDiffType)}>{formatDiffType(c.theirDiffType)}</Text>\n </Text>\n );\n })}\n </Box>\n );\n\n if (state.phase === 'summary') {\n return (\n <Box flexDirection=\"column\">\n {conflictListHeader}\n <ResolutionSummary\n conflicts={conflicts}\n resolutions={state.resolutions}\n allChangedColumns={allChangedColumns}\n />\n </Box>\n );\n }\n\n return (\n <Box flexDirection=\"column\">\n {conflictListHeader}\n <ConflictView\n conflict={conflicts[state.currentConflictIndex]}\n resolution={state.resolutions[state.currentConflictIndex]}\n changedColumns={currentChangedColumns}\n focusedColumnIndex={state.focusedColumnIndex}\n conflictIndex={state.currentConflictIndex}\n totalConflicts={conflicts.length}\n />\n <HelpBar phase=\"resolving\" />\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;AASA,SAAS,mBAAmB,WAAuC;AACjE,QAAO;EACL,OAAO;EACP,sBAAsB;EACtB,oBAAoB;EACpB,aAAa,UAAU,WACW;GAC9B,gBAAgB;GAChB,iBAAiB,EAAE;GACpB,EACF;EACF;;AAGH,SAAS,aAAa,OAAmB,QAAiC;AACxE,SAAQ,OAAO,MAAf;EACE,KAAK,mBAAmB;GACtB,MAAM,cAAc,CAAC,GAAG,MAAM,YAAY;AAC1C,eAAY,MAAM,wBAAwB;IACxC,gBAAgB,OAAO;IACvB,iBAAiB,EAAE;IACpB;AACD,UAAO;IAAE,GAAG;IAAO;IAAa;;EAElC,KAAK,m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B,gBAAgB,UAAU;KAC1B;GACF,oBAAC,WAAQ,OAAM,cAAc;;GACzB"}
|
package/dist/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-cli",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.10",
|
|
4
4
|
"description": "Inkeep CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"tsx": "^4.20.5",
|
|
40
40
|
"yaml": "^2.7.0",
|
|
41
41
|
"zod": "^4.3.6",
|
|
42
|
-
"@inkeep/agents-core": "^0.64.
|
|
43
|
-
"@inkeep/agents-sdk": "^0.64.
|
|
42
|
+
"@inkeep/agents-core": "^0.64.10",
|
|
43
|
+
"@inkeep/agents-sdk": "^0.64.10"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/degit": "^2.8.6",
|