npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@daflow-ui/ui-agent-chat-input

v0.1.0

Published

Agent chat input component for DaFlow UI

Downloads

129

Readme

@daflow-ui/ui-agent-chat-input

Agent / AI 对话场景输入组件。

Installation

pnpm add @daflow-ui/ui-agent-chat-input

Usage

全局引入样式(在 main.ts 中):

import '@daflow-ui/ui-agent-chat-input/style.css';

在组件中使用:

<script setup lang="ts">
import { ref } from 'vue';
import { DfAgentChatInput, type ChatModelOption } from '@daflow-ui/ui-agent-chat-input';

const message = ref('');
const model = ref('gpt-4.1');

const models: ChatModelOption[] = [
  { label: 'GPT-4.1', value: 'gpt-4.1' },
  { label: 'GPT-4o-mini', value: 'gpt-4o-mini' }
];
</script>

<template>
  <DfAgentChatInput
    v-model="message"
    v-model:model="model"
    :model-options="models"
    :min-rows="2"
    :max-rows="4"
    @submit="console.log"
  />
</template>

Public Surface

  • Props:modelValuemodelmodelOptionsminRowsmaxRowsdisabledsubmittingplaceholder
  • Emits:update:modelValueupdate:modelsubmit
  • Slots:当前仅公开 toolbar,用于左侧辅助操作区扩展
  • 右侧主动作区中的发送按钮为组件内部固定能力,当前作为公共 slot 对外开放
  • submitting 表示发送中 / 生成中状态;主动作会显示为 loading 态,但当前版本不提供 stop 交互
  • 内置模型选择器切换后会自动把焦点返回输入框;toolbar 插槽内的外部控件是否回焦由调用方自行决定

CSS Variables

推荐业务侧仅覆写与品牌或页面风格直接相关的 token:

  • --df-agent-chat-input-font-size
  • --df-agent-chat-input-line-height
  • --df-agent-chat-input-padding-x
  • --df-agent-chat-input-padding-y
  • --df-agent-chat-input-radius
  • --df-agent-chat-input-border-color
  • --df-agent-chat-input-bg
  • --df-agent-chat-input-text-color
  • --df-agent-chat-input-placeholder-color
  • --df-agent-chat-input-focus-border-color
  • --df-agent-chat-input-submit-size
  • --df-agent-chat-input-submit-radius

输入框高度由 minRows / maxRows 结合行高动态计算,不提供独立的高度 CSS 变量。

License

MIT