Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BackEnd and StoryLine docs #1338

Closed
wants to merge 2 commits into from

Conversation

Nan1179
Copy link

@Nan1179 Nan1179 commented Feb 17, 2025

No description provided.

@qiniu-ci
Copy link

This PR has been deployed to the preview environment. You can explore it using the preview URL.

Warning

Please note that deployments in the preview environment are temporary and will be automatically cleaned up after a certain period. Make sure to explore it before it is removed. For any questions, contact the Go+ Builder team.

import { useRouter } from 'vue-router';
import { LocaleMessage } from './index';

interface StoryLine {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥又出现一遍这个类型

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
可能我理解的有些问题,这块是应该由各个模块去修改base.ts中// TODO,而不是在伪代码中写?

Copy link
Collaborator

@nighca nighca Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对啊,去修改 base.ts,不然某个类型很多地方用到,难道在每个地方都再粘贴一份吗..那样这个 base 还有啥意义

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

明白


```typescript
// Delete `/storyline/{id}`
declare function updateStoryLine(id: string): Promise<void>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateStoryLine

我们之前提到过,对这个模块的使用方来说,这个导出的函数才是有意义的,反而是 Delete /storyline/{id} 是没什么意义的

当然严格来说,你的模块这个时候其实不应该叫 backend 了,它更接近前端代码中的一个 guide-apis(apis/guide.ts)模块,只是顺便注释 Delete /storyline/{id} 这样的内容来说明一下这个模块所对应的 HTTP 接口的规格

type CreateStoryLineInput = Omit<StoryLine, 'id'>

// POST `/storyline`
declare function createStoryLine(input: CreateStoryLineInput): Promise<void>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

创建成功的话应该返回点东西?

storyLineName: string,
}

// Get `/storyline/{owner}/{name}`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你这哪儿来的 owner、name 啊,project like 那里有 owner name 是因为 owner + name 共同构成了 project 的唯一标识,你这里 storyLine ID 已经是唯一标识了

- 用于获取故事线信息

```typescript
type GetUserStoryLineRelationshipInput = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

获取故事线信息的接口,为什么输入是 GetUserStoryLineRelationshipInput?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的老师 我理解错了 后面都不应该有userName


```typescript
type GetUserStoryLineRelationshipInput = {
userName: string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥会有 userName


```typescript
type CheckSnapshotInput = {
userSnapshot: string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1329 (comment) 这里提到的问题应该还没有确认好?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

1.对于第一个问题:确实是不需要把整个项目的snapshot都拿来比较,可以只比较涉及到coding步骤的精灵的所有信息。(在我们的定义里面,一个coding步骤是只会涉及一个精灵的,所以这里是只对比一个精灵)
2.对于第二个问题:可以引入该步骤的说明信息、项目的介绍来作为额外信息。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此外,可能需要再引入所有api reference的信息作为额外信息?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你说的我觉得大体上没问题;那样的话需要对应调整下这里的接口,比如

  • snapshot 的概念就改为 code 就好

  • 另外增加参数用于传递“背景信息”

    只是这里我会建议接口上不用具体到它是步骤的说明信息还是项目的介绍,还是 api reference,这个留给接口的调用方去决定,而这里接口上可以定义为类似

    context: string // 上下文(背景)信息,如当前项目、任务、步骤等

    这样的东西;因为“通过各种信息组合出提供给 LLM 的文本”的逻辑大概率细节较多且易变,挪到接口的调用方那边去做的话这个接口会更简单、稳定一点

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

明白

```typescript
type Props = {
storyLineId: string,
userName: string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里 props 上不应该有 userName?

Copy link

qiniu-x bot commented Feb 17, 2025

[Git-flow] Hi @Nan1179, There are some suggestions for your information:


Rebase suggestions

  • Following commits have duplicated messages

    Add BackEnd and StoryLine docs

    Add BackEnd and StoryLine docs

Which seems insignificant, recommend to use git rebase command to reorganize your PR.

For other git-flow instructions, recommend refer to these examples.

If you have any questions about this comment, feel free to raise an issue here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants