Code Monkey home page Code Monkey logo

Comments (10)

newbienewbie avatar newbienewbie commented on June 3, 2024

@562127386 你说的是WebChat的情况吧,我之前也注意到了,应该是个bug(我之前写了主要用来测试微信公众号来着,所以也没修这块,没法自定义样式),晚点有空了我来修复一下 :)

from indirectline.

562127386 avatar 562127386 commented on June 3, 2024

嗯 是的 我看了下WebChat.js 没找到方法,能力有限。 谢了 大牛

from indirectline.

newbienewbie avatar newbienewbie commented on June 3, 2024

目前了解下来,我代码示例里用的是未指定的Prompt Style。奇怪的是在BotFramework Emulator里显示为漂亮的样式,但是在WebChat.js里就不显示什么特定样式。

目前看下来,好像不是我这边InDirectLine的问题。如果我手工指定一个提示风格,比如SuggestedAction

async(ctx , ct)=>{
    var dialogTurnResult = await ctx.PromptAsync(DialogNames.ChoicePrompt,new PromptOptions{
        Choices = new List<Choice>{
            new Choice{
                Value = "A: 历史文章",
                Synonyms = new List<string>{
                    "A","历史","历史文章",
                },
            },
            new Choice{
                Value = "B: 笑话",
                Synonyms = new List<string>{
                    "B","笑话",
                },
            },
        },
        Style = ListStyle.SuggestedAction,         // 加上这一行,在WebChat.js里就显示 提示动作 的样式了
    });
    return dialogTurnResult;
},

在WebChat.js里显示是没有问题的:

截图

似乎WebChat.js对Choice Prompt 的默认Style支持就是这样的?(如果我错了,请纠正我)

@562127386 你有尝试过使用原生的Azure DirectLine而非这里的InDirectLine测吗?

from indirectline.

562127386 avatar 562127386 commented on June 3, 2024

没在Azure 上测试过奥,我在乱换WebChat.js版本测试时,有一次在网页上显示样式了,可以单击选项。不清楚是缓存还是延迟的原因。后面想重现这种情况一直没重现。。。

from indirectline.

562127386 avatar 562127386 commented on June 3, 2024

我在前端styleOptions加的样式会起作用的。如果能调试下webchat.js看下收到服务器端咋样处理的就好找原因了,不知道咋调试这个js。。

from indirectline.

562127386 avatar 562127386 commented on June 3, 2024

我测试加上Style = ListStyle.SuggestedAction然后把IntegrationBotSample和Itminus.InDirectLine.Web两个应用发布到阿里云上我本机连接发现选择的几个内容都没有了,两个应用地址 http://47.98.59.155:3000/v3/directline/tokens/generatehttp://47.98.59.155:3000/v3/directline

from indirectline.

newbienewbie avatar newbienewbie commented on June 3, 2024

@562127386 感觉像是你的服务器没有调用prompt,websocket都没收到后续消息:

截图

方便贴一下你的服务端代码吗?

from indirectline.

562127386 avatar 562127386 commented on June 3, 2024

收到了 。你盲输入 a b 你就看到回复了。我服务器端没有改代码。

from indirectline.

newbienewbie avatar newbienewbie commented on June 3, 2024

@562127386 我的意思是 浏览器端并没有收到消息,所有往来的消息都可以在WebSocket连接里看到的。你使用Docker部署的吗?还是手工部署的?服务端日志可否贴一下?

from indirectline.

562127386 avatar 562127386 commented on June 3, 2024

手工IIS部署的 ,你方便有个联系方式不 我可以把服务器用户密码发给你登录调试下。这边截图还上传不到github上

from indirectline.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.