Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

The persona management dialog had no way to delete personas from the edit view. Users had to close the dialog and use the card menu.

Changes

  • PersonaForm.vue: Added delete button to dialog footer (left-aligned, error color, v-if="editingPersona")
  • PersonaForm.vue: Implemented deletePersona() method with confirmation dialog and API call to /api/persona/delete
  • PersonaForm.vue: Added deleted event emitter
  • PersonaManager.vue: Added handlePersonaDeleted() event handler to refresh persona list

Implementation

<!-- Dialog footer layout -->
<v-card-actions>
    <v-btn v-if="editingPersona" color="error" variant="text" @click="deletePersona">
        {{ tm('buttons.delete') }}
    </v-btn>
    <v-spacer />
    <v-btn color="grey" variant="text" @click="closeDialog">Cancel</v-btn>
    <v-btn color="primary" variant="flat" @click="savePersona">Save</v-btn>
</v-card-actions>

The delete button only appears when editing existing personas, not when creating new ones. Uses existing i18n translations and API endpoints. State management uses finally block to ensure cleanup on both success and error paths.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.soulter.top
    • Triggering command: /home/REDACTED/work/AstrBot/AstrBot/.venv/bin/python3 /home/REDACTED/work/AstrBot/AstrBot/.venv/bin/python3 main.py (dns block)
  • astrbot-registry.soulter.top
    • Triggering command: /home/REDACTED/work/AstrBot/AstrBot/.venv/bin/python3 /home/REDACTED/work/AstrBot/AstrBot/.venv/bin/python3 main.py (dns block)
  • models.dev
    • Triggering command: /home/REDACTED/work/AstrBot/AstrBot/.venv/bin/python3 /home/REDACTED/work/AstrBot/AstrBot/.venv/bin/python3 main.py (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

配置文件中的人格管理 Dialog 目前没有 删除人格按钮,帮我加上。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 9, 2026 03:41
- Added delete button to PersonaForm dialog (only visible when editing)
- Implemented deletePersona method with confirmation dialog
- Connected delete event to PersonaManager for proper handling
- Button positioned on left side of dialog actions for clear separation
- Uses existing i18n translations for delete button and messages

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
- Moved `this.saving = false` to finally block in deletePersona
- Ensures UI doesn't stay in saving state after errors
- Follows best practices for state management

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
Copilot AI changed the title [WIP] Add delete personality button in configuration dialog feat: add delete button to persona management dialog Feb 9, 2026
Copilot AI requested a review from Soulter February 9, 2026 03:47
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 9, 2026
@Soulter Soulter marked this pull request as ready for review February 9, 2026 03:54
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 9, 2026
@dosubot
Copy link

dosubot bot commented Feb 9, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added the feature:persona The bug / feature is about astrbot AI persona system (system prompt) label Feb 9, 2026
@Soulter Soulter merged commit 9c12803 into master Feb 9, 2026
5 checks passed
zouyonghe pushed a commit to zouyonghe/AstrBot that referenced this pull request Feb 9, 2026
* Initial plan

* feat: add delete button to persona management dialog

- Added delete button to PersonaForm dialog (only visible when editing)
- Implemented deletePersona method with confirmation dialog
- Connected delete event to PersonaManager for proper handling
- Button positioned on left side of dialog actions for clear separation
- Uses existing i18n translations for delete button and messages

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>

* fix: use finally block to ensure saving state is reset

- Moved `this.saving = false` to finally block in deletePersona
- Ensures UI doesn't stay in saving state after errors
- Follows best practices for state management

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature:persona The bug / feature is about astrbot AI persona system (system prompt) lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants