fix: typing errors
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
* Utilities for creating an agent on the Letta API backend
|
||||
**/
|
||||
|
||||
import type { AgentType } from "@letta-ai/letta-client/resources/agents/agents";
|
||||
import type {
|
||||
AgentType,
|
||||
Block,
|
||||
BlockResponse,
|
||||
CreateBlock,
|
||||
} from "@letta-ai/letta-client/resources/agents/agents";
|
||||
} from "@letta-ai/letta-client/resources/blocks/blocks";
|
||||
import { settingsManager } from "../settings-manager";
|
||||
import { getToolNames } from "../tools/manager";
|
||||
import { getClient } from "./client";
|
||||
@@ -61,7 +61,7 @@ export async function createAgent(
|
||||
const localSharedBlockIds = projectSettings.localSharedBlockIds;
|
||||
|
||||
// Retrieve existing blocks (both global and local) and match them with defaults
|
||||
const existingBlocks = new Map<string, Block>();
|
||||
const existingBlocks = new Map<string, BlockResponse>();
|
||||
|
||||
// Load global blocks (persona, human)
|
||||
for (const [label, blockId] of Object.entries(globalSharedBlockIds)) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Loads memory blocks from .mdx files in src/agent/prompts
|
||||
*/
|
||||
|
||||
import type { CreateBlock } from "@letta-ai/letta-client/resources/agents/agents";
|
||||
import type { CreateBlock } from "@letta-ai/letta-client/resources/blocks/blocks";
|
||||
import { MEMORY_PROMPTS } from "./promptAssets";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
// src/cli/App.tsx
|
||||
|
||||
import type { MessageCreate } from "@letta-ai/letta-client/resources/agents/agents";
|
||||
import type {
|
||||
AgentState,
|
||||
MessageCreate,
|
||||
} from "@letta-ai/letta-client/resources/agents/agents";
|
||||
import type {
|
||||
ApprovalCreate,
|
||||
LettaMessageUnion,
|
||||
@@ -86,7 +89,7 @@ type StaticItem =
|
||||
id: string;
|
||||
snapshot: {
|
||||
continueSession: boolean;
|
||||
agentState?: Letta.AgentState | null;
|
||||
agentState?: AgentState | null;
|
||||
terminalWidth: number;
|
||||
};
|
||||
}
|
||||
@@ -102,7 +105,7 @@ export default function App({
|
||||
tokenStreaming = true,
|
||||
}: {
|
||||
agentId: string;
|
||||
agentState?: Letta.AgentState | null;
|
||||
agentState?: AgentState | null;
|
||||
loadingState?:
|
||||
| "assembling"
|
||||
| "upserting"
|
||||
@@ -1055,7 +1058,7 @@ export default function App({
|
||||
|
||||
try {
|
||||
// Find the selected model from models.json first (for loading message)
|
||||
const { models } = await import("../model");
|
||||
const { models } = await import("../agent/model");
|
||||
const selectedModel = models.find((m) => m.id === modelId);
|
||||
|
||||
if (!selectedModel) {
|
||||
|
||||
Reference in New Issue
Block a user