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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kyfe/ai-agent

v1.0.39

Published

移动端AIAgent智能助手

Readme

AIAgent 智能助手

基础用法

📢 注意事项:由于 该 npm 包发布频繁,请锁定版本使用!!!

<template>
  <div class="at-input-demo">
    <h5>基础用法</h5>

    <AIAgent appCode="AGENT-001" ref="AIAgent" v-model="isShow"></AIAgent>
  </div>
</template>

<script>
import AIAgent from '@kyfe/ai-agent' // 注意事项:由于该 npm 包发布频繁,请锁定版本使用
export default {
  components: {
    AIAgent,
  },
  data() {
    return {
      isShow: false,
    }
  },
  methods: {
    // 设置输入框内容
    setMsg() {
      this.isShow = true
      this.$nextTick(() => {
        this.$refs.AIAgent.setMsg('运单号:123456789')
      })
    },
  },
}
</script>

::: tip 引入 注意事项:轻应用本地环境联调使用时需配置代理,避免浏览器因同源策略阻止请求 :::

// 根据环境标识获取ai智能体域名
const getNewaiHost = () => {
  let host = 'https://oa-uat.kyeapi.com/'
  if (process.env.VUE_APP_CAS) {
    if (process.env.VUE_APP_CAS.indexOf('stg') > -1) {
      host = 'https://config-stg.kyeapi.com/'
    }
    if (process.env.VUE_APP_CAS.indexOf('prod') > -1) {
      host = 'https://open-h5.ky-express.com/'
    }
  }
  return host
}

// vue.config.js 增加以下配置
proxy: {
  "/newai": {
    target: getNewaiHost(),
    changeOrigin: true,
    pathRewrite: {
      '^/newai': ''
    }
  }
},

参数

| 参数名 | 说明 | 类型 | 默认值 | | --------------- | :-------------------------------------------------------------: | ------: | -----: | | value / v-model | 绑定值 (仅弹窗模式支持) | Boolean | - | | appCode | 智能体标识(以每个产品线为维度,在【HROA 系统>智能体管理】获取) | String | - | | popAttr | van-popup 属性 (仅弹窗模式支持) | Object | - | | noPopup | 是否非弹窗模式(默认为弹窗模式) | Boolean | false | | showBack | 导航栏是否展示返回按钮(仅弹窗模式支持) | Boolean | true |

内置方法 (通过 ref 调用)

| 方法名 | 说明 | 参数 | | ------- | :------------: | -----------: | | setMsg | 设置输入框内容 | String | | sendMsg | 发送消息 | Object {msg} |

插槽

| 插槽名 | 说明 | | -------------- | :------------------: | | input-tips-bar | 输入框顶部提示栏插槽 |

升级记录

| 版本 | 说明 | | ------ | :-------------------------------------------------: | | 1.0.0 | 发布 AIAgent 组件 | | 1.0.1 | 打开历史对话页面支持逐级返回 | | 1.0.5 | 包体积优化 | | 1.0.6 | css 基础样式调整 | | 1.0.7 | Agent 类型移除 AI 头像 | | 1.0.8 | 交互细节优化 | | 1.0.13 | 支持 AI-CHAT 类型 | | 1.0.14 | 修复 IOS 场景弹窗层级兼容问题(ai-agent-0731 版本) | | 1.0.16 | 反馈弹窗增加唯一类名(ai-agent-0731 版本) | | 1.0.17 | 自我介绍支持配置,样式优化 | | 1.0.26 | 修复 UI 走查问题 | | 1.0.33 | 修复已知问题 | | 1.0.34 | 支持渲染代码块 | | 1.0.36 | 历史记录支持删除 | | 1.0.38 | 上报记录增加提问来源 | | 1.0.39 | 修复已知问题 |