async getNoticeFlag()

in src/Service.ts [262:273]


  async getNoticeFlag() {
    const globalState = this.context.globalState;
    const experienceQuestionnaireKey = "questionnaireExpiration";
    const lastPromptKey = "lastPromptTime";
    // 检查上次提示的时间
    const lastPromptTime = globalState.get(lastPromptKey) as any;
    const questionnaireExpiration = globalState.get(experienceQuestionnaireKey) as any;
    if (!lastPromptTime || Date.now() - lastPromptTime > (questionnaireExpiration || 0) * 24 * 60 * 60 * 1000) {
      return true;
    }
    return false;
  }