const { apiError, apiSuccess, requestAssist } = require('./requestAssist.js')

async function getTodoItems({ message = '' } = {}) {
  try {
    const result = await requestAssist({
      intent: 'getTodoItems',
      domain: 'overview',
      message,
    })
    return apiSuccess(result, result.reply || '已读取你的待办摘要。')
  } catch (error) {
    return apiError(error, '待办摘要读取失败')
  }
}

module.exports = getTodoItems
