---
title: "Composer action"
description: "composer-action là action gọn do app sở hữu, nằm cạnh control của chat input. Nó phù hợp để mở UI hoặc bắt đầu workflow của app."
url: "https://sotaagents.ai/vi/manual/developer-guide/composer-actions"
generated_by: "sotaagents-ldp"
docs_index: "https://sotaagents.ai/manual/llms.txt"
locale: "vi"
---

# Composer action

`composer-action` là action gọn do app sở hữu, nằm cạnh control của chat input. Nó phù hợp để mở UI hoặc bắt đầu workflow của app.

YAML

```
contributes:
  ui:
    - id: report-action
      kind: nativeModule
      surface: composer-action
      slot: chat.composer.actions
      module:
        entry: dist/ui/app.js
        export: ReportAction
```

TSX

```
import { useAppContext } from '@sota/platform';

export function ReportAction() {
  const { ui } = useAppContext();
  return <button type="button" onClick={() => ui.openArtifact('reports.viewer')}>Reports</button>;
}
```

`useComposer` cố ý không dùng được ở đây. Nếu UI cần đọc hoặc sửa draft, hãy khai báo `composer-panel`; không truy cập Core private stores.
