Skip to content

Commit 2e472a2

Browse files
committed
fix(lens): use { args: ... } in mutation calls for lens-client API
Fixed remaining mutation calls using { input: ... } pattern. Changes: - App.tsx: demoteBashMutate uses { args: ... } - useAIConfig.ts: saveConfigMutate uses { args: ... } - BashDetail.tsx: killBashMutate, promoteBashMutate use { args: ... } - BashList.tsx: killBashMutate uses { args: ... } - InputSection.tsx: demoteBashMutate uses { args: ... }
1 parent c758f29 commit 2e472a2

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

packages/code/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function AppContent() {
5555
if (key.ctrl && input === "b") {
5656
const active = activeBashQuery.data as { id: string } | null;
5757
if (active) {
58-
demoteBashMutate({ input: { bashId: active.id } }).catch((err: Error) => {
58+
demoteBashMutate({ args: { bashId: active.id } }).catch((err: Error) => {
5959
console.error("[App] Failed to demote active bash:", err);
6060
});
6161
}

packages/code/src/hooks/client/useAIConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function useAIConfig() {
7575
const saveConfig = useCallback(
7676
async (config: AIConfig) => {
7777
try {
78-
const result = await saveConfigMutate({ input: { config } }) as { success: boolean; error?: string };
78+
const result = await saveConfigMutate({ args: { config } }) as { success: boolean; error?: string };
7979

8080
if (result.success) {
8181
setAIConfig(config);

packages/code/src/screens/BashDetail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default function BashDetail({ bashId, onClose }: BashDetailProps) {
6767

6868
// Kill bash
6969
if (input === "K") {
70-
killBashMutate({ input: { bashId } })
70+
killBashMutate({ args: { bashId } })
7171
.then(() => {
7272
// Reload process info
7373
bashQuery.refetch();
@@ -79,7 +79,7 @@ export default function BashDetail({ bashId, onClose }: BashDetailProps) {
7979
// Promote to active
8080
if (input === "A") {
8181
if (!process?.isActive && process?.status === "running") {
82-
promoteBashMutate({ input: { bashId } })
82+
promoteBashMutate({ args: { bashId } })
8383
.then(() => {
8484
// Reload process info
8585
bashQuery.refetch();

packages/code/src/screens/BashList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default function BashList({ onClose, onSelectBash }: BashListProps) {
118118
if (char === "K") {
119119
const selectedProc = processes[selection.selectedIndex];
120120
if (selectedProc) {
121-
killBashMutate({ input: { bashId: selectedProc.id } })
121+
killBashMutate({ args: { bashId: selectedProc.id } })
122122
.then(() => bashListQuery.refetch())
123123
.catch((error) => console.error("[BashList] Failed to kill:", error));
124124
}

packages/code/src/screens/chat/components/InputSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ export function InputSection({
439439
// Use query data and mutation to demote active bash
440440
const active = activeBashQuery.data as { id: string } | null;
441441
if (active) {
442-
demoteBashMutate({ input: { bashId: active.id } }).catch((error: any) => {
442+
demoteBashMutate({ args: { bashId: active.id } }).catch((error: any) => {
443443
console.error("[InputSection] Failed to demote active bash:", error);
444444
});
445445
}

0 commit comments

Comments
 (0)