Skip to Content
DocsPluginsComparisonChangelog
0
DocsChangelog

More

Discussionsllms.txtllms-full.txt
Getting startedWhat is concivComparisonRequirementsPlaygroundExamplesAPI reference

Engine and widgetSessionsHarnessesTools and code modeAgents and permissionsSkills

Use conciv
Bundlers
Agents
PluginsBuild your first plugin
Add a toolAsk for permissionAdd a skillShare an RPC methodCall from a terminalAdd a panelSlot or pillAdd settingsTest your plugin
Plugin API reference
PluginsGuides

Add a slot or composer pill

Put a small piece of your plugin at a fixed place in the widget, or a pill above the composer.

A slot puts your content at a fixed place in the widget, such as a session's status area. A pill sits above the composer. It runs an action when the user clicks it. You write the browser part in Solid, React, Preact or plain DOM.

In React and Preact the code lives in your app. Give it to <ConcivWidget> as in Build your first plugin.

Copy this prompt into your agent. It builds this in your project from this page.

Prompt
Build this in my project with conciv. conciv is a dev-only AI agent widget, and it already runs in my app.

1. Read https://conciv.dev/docs/plugins/guides/slot-pill.md and follow it. It is the source of truth for the API.
2. If the project has the conciv-develop skill (conciv init installs it with the @conciv/skills docs pack), load it too.
3. Add a slot in the conciv panel, or a pill above the composer, from my plugin.
4. If I did not say what it should do, ask me before you write code.
5. Write the browser part in the UI framework my app uses. For React or Preact, put it in my app with @conciv/react or @conciv/preact and give it to <ConcivWidget>, as the page shows. For anything else, use Solid in the plugin folder and build it as the page shows.
6. Install only the packages the page lists, with the package manager this project uses.
7. Tell me where to look for it in the conciv panel.
8. When you are done, tell me what you changed and how to see it.

Add a slot

Add a slot in your plugin's browser part:

conciv/plugins/status/plugin-experimental.tsx
import {Plugin, } from '@conciv/frontend-plugin-api'

export default Plugin.({
  () {
    .(, {
      : 'session.status', // <- the place in the widget
      : () => <>{...() === 'running' ? 'Agent working' : 'Agent idle'}</>,
    })
  },
})

run.status() is a Solid signal, so a React component does not draw again when it changes. Pass a function to ctx.add instead. The widget runs it again when the status changes:

src/conciv/status.tsx
import {, type Plugin} from '@conciv/frontend-plugin-api'
import {} from '@conciv/react'

function () {
  return <>Agent working</>
}

function () {
  return <>Agent idle</>
}

const :  = {
const :  = {

export const : Plugin.
  .
}

run.status() is a Solid signal, so a Preact component does not draw again when it changes. Pass a function to ctx.add instead. The widget runs it again when the status changes:

src/conciv/status.tsx
import {, type Plugin} from '@conciv/frontend-plugin-api'
import {} from '@conciv/preact'

function () {
  return <>Agent working</>
}

function () {
  return <>Agent idle</>
}

const :  = {
const :  = {

export const : Plugin.
  .
}

run.status() is a Solid signal, so subscribe does not call you when it changes. Pass a function to ctx.add instead. The widget runs it again when the status changes:

conciv/plugins/status/plugin-experimental.ts
import {, Plugin, } from '@conciv/frontend-plugin-api'

function (: string):  {
  return {
    : 'session.status', // <- the place in the widget
    
      const  = .(.
      . = 
      return () => .()
    }),
  }
}

const  = ('Agent working')
const  = ('Agent idle')

export default Plugin.
  () {
    .
  },
})

render draws the content once. Read input.session where you use it, so it follows the session on screen. The places a slot can go:

  • session.header: a session's header.
  • session.status: a session's status area.
  • window.bottom: the bottom of the widget window.
  • page.overlay: over your app's page, outside the widget. It keeps keyboard focus inside, unless you set hides: false.

Build or wire it as in Build or wire the browser part, then reload.

Add a pill above the composer

A pill can put text in the composer for the user to send. It draws no UI of its own, so the code is the same in every tab. Only where it lives changes:

