refactor(app): introduce attachment storage layer and draft lifecycle management
Replace inline data-URL image handling with a persistent attachment storage service, add draft lifecycle states (active/abandoned/sent) with generation tracking, and update fetchAgent to return project placement alongside agent snapshots.
This commit is contained in:
@@ -79,8 +79,8 @@ export async function runAllowCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
const agent = await client.fetchAgent(agentIdOrPrefix)
|
||||
if (!agent) {
|
||||
const fetchResult = await client.fetchAgent(agentIdOrPrefix)
|
||||
if (!fetchResult) {
|
||||
await client.close()
|
||||
const error: CommandError = {
|
||||
code: 'AGENT_NOT_FOUND',
|
||||
@@ -89,6 +89,7 @@ export async function runAllowCommand(
|
||||
}
|
||||
throw error
|
||||
}
|
||||
const agent = fetchResult.agent
|
||||
const resolvedAgentId = agent.id
|
||||
|
||||
// Get pending permissions for this agent
|
||||
|
||||
@@ -45,8 +45,8 @@ export async function runDenyCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
const agent = await client.fetchAgent(agentIdOrPrefix)
|
||||
if (!agent) {
|
||||
const fetchResult = await client.fetchAgent(agentIdOrPrefix)
|
||||
if (!fetchResult) {
|
||||
await client.close()
|
||||
const error: CommandError = {
|
||||
code: 'AGENT_NOT_FOUND',
|
||||
@@ -55,6 +55,7 @@ export async function runDenyCommand(
|
||||
}
|
||||
throw error
|
||||
}
|
||||
const agent = fetchResult.agent
|
||||
const resolvedAgentId = agent.id
|
||||
|
||||
// Get pending permissions for this agent
|
||||
|
||||
Reference in New Issue
Block a user