conciv/plugins/status/plugin-experimental.tsx
import {













src/conciv/status.ts
import {











src/conciv/status.ts
import {











conciv/plugins/status/plugin-experimental.ts
import {













A few things to notice:

  • show returns what the pill looks like, or undefined to hide it. It runs once per composer on screen.
  • icon is a name from the widget's icon set. The names are lucide names.
  • run is what a click does. Here it puts a prompt in the composer. The user sends it.

Build or wire it as in Build or wire the browser part, then reload.

Show something only some of the time

Pass a function to ctx.add. The widget runs it again when what it reads changes. Returning undefined adds nothing:

conciv/plugins/status/plugin-experimental.tsx
import {Plugin, } from '@conciv/frontend-plugin-api'

export default




src/conciv/status.tsx
import










src/conciv/status.tsx
import










conciv/plugins/status/plugin-experimental.ts
import {














ctx.app.channel is the widget's release channel. Build or wire it as in Build or wire the browser part, then reload.

Next steps

  • Add a panel: a whole tab next to the chat.
  • Add settings: let the user switch your slot on and off.

Add a panel

Add a tab to the session's pane, next to the chat, and draw your plugin's own screen in it.

Add settings

Read options from the project's conciv config, and add a setting the user changes in the widget.

On this page

Add a slotAdd a pill above the composerShow something only some of the timeNext steps
Edit on GitHubView .mdOpen in ClaudeOpen in ChatGPT
:
((
)
=>
{
(
'span'
))
({
(
, ()
=>
(
.
.
()?.
.
()
===
'running'
?
:
))
,
Plugin
}
from
'@conciv/frontend-plugin-api'
export default Plugin.
() {
.
: 'review',
: 20, // <- sorts it among the other pills
: () => ({
: 'Review',
: 'eye',
: () => ...
}),
})
},
})
,
type
Plugin
}
from
'@conciv/frontend-plugin-api'
export const : Plugin.
.
: 'review',
: 20, // <- sorts it among the other pills
: () => ({
: 'Review',
: 'eye',
: () => ...
}),
})
}
,
type
Plugin
}
from
'@conciv/frontend-plugin-api'
export const : Plugin.
.
: 'review',
: 20, // <- sorts it among the other pills
: () => ({
: 'Review',
: 'eye',
: () => ...
}),
})
}
,
Plugin
}
from
'@conciv/frontend-plugin-api'
export default Plugin.
() {
.
: 'review',
: 20, // <- sorts it among the other pills
: () => ({
: 'Review',
: 'eye',
: () => ...
}),
})
},
})
Plugin
.
({
() {
const : = {
.
},
})
{
,
type
Plugin
}
from
'@conciv/frontend-plugin-api'
import {} from '@conciv/react'
function () {
return <>Dev build</>
}
const : = {
export const : Plugin.
.
}
{
,
type
Plugin
}
from
'@conciv/frontend-plugin-api'
import {} from '@conciv/preact'
function () {
return <>Dev build</>
}
const : = {
export const : Plugin.
.
}
,
Plugin
,
}
from
'@conciv/frontend-plugin-api'
const : = {
: 'window.bottom',
const = .(.
. = 'Dev build'
return () => .()
}),
}
export default Plugin.
() {
.
},
})
:
'session.status'
,
:
(
)}
// <- the place in the widget
:
'session.status'
,
:
(
)}
=
(
)
=>
{
(
, ()
=>
(
.
.
()?.
.
()
===
'running'
?
:
))
:
'session.status'
,
:
(
)}
// <- the place in the widget
:
'session.status'
,
:
(
)}
=
(
)
=>
{
(
, ()
=>
(
.
.
()?.
.
()
===
'running'
?
:
))
({
(
, {
(
'Review my last change and list what could break.'
),
=
(
)
=>
{
(
, {
(
'Review my last change and list what could break.'
),
=
(
)
=>
{
(
, {
(
'Review my last change and list what could break.'
),
({
(
, {
(
'Review my last change and list what could break.'
),
:
'window.bottom'
,
: ()
=>
<
>Dev build</
>}
(
, ()
=>
(
.
.
===
'dev'
?
:
))
// <- only in a dev build
:
'window.bottom'
,
:
(
)}
=
(
)
=>
{
(
, ()
=>
(
.
.
===
'dev'
?
:
))
// <- only in a dev build
:
'window.bottom'
,
:
(
)}
=
(
)
=>
{
(
, ()
=>
(
.
.
===
'dev'
?
:
))
// <- only in a dev build
:
((
)
=>
{
(
'span'
))
({
(
, ()
=>
(
.
.
===
'dev'
?
:
))
// <- only in a dev build